Skip to main content
Glama

Verify a sub-agent's delegation chain (offline)

kya_verify_delegation
Read-onlyIdempotent

Verifies a signed delegation chain for an AI agent: checks signatures, depth, lifetime and mandates, returns the required signing key, and evaluates an action against every level.

Instructions

Free and offline. A sub-agent acts under a delegation chain signed by the credential's agent (KYA-Delegation header). Checks every link (signatures, depth, lifetime, each mandate contained in the one above) against the credential, returns the key that must sign the sub-agent's requests, and, when an action is given, evaluates it on every level: allowed only if all of them allow it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesThe KYA-Delegation header value (base64url), or the chain as a JSON array.
actionNoWhat the agent wants to do, lowercase (order, pay, quote, sign, ...).
amountNoAmount of this operation.
currencyNoBRL, USDC, ...
credentialYesThe credential (credential_id, agent, mandate, expires_at), e.g. the `credential` from kya_verify.
spent_todayNoWhat this agent already spent today, if you track it; needed for max_per_day (the issuer keeps no record of acts).
counterpartyNoYour CNPJ, domain or wallet address (the other side of the operation).
payment_networkNoPayment network of this operation: visa, mastercard, elo, pix, ...
payment_ref_sha256NoSHA-256 hex of the payment token reference or PAR used, never a card number.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and closed-world, so the bar is lower. The description adds real value beyond them: it is free/offline, describes the chain validation semantics, states the return (the key that must sign the sub-agent's requests), and explains that an action passes only if every level allows it.

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-loads the key qualifier ('Free and offline') and is dense with no filler. The middle sentence is long and comma-heavy, but every clause carries distinct information about what is checked.

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?

With no output schema, the description correctly explains the return value (the signing key) and the conditional action evaluation. For a read-only verification tool with 100% schema coverage, this covers what an agent needs, though it does not sketch the failure/return shape.

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

Parameters3/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 9 parameters thoroughly. The description adds the action-evaluation-on-every-level semantic that helps interpret action/amount, but adds little about the other params, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: verifying a sub-agent's delegation chain, and enumerates what it checks (signatures, depth, lifetime, mandate containment). It is clearly distinguishable from credential-level siblings, though it never names an alternative tool directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Establishes the context ('a sub-agent acts under a delegation chain') and the conditional behavior when 'action' is given, but offers no explicit when-to-use versus siblings like kya_check_action or kya_verify_paid. Usage is implied rather than routed.

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