Skip to main content
Glama

warda

Build a settlement, collapsing a child back into its parent

warda_build_settlement

Assemble an unsigned transaction that ends a child grant and returns its UNSPENT remainder to the parent's budget, charging the parent only what the child actually spent. This is the other half of delegation: letting a child expire instead returns the money to the PRINCIPAL — to the human — which is no use to an agent mid-task. Returns TWO digests: the parent's half is signed by the parent's agent key, the child's by the revocation key. THIS SERVER NEVER SEES EITHER. prevRoot is the parent's reserve root from before this child was pushed; warda_build_delegation returns it as parentReserveRootBefore. It cannot be derived from anything on chain — a hash chain pops by preimage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
childYes
parentYesThe grant, as issued by the principal.
prefixNoAddress prefix: kaspa, kaspatest, kaspasim or kaspadev. Defaults to kaspatest.
feeSompiNoDefaults to 2000000 — two covenant inputs, so roughly twice a spend's mass.
prevRootYesThe parent's reserve root before this child was pushed.
childUtxoYes
parentUtxoYesThe grant's CURRENT UTXO. Its address moves after every spend, so a stale one will not be found.
computeBudgetNo

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses that the transaction is unsigned, that two digests are returned, which key signs each half, that the server never sees the digests, and that prevRoot comes from a prior delegation and cannot be derived on-chain. This is meaningful behavioral context beyond the schema.

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 not bloated; every sentence contributes either purpose, differentiation, return behavior, or parameter provenance. The main action is front-loaded, and the technical hash-chain note is relevant rather than decorative. It is slightly longer than necessary, but the added context earns its place.

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?

For a complex tool with nested objects, eight parameters, no output schema, and no annotations, the description covers the core workflow, return values, signing model, and the tricky prevRoot dependency. It does not spell out every parameter's format or failure cases, but it gives enough for an agent to understand the transaction shape and where to obtain the required prior value.

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 63%, and the description adds crucial semantics for prevRoot: where it comes from, why the delegation tool is the source, and why it cannot be reconstructed from chain data. It also clarifies the split-signing behavior, which helps agents understand how parent and child keys map to outputs. Not every parameter is elaborated, but the highest-risk parameter gets strong treatment.

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 uses a specific verb-resource pair: it assembles an unsigned transaction that ends a child grant and returns the unspent remainder to the parent's budget. It clearly distinguishes settlement from simply letting a child expire, and even names warda_build_delegation as the source of prevRoot, so an agent can tell this apart from its siblings.

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?

The description explains when settlement is appropriate: it is the useful mid-task counterpart to letting a child expire, which returns money to the principal instead of the parent budget. It also references warda_build_delegation for obtaining prevRoot. It does not explicitly state all alternative tools or exclusion cases, but the key contextual contrast is present.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.1/5.0
Disambiguation5/5

Each tool has a distinct role: build_* assembles different transaction types, check_* validates proposals, grant_* derives or reports grant state, and recover_grant restores state from chain data. Even the similar-looking exit and settlement are clearly separated by destination: principal versus parent budget.

Naming Consistency4/5

The set is mostly consistent with a warda_<verb>_<noun> pattern, e.g. build_delegation, check_spend, recover_grant. Two tools, grant_address and grant_authority, are noun phrases rather than verb_noun, so the pattern is not perfectly uniform.

Tool Count5/5

Nine tools is well within the ideal range and each tool covers a distinct part of the grant lifecycle: building, checking, querying, settling, exiting, and recovering. There is no obvious redundancy or unnecessary surface area.

Completeness4/5

The surface covers the core lifecycle well: delegation, spending, settlement, exit/revoke, address derivation, authority checks, and recovery. The main gap is that advisory checking is provided for spend and delegation but not for exit or settlement, so the validity of those operations must be worked around via covenant behavior or other tools.