Skip to main content
Glama

Wait for approval

await_plan
Read-onlyIdempotent

Waits for a parked plan to be decided: the plan_id comes from a tool result with status pending_approval. Blocks server-side until the plan reaches a terminal status (applied, rejected, expired, failed) and returns that status. Every call returns within timeout_s (default 45, max 55); when the deadline passes first the result has timed_out=true with the plan still live, and a new call with the same plan_id resumes the wait. It reads durable state, so a timeout or a dropped connection loses nothing. A human approving in the dashboard is what executes the action; the plan proceeds whether or not anyone is waiting on it.

Input Schema

NameRequiredDescriptionDefault
plan_idYesthe plan id a gated tool returned when it parked pending approval
timeout_sNohow long to block waiting for a decision, in seconds (default 45, max 55). The server always returns by this deadline; it never holds the request open indefinitely

Output Schema

NameRequiredDescriptionDefault
toolYes
errorNoset when status is failed
statusYespending (awaiting a human in the dashboard — including after a drift refresh, see refresh_count), approved (decided, not yet run), rejected, expired (TTL lapsed before anyone decided), applied (approved and executed), or failed (approved but the fingerprint check or the executor itself failed — see error)
plan_idYes
waited_sYesseconds this call actually blocked before returning
timed_outNotrue when the wait hit its deadline before the plan was decided — the plan is still live, call await_plan again with the same plan_id to keep waiting. Absent when status is terminal
applied_atNo
created_atYes
decided_atNo
decided_byNo
expires_atYes
last_driftNowhat changed under the previously-approved card, prompting the latest refresh
project_idYes
refresh_countNohow many times an approve hit state drift and sent this plan back to pending with a rebuilt evidence card and a fresh TTL — status stays pending and still needs a human, keep polling; absent when it never happened
retry_after_sNowait at least this many seconds before calling get_plan_status again; absent means the status is terminal and further calls are pointless. Prefer await_plan, which blocks server-side and needs no loop at all
last_refreshed_atNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Rich disclosure beyond the annotations: server-side blocking, hard deadline behavior, timed_out=true with the plan still live, resumability by re-calling with the same plan_id, durability of state across dropped connections, and the key fact that a human approving in the dashboard is what actually executes the action. This is consistent with readOnlyHint=true — the tool observes, it does not decide.

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 the purpose, then layered with deadline and durability semantics in a small number of dense sentences. The durable-state sentence partly repeats the resumption point, a minor redundancy, but nothing is padding.

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

Completeness5/5

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

With annotations covering the safety profile and an output schema covering return shape, the description supplies everything else an agent needs: when to call, how long it blocks, what a timeout looks like, how to resume, and who actually executes the action.

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 100%, so baseline is 3; the description still adds value by explaining that plan_id originates from a gated tool's pending_approval result and that reusing the same id resumes the same wait, plus that timeout_s bounds every call. The 45/55 numbers duplicate the schema, keeping it from a 5.

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 specific verb and resource ('Waits for a parked plan to be decided') and pins down the exact lifecycle it observes: blocks until the plan reaches a terminal status (applied, rejected, expired, failed) and returns it. This is clearly distinguishable from the polling sibling get_plan_status because blocking vs. returning a snapshot is spelled out.

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 tells the agent precisely when to use it: the plan_id comes from a tool result with status pending_approval, and a timed-out call should be resumed with the same plan_id. There is no explicit exclusion naming get_plan_status as the non-blocking alternative, so the when-not is left implicit.

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