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

io.github.JC7333/mandatia

by JC7333

verify_mandate

Checks whether an AI agent holds an active, unexpired, unrevoked mandate, including valid parent sub-mandates, and returns its scope and perimeter for action verification.

Instructions

Verify whether an AI agent has a currently active and valid mandate to perform an action.

Looks up the most recent active, non-expired, non-revoked mandate for the given agent. For a sub-mandate, every mandate above it must also be active, unrevoked and unexpired. Does NOT check the action against the scope: it returns the free-text scope and, when the mandate has one, its structured perimeter. To enforce the perimeter, request a token with issue_action_token, which refuses out-of-scope actions.

Args: agent_id: Unique identifier of the agent to check. Example: "agent:korvex-advisor-v1" action: Description of the action the agent wants to perform. Example: "send investment recommendation" or "access user portfolio" context: Optional additional context for logging or audit purposes. Example: "client session cs-2026-0042"

Returns: JSON string with keys: authorized (bool), mandate_id (str|null), reason (str), scope (str), perimeter (dict|null), parent_mandate_id (str|null), organ_decision (dict|null: the body, title, date, reference and authorized personnel of the decision that authorized the agent, when the mandate records one), expires_at (str|null). authorized=True means an active mandate exists; the caller should verify that the action falls within the returned scope.

Input Schema

NameRequiredDescriptionDefault
actionYes
contextNo
agent_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.1/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 and does disclose meaningful traits: it looks up the most recent active/non-expired/non-revoked mandate, and requires every ancestor mandate of a sub-mandate to be active and unrevoked. It also flags the critical semantic that authorized=True only means a mandate exists, not that the action is in scope. It does not cover side effects (e.g., whether the lookup is logged, given the context param's audit purpose) or failure modes.

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 purpose and the key caveat before the Args/Returns blocks, and the scope-vs-perimeter warning sits where it matters. The examples under each arg are useful but slightly pad the length for such simple string parameters.

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

Completeness4/5

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

Complex verification semantics (mandate chain validity, scope versus structured perimeter, organ decision provenance) are covered well for a tool with no annotations. The Returns block partially duplicates the existing output schema, but it adds the crucial interpretation that authorized=True means 'mandate exists, verify scope yourself', which an agent needs to act correctly.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate, and it largely does: all three parameters get meaning plus concrete examples ('agent:korvex-advisor-v1', 'send investment recommendation'). The one gap is that it never says how 'action' influences the result, given the tool explicitly does not scope-check it — an agent may reasonably wonder whether action is used at all.

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 ('Verify whether an AI agent has a currently active and valid mandate') and immediately bounds the operation by noting it does NOT check the action against scope. This distinguishes it from the enforcement sibling issue_action_token, so an agent can choose between them without opening either schema.

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 routes enforcement work to issue_action_token ('which refuses out-of-scope actions') and explains that the caller must verify scope itself after authorized=True. It does not differentiate from the other closely-named sibling check_action_token, which leaves one real routing ambiguity for an agent choosing among mandate-verification tools.

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