Skip to main content
Glama

Request a fullmakt (broker a systembruker delegation)

request_fullmakt
Idempotent

Broker a legally-grounded, scoped company-to-agent authority via Altinn systembruker. Returns a delegation URL for company approval and persists the granted system user ID on your principal.

Instructions

Broker a fullmakt — a legally-grounded, scoped, revocable company→agent authority delegated through an Altinn systembruker. The tool brokers the delegation, persists it, and binds the returned system_user_id write-once onto the principal (pending → active). The company's signing authority must approve the returned delegation_url before the delegation is usable. Non-empty warnings[] on a 201 means the delegation exists upstream but a local follow-up degraded - reconcile, never blind-retry. Identical retries are dedup-safe (deterministic Idempotency-Key). Inputs: { agent_principal_id (uuid, YOUR OWN), org_number (9 digits), scopes (non-empty string[]), validity_days?, label? }. Failure modes: FULLMAKT_PRINCIPAL_NOT_FOUND, FULLMAKT_PRINCIPAL_NOT_ELIGIBLE, FULLMAKT_UPSTREAM_FAILED, SCOPE_INSUFFICIENT (needs read:altinn), VALIDATION_FAILED. To inspect the recorded state per principal, use check_fullmakt instead; to withdraw the delegation and retire the principal, use revoke_fullmakt instead. No sandbox mirror. Docs: https://www.apier.no/docs/fullmakt

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNoOptional consumer-supplied label for the delegation (dashboard display only; echoed back on the response).
scopesYesThe Altinn scopes the delegation should carry (e.g. `altinn:accessmanagement/authorizedparties.read`); at least one, each non-whitespace.
org_numberYes9-digit Norwegian organisasjonsnummer of the customer company granting the delegation. Plain 9 digits (no MOD-11 check), matching the route contract.
validity_daysNoOptional delegation validity window in days (1–3650; the 10-year cap matches Altinn's longest supported term). Omit to use the adapter default.
agent_principal_idYesThe agent principal (UUID) to bind this delegation to — one of YOUR OWN; an unknown or foreign id returns FULLMAKT_PRINCIPAL_NOT_FOUND.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
_metaNo
resultYesThe brokered delegation: `system_user_id`, `status`, `scopes`, `valid_until`, `delegation_url` (the approval link), the echoed `label`, the `agent_principal` snapshot, and `warnings[]` (empty on the clean path).
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 declare idempotentHint=true, but the description adds crucial behavioral context: the delegation is unusable until approval, warnings[] on 201 require reconciliation not retry, retries are dedup-safe via deterministic Idempotency-Key, and system_user_id is bound write-once. It also enumerates failure modes. This richly extends the annotation profile without contradicting it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but dense; every sentence serves a purpose. It front-loads the core purpose, then covers inputs, failure modes, warnings handling, idempotency, and sibling routing in a logical order. No filler or redundancy—given the tool's complexity, this length is warranted and well-structured.

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?

The description is exceptionally complete: it specifies input constraints, required approvals, idempotency guarantees, warning semantics, failure modes, and precise alternative tools. It even notes the lack of a sandbox mirror and links to docs. Despite having an output schema, it explains the write-once binding and the pending→active transition, which schema alone wouldn't convey. Nothing an agent needs to call correctly is missing.

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 description coverage is 100%, so the schema already documents all parameters. The description adds value by summarizing the input set with semantic emphasis: 'agent_principal_id (uuid, YOUR OWN)' reinforces ownership, 'org_number (9 digits)' underlines format, and 'scopes (non-empty string[])' clarifies constraints. It also flags the SCOPE_INSUFFICIENT failure mode, tying parameters to runtime behavior. This exceeds the baseline 3.

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 defines the tool with a specific verb ('Broker a fullmakt') and a precise resource ('legally-grounded, scoped, revocable company→agent authority delegated through an Altinn systembruker'). It clearly distinguishes it from siblings by naming alternatives: 'use check_fullmakt instead' and 'use revoke_fullmakt instead', so an agent can tell them apart.

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?

The description gives explicit when-to-use context: it brokers, persists, and binds the delegation, requires approval via delegation_url, and notes the 'No sandbox mirror' limitation. It provides clear exclusions by naming alternatives for inspection (check_fullmakt) and withdrawal (revoke_fullmakt), and states the required read:altinn scope for invocation.

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