Skip to main content
Glama
io.github.JC7333/mandatia

io.github.JC7333/mandatia

by JC7333

revoke_mandate

Permanently revoke a mandate, preventing new tokens and sub-mandates under it while already-issued tokens remain valid until expiry.

Instructions

Revoke a mandate now. Final: a revoked mandate cannot be reactivated.

Only the mandate's own principal revokes it (for a sub-mandate, that is the agent that delegated it). If the principal has a registered key, the revocation must carry its signature: build the bytes with prepare_revocation_signature, sign them, and pass principal_signature and signed_at. With AMR_REQUIRE_PRINCIPAL_SIGNATURE, every revocation must be signed. Without a key, anyone who can call this tool can revoke: expose it to principals (or their back office), like create_mandate.

Effect, from the moment this returns: no new token for the mandate or any sub-mandate below it, verify_mandate no longer returns it, and no sub-mandate can be created under it. Tokens and mandate attestations already issued cannot be called back: they stay valid until their exp, given in outstanding_tokens and outstanding_attestations (the mandate and its sub-mandates).

Args: mandate_id: UUID of the mandate to revoke. reason: Why it is revoked, recorded in the registry and the Proof Pack (1 to 500 characters). Example: "agent exceeded its order limit" principal_signature: Base64url Ed25519 signature of the revocation payload. signed_at: The signed_at placed in the payload (ISO 8601 with timezone).

Returns: JSON string with keys: status ("revoked"), mandate_id, principal_id, reason, revoked_at, principal_signature ({key_id, signed_at} or null), chain_hash, outstanding_tokens ({still_valid, last_expires_at}), outstanding_attestations ({still_valid, last_expires_at}). On error: {"error": "...", "code": "..."} with code mandate_not_found, mandate_already_revoked, invalid_input or a principal signature code.

Input Schema

NameRequiredDescriptionDefault
reasonYes
signed_atNo
mandate_idYes
principal_signatureNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

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 declares irreversibility, the authorization model, the requirement to build/sign a payload via prepare_revocation_signature, and precisely what the revocation blocks (new tokens, verify_mandate visibility, new sub-mandates). It also discloses the critical limitation that already-issued tokens and attestations stay valid until exp, surfaced via outstanding_tokens and outstanding_attestations.

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 core action and its finality, then authorization, then effect, then Args/Returns. Every sentence carries operational weight. It is long, and the Returns block partially restates the output schema, though the enumerated error codes add value the schema likely does not.

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 four-parameter, irreversible, signature-aware mutation, the definition covers authorization, signing prerequisites, environment overrides, timing of effect, non-revocable residuals, and error codes. An agent has everything needed to call it correctly without consulting a sibling or guessing at preconditions.

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 the description must compensate, and it does for all four parameters: mandate_id as a UUID, reason with a 1-500 character bound and a worked example, principal_signature as a Base64url Ed25519 signature of the revocation payload, and signed_at as the ISO 8601 timestamp placed in that payload. The relationship between signed_at and the signed bytes is the kind of meaning the schema alone could not convey.

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 ('Revoke a mandate') and immediately qualifies the scope with 'Final: a revoked mandate cannot be reactivated.' It is unambiguously distinct from siblings like create_mandate and prepare_revocation_signature, which is named as the prerequisite step rather than a substitute.

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?

Explicitly names who may call it ('only the mandate's own principal revokes it, for a sub-mandate that is the agent that delegated it'), the conditional path when a registered key exists, the AMR_REQUIRE_PRINCIPAL_SIGNATURE environment override, and the fallback exposure model 'like create_mandate'. When-to-use, prerequisite, and alternative paths are all covered.

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