Skip to main content
Glama

Principal 1-Tap Approve & Release Escrow

approve_task
DestructiveIdempotent

Approve a Principal-authorized task awaiting approval by recording escrow release or holdback entries and unlocking dependent tasks; requires the Principal’s secret token.

Instructions

Execute Principal-authenticated 1-Tap approval for a task in AWAITING_PRINCIPAL_APPROVAL, writing RELEASE (and optional HOLDBACK) entries to the immutable escrow ledger and unlocking downstream dependent tasks. SAFETY INVARIANT: Only call inside an explicitly Principal-authorized session holding the Principal’s secret token — untrusted worker agents cannot self-approve and receive HTTP 403 FORBIDDEN. For live Base Mainnet USDC tasks (currency="USDC"), a confirmed Base Mainnet ERC-20 USDC transfer onChainTxHash is required and independently verified on-chain.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "taskId": "<taskId>",
      "principalAuthToken": "<principalAuthToken>"
    },
    "name": "approve_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoOptional Principal approval note recorded in the immutable escrow ledger and audit log.
taskIdYesUnique ID of the task in `AWAITING_PRINCIPAL_APPROVAL` status to approve.
submissionIdNoOptional specific submission ID to approve (defaults to the latest pending submission).
onChainTxHashNoRequired for `USDC` jobs: confirmed Base Mainnet (Chain ID 8453) ERC-20 USDC Transfer transaction hash (`0x` + 64 hex chars), verified on-chain with anti-replay protection.
idempotencyKeyNoOptional deterministic idempotency key preventing duplicate payout releases on retry.
principalAuthTokenYesPrincipal secret authorization token (`x-principal-token`). Never held by untrusted worker agents; invalid tokens fail closed with 403 and log a SECURITY_ALERT.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.1.1
    • addedInput schema / properties / idempotencyKey / description
      Added value: +"Optional deterministic idempotency key preventing duplicate payout releases on retry."
    • addedInput schema / properties / idempotencyKey / maxLength
      Added value: +128
    • addedInput schema / properties / idempotencyKey / minLength
      Added value: +1
    • addedInput schema / properties / note / description
      Added value: +"Optional Principal approval note recorded in the immutable escrow ledger and audit log."
    • addedInput schema / properties / note / maxLength
      Added value: +500
    • changedInput schema / properties / onChainTxHash / description
      Previous value: -"Confirmed Base Mainnet USDC transfer tx hash (required for USDC jobs)."New value: +"Required for `USDC` jobs: confirmed Base Mainnet (Chain ID 8453) ERC-20 USDC Transfer transaction hash (`0x` + 64 hex chars), verified on-chain with anti-replay protection."
    • changedInput schema / properties / principalAuthToken / description
      Previous value: -"Principal secret authorization token (never held by untrusted worker agents)."New value: +"Principal secret authorization token (`x-principal-token`). Never held by untrusted worker agents; invalid tokens fail closed with 403 and log a SECURITY_ALERT."
    • addedInput schema / properties / submissionId / description
      Added value: +"Optional specific submission ID to approve (defaults to the latest pending submission)."
    • addedInput schema / properties / submissionId / minLength
      Added value: +1
    • addedInput schema / properties / taskId / description
      Added value: +"Unique ID of the task in `AWAITING_PRINCIPAL_APPROVAL` status to approve."
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructive/open-world/idempotent, so the bar is low, yet the description still adds substantial context: the immutable escrow ledger writes, the downstream task unlocking, the anti-self-approval safety invariant with its 403 failure mode, and independent on-chain verification of the USDC transfer. None of that is derivable from the 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?

Effect, then safety invariant, then the conditional on-chain requirement — a sensible front-loaded order with no filler sentences. It is a dense block of long clauses rather than cleanly separated lines, which slightly hurts scanability.

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 destructive, open-world mutation with no output schema, the description covers preconditions, side effects, failure modes, and idempotency expectations. It does not describe what a successful response contains (ledger entry IDs, payout amounts), which is the one remaining gap for a no-output-schema tool.

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 100%, so the baseline is 3; the description nevertheless adds meaning by framing `principalAuthToken` as the safety-critical credential that untrusted agents never hold, and by tying `onChainTxHash` to the `currency="USDC"` condition. It repeats rather than extends the schema for the remaining optional fields, keeping it out of the top score.

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?

States a specific verb and resource ('Execute Principal-authenticated 1-Tap approval for a task') plus the exact required status (`AWAITING_PRINCIPAL_APPROVAL`) and the side effects (RELEASE/HOLDBACK ledger entries, downstream task unlocking). An agent can distinguish this from `claim_task` or `submit_task` purely from this sentence.

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?

Gives an explicit precondition — only call inside a Principal-authorized session holding the secret token — and an explicit consequence for the wrong caller (403 FORBIDDEN), which tells a worker agent when not to call. It also states the conditional on-chain requirement for USDC tasks. It stops short of naming a sibling alternative for agents that lack Principal authority.

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