Skip to main content
Glama

get_rewrite_debug_events

Read structured rewrite-debug events, filterable by trace, phase, or severity, to debug rewrite scripts without scanning generic trace events.

Instructions

Reads the independent structured rewrite-debug event projection. Filter by trace, rewrite phase, or severity instead of scanning generic trace events.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNoOptional severity filter, for example info or warn.
limitNoMaximum number of events to return (default 200, maximum 1000).
offsetNoNumber of newest matching events to skip.
trace_idNoOptional HTTP trace id to inspect.
event_typeNoOptional event type, for example rule_matched, mutation_applied, script_failed, or rewrite_skipped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. 'Reads' implies a non-mutating operation, which is the key safety signal, but there is no disclosure of ordering (newest-first per the offset field), default limit behavior, or return shape beyond what the schema already encodes.

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

Conciseness4/5

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

Two compact sentences with no filler, and the resource identification is front-loaded ahead of the filtering guidance. Nothing needs trimming, though it is arguably too lean given the absence of annotations.

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

Completeness3/5

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

With no annotations and no output schema, the description is the only place behavioral context can live, and it stays thin — no return format, ordering, or default-pagination note. The parameter coverage is fully handled by the schema, so it is adequate but not complete for a no-annotation debug reader.

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 description coverage is 100%, so the schema already documents level, limit, offset, trace_id, and event_type, making the baseline 3 appropriate. The description's 'filter by trace, rewrite phase, or severity' maps trace→trace_id and severity→level but introduces a 'rewrite phase' filter that no parameter actually exposes, a minor mismatch.

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

Purpose4/5

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

States a specific verb (reads) and resource (rewrite-debug event projection), and the word 'independent structured' distinguishes it from generic trace events. It stops short of naming the sibling it complements, clear_rewrite_debug_events, but the read/clear split is inferable from the name and description.

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

Usage Guidelines4/5

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

Explicitly routes the agent: use this 'instead of scanning generic trace events', which is a real alternative condition. It doesn't state when NOT to use it or point at clear_rewrite_debug_events for the delete path, but the usage context is clear.

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