Skip to main content
Glama

diagnose_engine_latency

Read-only

Diagnose serving engine latency spikes by correlating queue backpressure, KV cache pressure, and cache locality into a ranked root cause with the tuning knob to adjust.

Instructions

[READ][RCA] Rank the probable cause of a latency spike for any serving engine.

Correlates whichever signals the engine exposes (queue backpressure, KV/token-cache pressure, cache locality) into a ranked cause + the knob to turn — the engine-agnostic counterpart to diagnose_latency_spike (vLLM).

Args: target: Inference target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds genuine behavioral context beyond that: it explains which signals it correlates (queue backpressure, KV/token-cache pressure, cache locality) and what it produces (a ranked cause plus the knob to turn). No contradiction with the read-only hint; only missing detail is any latency/cost of the analysis.

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?

Front-loaded with [READ][RCA] tags and the core action, then the mechanism, then the sibling contrast, then args. Every sentence earns its place. The bracketed tags and the trailing 'Args:' block are slightly telegraphic but not wasteful.

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

Completeness4/5

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

There is no output schema, so the description must characterize the return, and it does: a ranked cause plus the recommended knob. The sole parameter is explained and the default behavior is stated. Adequate for a read-only single-parameter diagnostic, though it does not hint at the size/shape of the ranking.

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 description coverage is 0% and the single 'target' param has only a default of null, so the description carries the full burden — and it does, explaining that target is an inference target name from config and that omitting it selects the default. No enum or format examples are given, so 5 is not warranted.

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?

States a precise verb+resource: ranks probable causes of a latency spike for a serving engine. Crucially it names the sibling it differs from, diagnose_latency_spike, and the axis of difference (engine-agnostic vs vLLM-specific), so an agent can pick between them without opening either schema.

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?

It clearly routes the agent: use this for engines other than vLLM, use diagnose_latency_spike for vLLM. That is an explicit alternative plus a selecting condition. It stops short of a full when/when-not statement (e.g. no prerequisite that a spike actually be observed first), so it is not a 5.

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