Skip to main content
Glama

diagnose_latency_spike

Read-only

Rank probable causes of TTFT/latency spikes and identify the tuning knob to adjust by correlating queue depth, KV-cache pressure, and prefix-cache locality.

Instructions

[READ][RCA] Rank the probable cause of a TTFT/latency spike + the knob to turn.

Correlates queue depth, KV-cache pressure/preemption, and prefix-cache locality into a ranked cause list — call this first on "why is inference slow".

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/5.0
Behavior4/5

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

The readOnlyHint annotation already establishes the safe-read profile, so the bar is lower; the description goes beyond it by naming the internal signals it correlates (queue depth, KV-cache pressure/preemption, prefix-cache locality) and the shape of the result (a ranked cause list plus a recommended knob). It omits any mention of cost/latency of the analysis itself, keeping it from a 5.

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-loads the type tags and the one-line purpose before the correlation detail and Args block — well ordered and mostly tight. The correlation sentence is arguably more than strictly needed for selection, but it earns its place by clarifying output.

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?

For a single-optional-param, read-only diagnostic with no output schema, the description is nearly complete: it covers purpose, when to call, inputs, and the nature of the returned ranked causes. Minor gaps remain around target naming and whether it scopes to one target or the whole cluster.

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 0%, so the description must compensate, and it does: it explains that 'target' is an inference target name sourced from config and that omitting it uses the default. It does not specify valid name formats or how to discover targets, but the single optional param is largely covered.

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+resource ('Rank the probable cause of a TTFT/latency spike') and adds a secondary output ('the knob to turn'), which is concrete. The [READ][RCA] tags reinforce intent. It stops short of explicitly distinguishing itself from the near-identical sibling diagnose_engine_latency, so sibling differentiation is only implied.

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?

Provides a clear trigger: 'call this first on "why is inference slow"', which routes the agent to start here. However, it never names an alternative or a when-not condition, and the close sibling diagnose_engine_latency is left unaddressed.

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