Skip to main content
Glama

analyze_perf

Read-only

Analyze per-tool latency metrics to identify performance bottlenecks across MCP tools. Returns count, p50/p95/max latency, and error rates for session or historical windows.

Instructions

Per-tool latency analysis. window='session' reads the in-memory ring (last 512 calls per tool — always available); window='1h'|'24h'|'7d'|'all' reads the persistent SQLite sink at ~/.doc-index/telemetry.db (opt-in via JDOCMUNCH_PERF_TELEMETRY=1). Returns {window, telemetry_enabled, source, per_tool:{tool:{count,p50_ms,p95_ms,max_ms,errors,error_rate}}}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
windowNoTime window. 'session' uses the in-memory ring; longer windows require JDOCMUNCH_PERF_TELEMETRY=1.session
Behavior4/5

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

Annotations declare readOnlyHint=true, which is consistent with the description. The description adds transparency by detailing the data sources (in-memory ring vs SQLite), the env var requirement, and the exact return structure. No contradictions or missing critical behavior.

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 two sentences long and front-loads the purpose. Every word adds value; no fluff. The structure is efficient and easy to parse.

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?

Despite having no output schema, the description explicitly lists the return structure, making it complete. Given the tool's simplicity (one parameter) and the richness of the description, the agent has all necessary context.

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

Parameters4/5

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

Schema coverage is 100% with a single parameter (window). The description goes beyond the schema by explaining the semantics of each enum value and the opt-in requirement, adding significant value for agent comprehension.

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 starts with 'Per-tool latency analysis,' which clearly states the tool's purpose and resource. It distinguishes itself from siblings, none of which perform latency analysis, so an agent can easily identify when to use this tool.

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?

The description explains the behavior for each window value ('session' vs longer windows) and the prerequisite for longer windows (env var). While it doesn't explicitly list when not to use or alternative tools, the guidance is clear and context-specific, earning a 4.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jgravelle/jdocmunch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server