Skip to main content
Glama

Explain a refused call

gate_explain_refusal
Read-onlyIdempotent

What a Gate refusal means and how to fix it, from the x-gate-refused header value (e.g. route_not_allowed).

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": {
      "reason": "<reason>"
    },
    "name": "gate_explain_refusal"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonYesThe x-gate-refused value
recoverableNoWhether the write was granted with a recovery check

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already establish that this is a safe, idempotent, closed-world read, so the safety profile needs no restating. The description adds useful context by identifying where the input value originates (the x-gate-refused header) and that the result is guidance on fixing the refusal. It does not describe the shape of the guidance returned or whether unknown reason codes degrade gracefully.

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?

One short sentence with no filler, and the key identifier (x-gate-refused) plus a concrete example are front-loaded. The sentence lacks an explicit subject/verb construction, which makes it read as a phrase rather than a statement, but nothing is wasted.

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?

For a two-parameter diagnostic lookup with full schema coverage and clear safety annotations, this is close to sufficient. What is missing is any sense of the response: an explanation string, a remediation step list, or a mapping to permitted routes, which an agent would want to know before calling. The unexplained recoverable flag also leaves a gap.

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%, so both parameters are already documented and the baseline is 3. The description reinforces the reason parameter by tying it to the x-gate-refused header and giving a sample value, which is genuinely additive. The more ambiguous recoverable parameter ('whether the write was granted with a recovery check') gets no clarification in the 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?

The description names a specific operation on a specific resource: interpreting a Gate refusal and producing remediation guidance. The mention of the x-gate-refused header and an example value (route_not_allowed) makes the intent concrete. It stops short of explicitly distinguishing itself from the run/audit siblings, but no sibling appears to overlap this diagnostic role.

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?

Usage is only implied: an agent can infer this is for after a call has been refused, since the input is the refusal header. There is no explicit 'use this when X, not Y' statement, no note on what to do if no refusal header is present, and no alternative named for other failure modes.

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