Skip to main content
Glama

cap_preflight

Run a fail-closed preflight for spend/send actions: check capability limits, mint a cap token on allow, and abort with an error on deny so you do not proceed.

Instructions

MUST-before spend/send: fail-closed preflight around checkCap. On allow + secret mints cap_token. On deny for spend|send returns isError/abort; do not proceed. Present token to cap_token_check before hop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
capYes
cardNo
actionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does well: it discloses fail-closed semantics, that allow + secret mints a cap_token, and that deny on spend/send returns isError/abort. It omits what happens for read/write/other actions and any auth/rate-limit context, but the core behavioral contract is clear.

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?

Dense but front-loaded, with the mandatory nature and the fail-closed rule stated first. Nothing is padded, though the telegraphic style ('hop', 'checkCap') risks ambiguity.

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 complex gate tool with no annotations and no output schema, the behavioral flow is covered but key pieces are missing: the meaning of cap/card, what non-spend/send actions yield, and any indication of output shape. Adequate but short of complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% over 3 params, so the description must compensate and largely does not. It hints at the action enum ('spend|send') and mentions a 'secret' that does not even appear in the schema, but leaves 'cap' and 'card' entirely unexplained. This is a real gap.

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 role: a fail-closed preflight gate run before spend/send that wraps the capability check. This distinguishes it from siblings cap_check (the underlying check) and cap_token_check (the token validator), though the term 'checkCap' is jargon that assumes knowledge of the sibling.

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?

Explicitly says it is MUST-run before spend/send, specifies the deny path (isError/abort, do not proceed), and routes the agent onward: 'Present token to cap_token_check before hop.' No when-not guidance, but the mandatory trigger condition is stated without inference.

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