Skip to content

Workers Observability: eventType 'workflow' not supported in schema #362

Description

@alexander-zuev

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions