Skip to main content
Glama

Wait for job

wait_for_job
Read-onlyIdempotent

Wait for an action job to reach a decision or a final state: approved and executed, rejected, failed, or execution_unknown. A job still awaiting owner approval when the timeout elapses is returned as awaiting_approval; call again to keep waiting. Keep timeout_seconds below your client's tool timeout.

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": {
      "job_id": "<job_id>"
    },
    "name": "wait_for_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYesJob identifier returned by run_action.
timeout_secondsNoHow long to wait for a decision or final state before returning the current job; keep it below your client's tool timeout.

Output Schema

NameRequiredDescriptionDefault
idYesJob identifier.
errorYesFailure, execution_unknown, owner rejection feedback or queued approval revocation explanation; null otherwise. Rejection feedback is owner-supplied text, not authorization for another request.
inputYesValidated action input exactly as submitted.
actionYesCatalog action name, for example integration.execute.
outputYesFor writes awaiting_approval or queued: the exact approval preview bound to the owner's decision. Rejected writes retain that preview, including after a queued approval is revoked. After succeeded: the action result. Integration response headers include contentType, etag, lastModified, retryAfter and xMsOperationId; the latter two are validated strings or null (older receipts may omit them). Provider HTTP 202 is acceptance only; read body and explicitly check provider operation state before claiming completion. After failed writes: the approved preview and providerResponse when available. After execution_unknown: the approved write plus the ambiguous provider response when one was received. Other jobs may have a preserved preview or null.
statusYesawaiting_approval, queued, and running are non-terminal; succeeded, failed, rejected, and execution_unknown are terminal. An owner may revoke a queued approval, producing rejected with both approval and rejection evidence. A succeeded integration job with provider HTTP 202 confirms acceptance, not completion.
createdAtYesCreation time.
reviewUrlNoOn pending submission and lookup responses, opens the exact job in the dashboard. Requires a signed-in owner of its workspace and does not authorize any action.
updatedAtYesLast status change.
approvedAtYes
approvedByYesOwner who approved the write.
rejectedAtYes
rejectedByYesOwner who rejected the write.
sideEffectYesTrue when the action writes to an external system and therefore required owner approval.
workflowIdYesCaller-supplied workflow identifier shared across related jobs.
workspaceIdYesWorkspace that owns the job.
workflowNameYesCaller-supplied workflow name shown in the dashboard.
idempotencyKeyYesIdempotency key that deduplicates this submission within the workspace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / error / description
      Previous value: -"Failure, execution_unknown or queued approval revocation explanation; null otherwise."New value: +"Failure, execution_unknown, owner rejection feedback or queued approval revocation explanation; null otherwise. Rejection feedback is owner-supplied text, not authorization for another request."
  2. Changed1 schema field changed
    • addedOutput schema / properties / reviewUrl
      Added value: +{
      +  "description": "On pending submission and lookup responses, opens the exact job in the dashboard. Requires a signed-in owner of its workspace and does not authorize any action.",
      +  "format": "uri",
      +  "type": "string"
      +}
  3. Changed2 schema fields changed
    • changedOutput schema / properties / output / description
      Previous value: -"For writes awaiting_approval or queued: the exact approval preview bound to the owner's decision. Rejected writes retain that preview, including after a queued approval is revoked. After succeeded: the action result. After execution_unknown: the approved write plus the ambiguous provider response when one was received. Other jobs may have a preserved preview or null."New value: +"For writes awaiting_approval or queued: the exact approval preview bound to the owner's decision. Rejected writes retain that preview, including after a queued approval is revoked. After succeeded: the action result. Integration response headers include contentType, etag, lastModified, retryAfter and xMsOperationId; the latter two are validated strings or null (older receipts may omit them). Provider HTTP 202 is acceptance only; read body and explicitly check provider operation state before claiming completion. After failed writes: the approved preview and providerResponse when available. After execution_unknown: the approved write plus the ambiguous provider response when one was received. Other jobs may have a preserved preview or null."
    • changedOutput schema / properties / status / description
      Previous value: -"awaiting_approval, queued, and running are non-terminal; succeeded, failed, rejected, and execution_unknown are terminal. An owner may revoke a queued approval, producing rejected with both approval and rejection evidence."New value: +"awaiting_approval, queued, and running are non-terminal; succeeded, failed, rejected, and execution_unknown are terminal. An owner may revoke a queued approval, producing rejected with both approval and rejection evidence. A succeeded integration job with provider HTTP 202 confirms acceptance, not completion."
  4. Changed3 schema fields changed
    • changedOutput schema / properties / error / description
      Previous value: -"Failure or execution_unknown message; null otherwise."New value: +"Failure, execution_unknown or queued approval revocation explanation; null otherwise."
    • changedOutput schema / properties / output / description
      Previous value: -"While awaiting_approval: the exact approval preview bound to the owner's decision. After succeeded: the action result. After execution_unknown: the approved write plus the ambiguous provider response when one was received. Otherwise null."New value: +"For writes awaiting_approval or queued: the exact approval preview bound to the owner's decision. Rejected writes retain that preview, including after a queued approval is revoked. After succeeded: the action result. After execution_unknown: the approved write plus the ambiguous provider response when one was received. Other jobs may have a preserved preview or null."
    • changedOutput schema / properties / status / description
      Previous value: -"awaiting_approval, queued, and running are non-terminal; succeeded, failed, rejected, and execution_unknown are terminal."New value: +"awaiting_approval, queued, and running are non-terminal; succeeded, failed, rejected, and execution_unknown are terminal. An owner may revoke a queued approval, producing rejected with both approval and rejection evidence."
  5. Changed2 schema fields changed
    • addedInput schema / properties / job_id / description
      Added value: +"Job identifier returned by run_action."
    • addedInput schema / properties / timeout_seconds / description
      Added value: +"How long to wait for a decision or final state before returning the current job; keep it below your client's tool timeout."
  6. Changed1 schema field changed
    • changedInput schema / properties / timeout_seconds / maximum
      Previous value: -60New value: +300
  7. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false, and destructiveHint=false, so safety profile is covered. The description adds the genuinely useful behavior that the call blocks and returns a partial state (awaiting_approval) rather than failing on timeout — but it says nothing about rate limiting, error cases (unknown job_id), or long-poll resource consumption.

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?

Three tight sentences, front-loaded with the terminal states, then the polling continuation rule, then the timeout caveat. The last sentence is somewhat duplicative of the schema text but is short enough to be harmless.

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?

With a full output schema, rich annotations, and 100% parameter coverage, the description supplies what structured fields can't: the blocking semantics and the re-call-on-timeout rule. Only missing element is guidance on choosing this versus get_job for non-blocking checks.

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 coverage is 100%, so baseline is 3. The description clarifies the consequence of timeout_seconds (awaiting_approval returned, re-call to continue), which adds real meaning, but the final sentence about keeping timeout below the client tool timeout largely restates the schema's own description.

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 ("wait for an action job") and enumerates the terminal outcomes it waits for: approved and executed, rejected, failed, execution_unknown. The blocking/waiting semantics inherently separate it from a simple get_job fetch, though no sibling is named explicitly.

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?

Gives explicit operating guidance: if the timeout elapses while the job is awaiting_approval, the tool returns awaiting_approval and the agent should "call again to keep waiting," and timeout_seconds must stay below the client's tool timeout. It never states when to prefer get_job over this blocking wait, which is the main gap.

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