Skip to main content
Glama

writ_check

Check if a consequential AI-agent write may proceed before sending payments, messages, changing access, or deleting data; receive ALLOW, DENY, or STEP_UP plus an audit receipt.

Instructions

Ask Writ whether an action may proceed. CALL THIS BEFORE any consequential write.

A consequential write is anything hard to undo: sending money or messages, changing access or identity records, deleting data, calling an external API that acts in the world.

Args: sponsor_id: The human sponsor accountable for this action (e.g. a user id or email). agent_id: The agent or workflow performing the action. verb: What is being done (e.g. "verify_human", "send_payment"). target: What it acts on (e.g. "benefit-case-123"). purpose: Why, in plain words. Be specific — the approval is bound to this purpose. environment: Optional policy environment: "dev", "staging", or "prod". The check runs against that environment's policy override (verbs it doesn't override inherit the tenant default). Omit for the tenant default. An unknown name denies fail-closed — never silently falls back.

Returns a decision: ALLOW — proceed. You get an authToken valid 90 seconds, bound to this exact sponsor/agent/verb/target/purpose. Call writ_verify_token against the intended write immediately before executing it. DENY — do NOT perform the action. Explain the receipt reason to the user. STEP_UP — a human sponsor must approve first. Tell the user what needs approval; they can approve via writ_grant (or the dashboard), then call writ_check again. Every outcome creates an audit receipt with a receiptId.

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": {
      "sponsor_id": "<sponsor_id>",
      "agent_id": "<agent_id>",
      "verb": "<verb>",
      "target": "<target>",
      "purpose": "<purpose>"
    },
    "name": "writ_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
verbYes
targetYes
purposeYes
agent_idYes
sponsor_idYes
environmentNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.0
    • addedInput schema / properties / environment
      Added value: +{
      +  "default": "",
      +  "title": "Environment",
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses the 90-second authToken TTL, that the token is bound to the exact sponsor/agent/verb/target/purpose, fail-closed denial on unknown environments, and that every outcome produces an auditable receipt. The three decision states (ALLOW/DENY/STEP_UP) and the required agent behavior for each are spelled out.

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?

Front-loaded with the directive and the definition of a consequential write, then Args and Returns blocks — a structure that scans well. It runs slightly long and the Args entries restate parameter names, but every block carries operational information rather than filler.

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 six-parameter, no-annotation authorization gate, the description covers the trigger condition, all inputs, all three return states, token lifetime and binding, and the audit trail. Even though an output schema exists, the decision semantics are explained at the level an agent needs to branch correctly.

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

Parameters5/5

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

Schema description coverage is 0%, so this section must compensate entirely, and it does — every one of the six parameters is defined with examples ("send_payment", "benefit-case-123") and intent. The environment parameter gets extra treatment: its three values, override inheritance from the tenant default, and the fail-closed behavior for unknown names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — asking Writ whether an action may proceed — and immediately scopes it to consequential writes. It is clearly distinguishable from siblings by naming writ_verify_token, writ_grant, and the audit-receipt flow, so an agent knows this is the pre-flight authorization gate rather than the token check itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use guidance ('CALL THIS BEFORE any consequential write') plus a concrete definition of what counts as consequential: money, messages, access/identity, deletions, external APIs that act in the world. It also routes follow-up behavior per outcome — call writ_verify_token before the write, use writ_grant for step-up approval, or re-call writ_check.

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