Problem
When querying Workers Observability logs for Workflow events, the MCP server returns a Zod validation error because eventType: "workflow" is not in the allowed enum.
Error:
Invalid enum value. Expected 'fetch' | 'scheduled' | 'alarm' | 'cron' | 'queue' | 'email' | 'tail' | 'rpc' | 'websocket' | 'unknown', received 'workflow'
Additionally, workflow events don't have cpuTimeMs and wallTimeMs fields that are marked as required in the schema, causing further validation failures.
Reproduction
Query any workflow-related log via the query_worker_observability tool — for example, filtering by $metadata.requestId or $metadata.trigger that matches a workflow instance ID. The response contains events with $workers.eventType: "workflow", which fails schema validation.
Expected behavior
The observability schema should include "workflow" in the eventType enum, and the required fields should account for the different shape of workflow events (no cpuTimeMs/wallTimeMs at the event level — these are on the workflow metadata instead).
Environment
- MCP server:
@cloudflare/mcp-server-cloudflare
- Querying: Workers Observability API
- Worker type: Cloudflare Workflow (
WorkflowEntrypoint)
Problem
When querying Workers Observability logs for Workflow events, the MCP server returns a Zod validation error because
eventType: "workflow"is not in the allowed enum.Error:
Additionally, workflow events don't have
cpuTimeMsandwallTimeMsfields that are marked as required in the schema, causing further validation failures.Reproduction
Query any workflow-related log via the
query_worker_observabilitytool — for example, filtering by$metadata.requestIdor$metadata.triggerthat matches a workflow instance ID. The response contains events with$workers.eventType: "workflow", which fails schema validation.Expected behavior
The observability schema should include
"workflow"in theeventTypeenum, and the required fields should account for the different shape of workflow events (nocpuTimeMs/wallTimeMsat the event level — these are on the workflow metadata instead).Environment
@cloudflare/mcp-server-cloudflareWorkflowEntrypoint)