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

io.github.JC7333/mandatia

by JC7333

export_insurer_dossier

Generate a signed insurer dossier for a mandate over a chosen period, consolidating scope, status, events, actions, and integrity checks for insurer or auditor review.

Instructions

Export a signed insurer dossier for a mandate over a period.

The dossier puts in one signed document what an insurer or an auditor asks about an AI agent: who granted the mandate, its perimeter (allowed and forbidden action types, right to delegate, amount limit), whether it is in force or cut (status, expiry, broken delegation chain), its sub-mandates, the status events, actions and action tokens of the period, and the integrity checks (action log chain, principal signature). Facts from the registry only, plus a fixed list of the dossier's limits. Read-only: nothing is written to the registry.

The dossier is signed with the registry's Ed25519 key as a JWS (EdDSA) whose payload is the canonical JSON of the dossier. Verify it offline with amr.proof.insurer_dossier.verify_dossier and the registry public key obtained out of band.

Args: mandate_id: UUID of the mandate to export. Example: "550e8400-e29b-41d4-a716-446655440000" period_start: Optional ISO 8601 start of the period (naive = UTC). Defaults to the mandate's creation. Example: "2026-10-01T00:00:00Z" period_end: Optional ISO 8601 end of the period (naive = UTC). Defaults to now. Example: "2026-10-31T23:59:59Z" format: "json" (default) or "html" to also get a printable page.

Returns: JSON string with keys: - dossier: dict (dossier_version, generated_at, period, mandate, status, integrity, sub_mandates, sub_mandates_truncated, events, actions, tokens, limits) - dossier_sha256: hex SHA-256 of the canonical dossier - signature: {jws, algorithm "EdDSA", key_id, public_key_pem} - html: printable page (only when format is "html") On error: {"error": "..."}.

Input Schema

NameRequiredDescriptionDefault
formatNojson
mandate_idYes
period_endNo
period_startNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so thoroughly: read-only with 'nothing is written to the registry', facts sourced from the registry only, signing scheme (Ed25519 key, JWS EdDSA over canonical JSON), a declared digest and public key in the response, an explicit limits list, sub_mandates_truncated signalling, and error shape. An agent knows the safety profile, output contract, and verification path before calling.

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?

Purpose is front-loaded in one sentence, then structured into Args and Returns sections that are easy to scan. The Args detail is justified by the empty schema descriptions, but the Returns block partly restates an existing output schema, making the definition longer than strictly necessary.

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 one-required-parameter export tool with no annotations and undocumented schema fields, everything an agent needs is present: what is produced, what it is signed with, how to verify it, parameter formats and defaults, and the error path. Nothing material is left to inference.

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: mandate_id is documented as a UUID with an example, both period bounds are documented as optional ISO 8601 with naive-UTC semantics, concrete defaults (mandate creation / now), and format is documented as json (default) vs html with its extra payload. This adds meaning well beyond the bare string/null types in the schema.

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?

The opening sentence gives a specific verb+resource+scope: 'Export a signed insurer dossier for a mandate over a period.' The body then enumerates exactly what the dossier contains (mandate, perimeter, status, sub-mandates, events, actions, tokens, integrity checks), which is far more specific than any sibling (get_proof, verify_mandate) and lets an agent distinguish the tool without opening the 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?

It establishes the audience and trigger ('what an insurer or an auditor asks about an AI agent') and explicitly states the read-only nature, plus a follow-up workflow (verify offline with verify_dossier and the out-of-band public key). It stops short of a 5 because it never names sibling alternatives (get_proof, verify_mandate, list_action_contests) or states when this tool is the wrong choice.

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