Skip to main content
Glama

diagnose_requests

Diagnose why API responses look wrong or slow. Get breakdowns by source, status, content type, and latency, plus concrete findings like silent upstream failures, wrong mount prefixes, and mismatched content types.

Instructions

Explain what is going wrong with the traffic the local server has served, and where each response's data came from. Returns a breakdown by source (generated / upstream / replay / cache), by status and by content type, latency p50/p95/max, and a list of concrete findings: upstream failures that silently fell back to a generated mock, 404s from a wrong mount prefix, a body that is JSON under a non-JSON content type, and unusually slow requests. Prefer this over request_history when the user asks why a response looks wrong, whether data is real or mocked, or why something is slow. Note that a replayed or cached response never reaches the history log, so a call the user made and cannot find here was most likely served from a recording or the cache rather than not happening. Read-only, localhost only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoHow many of the newest requests to examine.
serviceNoLimit to one service. Omit to look at every service.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.25

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so excellently: it declares the operation read-only, scopes it to localhost, describes the output categories, and explains the important behavioral caveat that replayed or cached responses do not appear in the history log. Nothing about the tool's behavior is hidden.

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?

The description is dense yet every sentence earns its place: purpose first, then output details, then usage guidance, then a caveat, then constraints. It front-loads the core function and provides actionable detail without filler.

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?

Given no output schema, the description thoroughly explains what the tool returns, when to use it versus a sibling, and an important behavioral limitation. The parameter schema covers the inputs, and the description covers the behavior and interpretation of results, so an agent has everything needed to invoke the tool correctly.

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 input schema already documents `limit` and `service` adequately. The description does not add extra semantic nuance to the parameters, but it does not need to do so given the schema's coverage; it stays at the baseline of 3.

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?

The description uses a specific verb ('Explain what is going wrong') with a clear resource ('the traffic the local server has served') and then enumerates concrete outputs: breakdown by source, status, content type, latency percentiles, and concrete findings. It also distinguishes itself from the sibling `request_history` by mentioning the preference rule, making the purpose unmistakable.

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?

It explicitly instructs the agent to prefer this tool over `request_history` when diagnosing why a response looks wrong, whether data is real or mocked, or why something is slow. The note about replayed/cached responses never reaching the history log also helps the agent interpret missing results and choose this tool appropriately.

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