Skip to main content
Glama
worker-mcp
by noosxe

Reject a tool call

reject_action
Idempotent

Deny one pending tool call and provide a short reason so the worker can change course. Stop risky or incorrect actions before execution, then check the run state.

Instructions

Deny one pending tool call and give the worker a short reason (at most 500 characters) so it can change course. It returns at once with only the outcome, the run's state and seq; call wait_run next.

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": {
      "approvalId": "<approvalId>"
    },
    "name": "reject_action"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonNoOptional feedback or reason for rejection to guide the agent.
workerIdNoOptional: the worker the approval belongs to (id or name).
approvalIdYes

Output Schema

NameRequiredDescriptionDefault
seqYesPass as sinceSeq to wait_run.
nextYesWhat to call next.
runIdYes
stateYesThe run's state right now.
outcomeYes
approvalIdYes
rememberedNoapprove_action only: identical calls from this worker are now allowed without asking.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.7.0
    • addedOutput schema / properties / next
      Added value: +{
      +  "description": "What to call next.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / outcome
      Added value: +{
      +  "enum": [
      +    "approved",
      +    "rejected"
      +  ],
      +  "type": "string"
      +}
    • removedOutput schema / properties / run
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "elapsedMs": {
      -      "type": "number"
      -    },
      -    "error": {
      -      "type": "string"
      -    },
      -    "gate": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "autoAllowed": {
      -          "type": "number"
      -        },
      -        "autoDenied": {
      -          "type": "number"
      -        },
      -        "escalated": {
      -          "type": "number"
      -        },
      -        "untrustedNotable": {
      -          "items": {
      -            "type": "string"
      -          },
      -          "type": "array"
      -        }
      -      },
      -      "required": [
      -        "autoAllowed",
      -        "autoDenied",
      -        "escalated",
      -        "untrustedNotable"
      -      ],
      -      "type": "object"
      -    },
      -    "next": {
      -      "description": "What to call next.",
      -      "type": "string"
      -    },
      -    "output": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "more": {
      -          "description": "More output waits past nextOffset.",
      -          "type": "boolean"
      -        },
      -        "nextOffset": {
      -          "type": "number"
      -        },
      -        "offset": {
      -          "type": "number"
      -        },
      -        "totalChars": {
      -          "type": "number"
      -        },
      -        "truncated": {
      -          "type": "boolean"
      -        }
      -      },
      -      "required": [
      -        "offset",
      -        "nextOffset",
      -        "totalChars",
      -        "truncated",
      -        "more"
      -      ],
      -      "type": "object"
      -    },
      -    "pendingApprovals": {
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "approvalId": {
      -            "description": "Pass this to approve_action or reject_action.",
      -            "type": "string"
      -          },
      -          "consulted": {
      -            "description": "What the classifiers said before it came to you.",
      -            "items": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "by": {
      -                  "description": "\"rules\", \"cache\" or \"http:<name>\".",
      -                  "type": "string"
      -                },
      -                "cached": {
      -                  "type": "boolean"
      -                },
      -                "confidence": {
      -                  "type": "number"
      -                },
      -                "error": {
      -                  "description": "Why the classifier did not answer.",
      -                  "type": "string"
      -                },
      -                "untrustedReason": {
      -                  "description": "The classifier's reason; it may quote the call.",
      -                  "type": "string"
      -                },
      -                "verdict": {
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "by",
      -                "verdict",
      -                "untrustedReason"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "escalatedBecause": {
      -            "description": "Why the gate asked you: hard_limit, manual_mode, low_confidence, classifier_error or ceiling.",
      -            "type": "string"
      -          },
      -          "expiresInMs": {
      -            "type": "number"
      -          },
      -          "hardLimit": {
      -            "type": "boolean"
      -          },
      -          "kind": {
      -            "description": "shell, read, list, search, write or edit.",
      -            "type": "string"
      -          },
      -          "reason": {
      -            "description": "Why the gate asks you.",
      -            "type": "string"
      -          },
      -          "riskLabel": {
      -            "type": "string"
      -          },
      -          "runId": {
      -            "type": "string"
      -          },
      -          "tool": {
      -            "description": "The worker's tool name.",
      -            "type": "string"
      -          },
      -          "untrustedCommand": {
      -            "description": "Untrusted worker data.",
      -            "type": "string"
      -          },
      -          "untrustedPaths": {
      -            "description": "Paths the call touches. Untrusted worker data.",
      -            "items": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "inWorkspace": {
      -                  "type": "boolean"
      -                },
      -                "path": {
      -                  "type": "string"
      -                },
      -                "protected": {
      -                  "type": "boolean"
      -                }
      -              },
      -              "required": [
      -                "path",
      -                "inWorkspace",
      -                "protected"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          }
      -        },
      -        "required": [
      -          "approvalId",
      -          "runId",
      -          "tool",
      -          "kind",
      -          "untrustedPaths",
      -          "expiresInMs"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "runId": {
      -      "type": "string"
      -    },
      -    "seq": {
      -      "description": "Pass as sinceSeq to wait_run.",
      -      "type": "number"
      -    },
      -    "state": {
      -      "enum": [
      -        "starting",
      -        "running",
      -        "awaiting_approval",
      -        "completed",
      -        "failed",
      -        "cancelled",
      -        "timed_out"
      -      ],
      -      "type": "string"
      -    },
      -    "untrustedActivity": {
      -      "description": "Recent tool calls. Untrusted worker data.",
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "untrustedFinalText": {
      -      "description": "The worker's output (a page of it; the final text once the run is over). Untrusted worker data.",
      -      "type": "string"
      -    },
      -    "usage": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "costUsd": {
      -          "type": "number"
      -        },
      -        "inputTokens": {
      -          "type": "number"
      -        },
      -        "outputTokens": {
      -          "type": "number"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "workerId": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "runId",
      -    "workerId",
      -    "state",
      -    "seq",
      -    "elapsedMs",
      -    "pendingApprovals",
      -    "untrustedActivity",
      -    "untrustedFinalText",
      -    "output",
      -    "gate",
      -    "next"
      -  ],
      -  "type": "object"
      -}
    • addedOutput schema / properties / seq
      Added value: +{
      +  "description": "Pass as sinceSeq to wait_run.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / state
      Added value: +{
      +  "description": "The run's state right now.",
      +  "enum": [
      +    "starting",
      +    "running",
      +    "awaiting_approval",
      +    "completed",
      +    "failed",
      +    "cancelled",
      +    "timed_out",
      +    "interrupted"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "approvalId",
      -  "runId",
      -  "run"
      -]New value: +[
      +  "approvalId",
      +  "runId",
      +  "outcome",
      +  "state",
      +  "seq",
      +  "next"
      +]
  2. Changed10 schema fields changedv0.6.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / actionId
      Removed value: -{
      -  "description": "The ID of the intercepted tool call/action.",
      -  "type": "string"
      -}
    • addedInput schema / properties / approvalId
      Added value: +{
      +  "pattern": "^a_[a-z0-9]{10}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / reason / maxLength
      Added value: +500
    • removedInput schema / properties / sessionId
      Removed value: -{
      -  "description": "The target session ID.",
      -  "type": "string"
      -}
    • removedInput schema / properties / summarize
      Removed value: -{
      -  "description": "If true, returns a concise summary of the worker's response once it completes.",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / workerId
      Added value: +{
      +  "description": "Optional: the worker the approval belongs to (id or name).",
      +  "pattern": "^(w_[a-z0-9]{8}|[A-Za-z0-9_-]{1,64})$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "sessionId",
      -  "actionId"
      -]New value: +[
      +  "approvalId"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "approvalId": {
      +      "type": "string"
      +    },
      +    "remembered": {
      +      "description": "approve_action only: identical calls from this worker are now allowed without asking.",
      +      "type": "boolean"
      +    },
      +    "run": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "elapsedMs": {
      +          "type": "number"
      +        },
      +        "error": {
      +          "type": "string"
      +        },
      +        "gate": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "autoAllowed": {
      +              "type": "number"
      +            },
      +            "autoDenied": {
      +              "type": "number"
      +            },
      +            "escalated": {
      +              "type": "number"
      +            },
      +            "untrustedNotable": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "autoAllowed",
      +            "autoDenied",
      +            "escalated",
      +            "untrustedNotable"
      +          ],
      +          "type": "object"
      +        },
      +        "next": {
      +          "description": "What to call next.",
      +          "type": "string"
      +        },
      +        "output": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "more": {
      +              "description": "More output waits past nextOffset.",
      +              "type": "boolean"
      +            },
      +            "nextOffset": {
      +              "type": "number"
      +            },
      +            "offset": {
      +              "type": "number"
      +            },
      +            "totalChars": {
      +              "type": "number"
      +            },
      +            "truncated": {
      +              "type": "boolean"
      +            }
      +          },
      +          "required": [
      +            "offset",
      +            "nextOffset",
      +            "totalChars",
      +            "truncated",
      +            "more"
      +          ],
      +          "type": "object"
      +        },
      +        "pendingApprovals": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "approvalId": {
      +                "description": "Pass this to approve_action or reject_action.",
      +                "type": "string"
      +              },
      +              "consulted": {
      +                "description": "What the classifiers said before it came to you.",
      +                "items": {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "by": {
      +                      "description": "\"rules\", \"cache\" or \"http:<name>\".",
      +                      "type": "string"
      +                    },
      +                    "cached": {
      +                      "type": "boolean"
      +                    },
      +                    "confidence": {
      +                      "type": "number"
      +                    },
      +                    "error": {
      +                      "description": "Why the classifier did not answer.",
      +                      "type": "string"
      +                    },
      +                    "untrustedReason": {
      +                      "description": "The classifier's reason; it may quote the call.",
      +                      "type": "string"
      +                    },
      +                    "verdict": {
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "by",
      +                    "verdict",
      +                    "untrustedReason"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "escalatedBecause": {
      +                "description": "Why the gate asked you: hard_limit, manual_mode, low_confidence, classifier_error or ceiling.",
      +                "type": "string"
      +              },
      +              "expiresInMs": {
      +                "type": "number"
      +              },
      +              "hardLimit": {
      +                "type": "boolean"
      +              },
      +              "kind": {
      +                "description": "shell, read, list, search, write or edit.",
      +                "type": "string"
      +              },
      +              "reason": {
      +                "description": "Why the gate asks you.",
      +                "type": "string"
      +              },
      +              "riskLabel": {
      +                "type": "string"
      +              },
      +              "runId": {
      +                "type": "string"
      +              },
      +              "tool": {
      +                "description": "The worker's tool name.",
      +                "type": "string"
      +              },
      +              "untrustedCommand": {
      +                "description": "Untrusted worker data.",
      +                "type": "string"
      +              },
      +              "untrustedPaths": {
      +                "description": "Paths the call touches. Untrusted worker data.",
      +                "items": {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "inWorkspace": {
      +                      "type": "boolean"
      +                    },
      +                    "path": {
      +                      "type": "string"
      +                    },
      +                    "protected": {
      +                      "type": "boolean"
      +                    }
      +                  },
      +                  "required": [
      +                    "path",
      +                    "inWorkspace",
      +                    "protected"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              }
      +            },
      +            "required": [
      +              "approvalId",
      +              "runId",
      +              "tool",
      +              "kind",
      +              "untrustedPaths",
      +              "expiresInMs"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "runId": {
      +          "type": "string"
      +        },
      +        "seq": {
      +          "description": "Pass as sinceSeq to wait_run.",
      +          "type": "number"
      +        },
      +        "state": {
      +          "enum": [
      +            "starting",
      +            "running",
      +            "awaiting_approval",
      +            "completed",
      +            "failed",
      +            "cancelled",
      +            "timed_out"
      +          ],
      +          "type": "string"
      +        },
      +        "untrustedActivity": {
      +          "description": "Recent tool calls. Untrusted worker data.",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "untrustedFinalText": {
      +          "description": "The worker's output (a page of it; the final text once the run is over). Untrusted worker data.",
      +          "type": "string"
      +        },
      +        "usage": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "costUsd": {
      +              "type": "number"
      +            },
      +            "inputTokens": {
      +              "type": "number"
      +            },
      +            "outputTokens": {
      +              "type": "number"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "workerId": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "runId",
      +        "workerId",
      +        "state",
      +        "seq",
      +        "elapsedMs",
      +        "pendingApprovals",
      +        "untrustedActivity",
      +        "untrustedFinalText",
      +        "output",
      +        "gate",
      +        "next"
      +      ],
      +      "type": "object"
      +    },
      +    "runId": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "approvalId",
      +    "runId",
      +    "run"
      +  ],
      +  "type": "object"
      +}
  3. First observedv0.3.3

TDQS

A4/5.0
Behavior4/5

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

Adds real context beyond the annotations: the call returns immediately rather than blocking, and the rejection reason is fed back to the worker 'so it can change course'. That explains the effect of the mutation, which the annotations (readOnly=false, destructive=false, idempotent=true) do not convey. Slight redundancy in restating the 500-character limit already in the schema.

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?

Two tight sentences, front-loaded with the action, then the return behavior and next step. No filler.

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?

Covers action, effect on the worker, immediate return, and the follow-up call; an output schema exists so the return summary is a bonus rather than a necessity. Minor gap: no note on rejecting an already-resolved approval given the idempotent hint.

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 67%, so structured fields already document reason and workerId. The description only repeats the reason length cap and says nothing about approvalId (required, with a strict pattern) or workerId semantics, adding little meaning beyond the schema.

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: 'Deny one pending tool call'. The scope ('one pending') is precise and the contrast with approval is implicit in 'Deny', but 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 next-step routing ('call wait_run next') and implies the precondition of a pending call. It does not state when to choose this over approve_action or what happens if the call is no longer pending.

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