Skip to main content
Glama

run_refused

Records a goal run's call that Claude Code refused despite guard approval, capturing the allow rule it needs; intended for quarterdeck-goals plugin use only.

Instructions

Records a goal run's call that Claude Code refused although the guard allowed it, with the allow rule it needs. For the quarterdeck-goals plugin only: agents and the model must not call this.

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": {
      "run_id": "<run_id>",
      "tool_name": "<tool_name>"
    },
    "name": "run_refused"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputNoThe call's command and path fields, to match the goal's command rules
run_idYes
run_scopeNoA goal run passes its run id here; anyone else leaves it out.
tool_nameYesThe tool Claude Code refused

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.32.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It discloses the domain restriction (plugin-only, model must not call), which is genuinely useful, but says nothing about whether the record is persisted, whether it can be updated or duplicated, what happens to the supplied allow rule, or what the caller receives back. For a write tool with zero annotation coverage this leaves meaningful gaps.

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 short sentences, front-loaded with the what and followed by the audience restriction. No filler, and the caveat appears before an agent would act on the first sentence.

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

Completeness3/5

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

There is no output schema and no annotations, and the tool has a nested object parameter, so the description should do more. It never explains the effect of the recorded allow rule, whether recording is idempotent, or what a caller gets back. The restriction sentence is valuable but does not compensate for those omissions.

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 75%, so the schema already documents the nested 'input', 'run_scope', and 'tool_name' parameters. The description's one semantic hint — that the record carries 'the allow rule it needs' — does not map onto any declared parameter, which is mildly confusing rather than clarifying. It adds 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?

The description states a specific verb and a precise, unusual resource: recording a goal-run call that Claude Code refused even though the guard allowed it, plus the allow rule it requires. That is far more specific than a restatement of the name 'run_refused'. It stops short of naming a sibling (e.g. guard_check) to contrast against, so an agent must infer the boundary from the domain alone.

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 gives an explicit exclusion — 'For the quarterdeck-goals plugin only: agents and the model must not call this' — which is unusually direct routing guidance. The when-to-use condition is implied by the purpose (a refusal that the guard permitted) but is not spelled out as a trigger, and no alternative tools are named.

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