Skip to main content
Glama
Cloudflare Workers MCP Server

Cloudflare Workers MCP Server

Tail Worker

tail_worker
Read-only

Capture live Worker traffic, console logs, exceptions, and outcomes for a short window to debug runtime behavior; optionally send a trigger URL to record a request while connected.

Instructions

Live-tail a Worker for a short window, like wrangler tail: returns requests, console logs, exceptions and outcomes as they happen. Works on any Worker; observability doesn't need to be enabled. Only traffic during the window is captured, so pass trigger_url to send a request once connected. For historical logs use query_worker_logs.

Input Schema

NameRequiredDescriptionDefault
searchNoCase-insensitive substring matched against log lines, exceptions and request URLs
max_eventsNoStop early after this many matching events (default 50)
errors_onlyNoOnly keep events whose outcome is not ok or that threw an exception
script_nameYesThe Worker to tail
trigger_urlNoOptional https URL to GET once the tail is connected (e.g. the Worker route you are debugging) so the request is captured in this same call
duration_secondsNoHow long to listen, in seconds (default 15, max 50 to stay inside client request timeouts)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.0

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly, non-destructive, openWorld), and the description adds real context beyond them: that observability need not be enabled, that capture is limited to the listening window, and that the live operation is inherently ephemeral. It stops short of covering output shape or what happens if the tail cannot connect, but it is well above the annotation baseline.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences with the core behavior front-loaded, then the caveat about window-only capture, then the sibling disambiguation. Every sentence carries distinct information and nothing is repeated from the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter tool with no output schema, the description still conveys what a caller receives (requests, logs, exceptions, outcomes) and the key operational constraint that only in-window traffic is seen. Nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so search, max_events, errors_only, script_name and duration_seconds are all documented in structured fields. The description only reinforces trigger_url (send a request once connected), adding no new semantics for the remaining parameters, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource ("Live-tail a Worker") and immediately enumerates what is captured: requests, console logs, exceptions and outcomes. The closing sentence explicitly distinguishes it from the sibling query_worker_logs by contrasting live vs. historical logs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States both when to use it (live, short-window capture during debugging) and the alternative for the other case ("For historical logs use query_worker_logs"). It also advises passing trigger_url because only window traffic is captured, which is actionable guidance for getting useful results.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.