Skip to main content
Glama

Revoke a fullmakt (retire a delegation + its principal)

revoke_fullmakt
DestructiveIdempotent

Revoke a delegated authority for a Norwegian company, permanently ending an agent's access. Immediate and idempotent, with outcome tokens for verification.

Instructions

Revoke a fullmakt — withdraw an agent's delegated authority for a Norwegian company and retire the agent principal (broker with request_fullmakt, inspect with check_fullmakt). Given ONLY the agent_principal_id (system_user_id and org_number resolve server-side from the write-once binding, so a client cannot redirect the revoke), Apier revokes the bound delegation and flips the principal to terminal revoked — never resurrected; create a new principal to act again. LOCAL revocation is authoritative and immediate. Idempotent: an already-revoked principal/delegation is a 200 no-op. warnings[] carries NAMED outcome tokens (principal_revoke_failed, delegation_not_found, upstream_revoke_unconfirmed) - read the specific token, not just array emptiness. Input: { agent_principal_id (uuid), reason? (audit-only) }. Failure modes: FULLMAKT_PRINCIPAL_NOT_FOUND, SCOPE_INSUFFICIENT (needs read:altinn), VALIDATION_FAILED. No sandbox mirror — a sandbox bearer gets SANDBOX_TOOL_UNAVAILABLE. Docs: https://www.apier.no/docs/fullmakt

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoOptional operator-facing reason, recorded on the audit row only. Send content or omit — an empty string is rejected.
agent_principal_idYesThe agent principal (UUID) whose delegation to revoke — one of YOUR OWN; an unknown or foreign id returns FULLMAKT_PRINCIPAL_NOT_FOUND.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
_metaNo
resultYesThe revocation outcome: `revoked: true`, the `agent_principal` snapshot, and `warnings[]` (empty on the clean path; NAMED tokens otherwise).
metadataYes
justificationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already show destructiveHint=true, but the description adds critical behavioral detail: revocation flips the principal to terminal 'revoked' (irreversible), is idempotent (200 no-op on already-revoked), and warnings[] carries named tokens (principal_revoke_failed, etc.). It also notes the tool is local-authoritative and immediate. No contradiction with annotations.

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?

The description is dense but well-structured, front-loading purpose and key constraints, then moving to behavior, idempotency, warnings, input, and failure modes. Every sentence adds value; no redundancy. Slightly long but justifiably so given the complexity.

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 destructive, irreversible mutation with warning tokens and failure modes, the description is remarkably complete. It covers when to use, behavior, idempotency, warning interpretation, input format, failure modes, and sandbox limitation, plus a docs link. The output schema is present, so return values are covered structurally. Nothing critical is missing.

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 covers both parameters with descriptions, but the description adds crucial semantics: agent_principal_id resolves server-side (so client cannot redirect), reason is audit-only, and empty reason is rejected. It also specifies failure modes tied to parameters (unknown id returns FULLMAKT_PRINCIPAL_NOT_FOUND). This significantly enriches understanding beyond 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 description clearly states the tool's purpose: revoke a fullmakt (delegation) and retire the agent principal. It uses a specific verb ('revoke'), names the resource ('fullmakt'), and explicitly differentiates from siblings ('broker with request_fullmakt, inspect with check_fullmakt'), making its place in the API obvious.

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?

Provides explicit usage guidance: mentions this tool is for revocation, while request_fullmakt is for creating (broker) and check_fullmakt for inspection. It also explains constraints (only agent_principal_id needed, server-side resolution prevents redirecting) and the terminal consequence ('never resurrected; create a new principal to act again'), which tells the agent when to choose this tool and what to expect.

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