Skip to main content
Glama
dofunc
by dofunc

reject

Declines a pending tool call and waits for the turn to complete, returning an approval request or question that needs a response.

Instructions

Reject this tool call (reject_once). Codex and Claude Code continue the turn; Grok and OpenCode end it as cancelled. Blocks until the turn is done, needs an approval or asks a question; the server sets no time limit. If your client times out, the turn keeps running and the connection stays: call status for the state and output for the reply instead of sending the task again. Returns "approval_needed" with an approval to answer via approve / allow / reject, or "question_needed" with a question to answer via answer.

Input Schema

NameRequiredDescriptionDefault
waitNoWait for the result (default true). false returns right after sending.
sessionYesSession id returned by open
approval_idYesapproval_id from the approval_needed result

Output Schema

NameRequiredDescriptionDefault
outputNo
statusYes
outcomeNo
turn_idNo
approvalNo
questionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses blocking behavior, no server time limit, client-specific turn outcomes, timeout behavior, connection persistence, and the approval_needed/question_needed return states. This is unusually rich behavioral context for an agent.

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?

The description is front-loaded with the core action and packs several important behavioral details without filler. It is dense and semicolon-heavy, but each clause conveys operational information.

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?

For a blocking action with no annotations and an output schema, the description is complete enough to invoke safely: it explains blocking behavior, timeout handling, return states, and what to do instead of retrying the task. No critical invocation context appears missing.

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%, and the schema already documents session, approval_id, and wait. The description adds workflow context around approval_id but does not materially extend the meaning of the individual parameters beyond what the schema provides.

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: "Reject this tool call." It also situates the action in the approval workflow by naming approve, allow, reject, and answer as related responses. It does not explicitly contrast with the sibling cancel tool, so sibling differentiation is useful but not complete.

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?

The description names approve, allow, reject, and answer as alternatives, and says to call status/output after a client timeout instead of resending the task. However, it never explicitly says when to choose reject over approve/allow or cancel, so the selection guidance is mostly implied.

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