Skip to main content
Glama

latency_budget

Read-onlyIdempotent

Split an end-to-end latency target across service hops and flag any hop exceeding its allocated share, based on caller-supplied estimates.

Instructions

Split an end-to-end latency objective across hops and show which hops exceed their share. Pure arithmetic over caller-supplied estimates.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "targetMs": "<targetMs>",
      "hops": "<hops>"
    },
    "name": "latency_budget"
  }
}

Input Schema

NameRequiredDescriptionDefault
hopsYes
targetMsYes
percentileNop95

Output Schema

NameRequiredDescriptionDefault
hopsNo
kindNo
sourcesNo
targetMsNo
validatedNo
limitationNo
percentileNo
limitationsNo
remainingMsNo
suggestionsNo
withinBudgetNo
parallelGroupsNo
estimatedTotalMsNo
utilizationPercentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.5.0
    • removedInput schema / properties / hops / items / additionalProperties
      Removed value: -false
    • changedInput schema / properties / hops / items / required
      Previous value: -[
      -  "name",
      -  "estimatedMs",
      -  "cacheable"
      -]New value: +[
      +  "name",
      +  "estimatedMs"
      +]
    • changedInput schema / required
      Previous value: -[
      -  "targetMs",
      -  "percentile",
      -  "hops"
      -]New value: +[
      +  "targetMs",
      +  "hops"
      +]
    • addedOutput schema / properties / limitation
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / sources
      Added value: +{
      +  "type": "array"
      +}
    • addedOutput schema / properties / validated
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
  2. First observedv0.4.1

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description usefully adds that the tool does no data fetching and trusts caller inputs, but it omits how the split is computed (equal share vs proportional) and how parallel groups or cacheable hops affect the allocation, which is the behavior an agent most needs to predict the output.

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 tight sentences with the primary action front-loaded and no filler; the second sentence earns its place by clarifying the input contract. Brevity is efficient, though the space saved is not spent on the nested-field semantics that are missing.

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

Completeness2/5

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

An output schema means return values need no explanation, and annotations cover the safety profile. However, a tool with an undocumented nested schema (cacheable, parallelGroup, percentile) and a non-obvious allocation algorithm needs more than two sentences to be callable with confidence.

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

Parameters2/5

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

Schema description coverage is 0% and the description supplies no parameter meaning at all. Nested hop fields like cacheable and parallelGroup have non-obvious semantics that materially change the arithmetic, and percentile's effect on the comparison is unexplained, so the description fails to compensate for the coverage gap.

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?

The description states a specific verb and resource: split an end-to-end latency objective across hops and report which hops exceed their share. That is concrete enough to distinguish it from most siblings, though it never names adjacent budget tools like slo_budget or queue_sizing to remove ambiguity.

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

Usage Guidelines3/5

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

"Pure arithmetic over caller-supplied estimates" implies usage (you must already have per-hop estimates and are checking the allocation, not measuring anything), but there is no explicit when-to-use or when-not-to-use statement and no named alternative. The agent must infer the situation from context alone.

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