Skip to main content
Glama

retry_policy

Read-onlyIdempotent

Compute exponential backoff schedules with jitter, worst-case waits, and deadline fit, then use idempotency and circuit-breaker guidance to design reliable retries.

Instructions

Compute an exponential backoff schedule with jitter, the worst-case wait and whether it fits a deadline; adds idempotency and circuit-breaker guidance.

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": {
      "operationIdempotent": "<operationIdempotent>"
    },
    "name": "retry_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
capMsNo
factorNo
jitterNofull
deadlineMsNo
baseDelayMsNo
maxAttemptsNo
operationIdempotentYes

Output Schema

NameRequiredDescriptionDefault
kindNo
inputsNo
sourcesNo
guidanceNo
validatedNo
limitationNo
worstCaseWaitMsNo
attemptsThatFitDeadlineNo
retriesAfterFirstAttemptNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.5.0
    • changedInput schema / required
      Previous value: -[
      -  "baseDelayMs",
      -  "factor",
      -  "capMs",
      -  "maxAttempts",
      -  "jitter",
      -  "operationIdempotent"
      -]New value: +[
      +  "operationIdempotent"
      +]
    • addedOutput schema / properties / limitation
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / validated
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
  2. First observedv0.4.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, so the safety profile is covered. The description adds behavior beyond that: the result includes a worst-case wait, a deadline feasibility judgment, and advisory idempotency/circuit-breaker guidance, which is more than the annotations reveal.

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?

A single front-loaded sentence with the core computation first and outputs second; no filler. The trailing "adds idempotency and circuit-breaker guidance" is slightly vague about whether that is returned prose or just an output field, which keeps it from a 5.

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

Completeness3/5

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

An output schema exists, so return shape needn't be explained, and the tool is a stateless pure computation with low risk. However, with seven undocumented parameters, the description never explains the interaction that matters most: whether the deadline truncates the schedule or merely reports fit.

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% across 7 parameters, so the description must carry the load. It only hints at three of them (jitter, deadlineMs via "deadline", operationIdempotent via "idempotency") and says nothing about baseDelayMs, factor, capMs, maxAttempts, their units, or how deadlineMs interacts with maxAttempts and capMs to shape the schedule.

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?

"Compute an exponential backoff schedule with jitter" is a precise verb plus resource, and the clause about worst-case wait and deadline fit tells the agent what the output answers. No sibling tool in the list does retry/backoff math, so there is nothing to confuse it with.

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?

Usage is only implied: an agent can infer this is the tool for sizing retries when designing resilience, but there is no explicit "use when" trigger, no exclusion (e.g., don't use for live retry execution), and no prerequisites such as supplying operationIdempotent up front.

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