Skip to main content
Glama

Wait for a background run

wait_for_run
Read-onlyIdempotent

Wait up to 20 seconds and return the current run record. If the run is still active, wait again with the same ID. Use compact output for cited excerpts without the full page text.

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": {
      "id": "<id>"
    },
    "name": "wait_for_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesID returned by Tern.
outputNoReturn a bounded preview with excerpts and source URLs. Omit for the full output.
timeoutSecondsNoMaximum seconds to wait before returning the current status.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description adds real behavior beyond that: a ~20s bounded block, a repeat-poll pattern keyed on the same ID, and the effect of compact output. It does not describe what a run record contains or what happens on an invalid/expired ID.

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?

Three short sentences, front-loaded with the wait-and-return contract, then the polling loop, then the output-mode hint. No redundant or decorative wording.

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 carry the return contract: it says the current run record is returned and that the agent should loop on the same ID. That is enough to drive correct polling, though the shape of a run record and terminal states remain unspecified.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents id, output and timeoutSeconds, making 3 the baseline. The description reinforces the wait ceiling and explains that compact mode yields cited excerpts without full page text, which adds a little intent beyond the enum value.

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 and resource ('Wait ... and return the current run record') plus the bounded wait window and the re-wait loop. It does not name or contrast with the closest sibling, get_run, so the agent must infer when to poll versus fetch immediately.

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?

Gives clear in-tool guidance: wait again with the same ID if still active, and use compact output when citing excerpts. It stops short of saying when to choose this over get_run/list_runs or when waiting is inappropriate (e.g., long jobs where a monitor is better).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources