Skip to main content
Glama

Redeem an action grant

redeem_action_grant
Destructive

Spend the single-use grant request_action gave you, immediately before the allowed action, and act only if the answer is redeemed. A grant is good for one action; any other answer means do not act. Details: maplith://docs/mcp. Needs: a key with an action policy (Sources › Agents), where Maplith signs grants.

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": {
      "grant_id": "<grant_id>",
      "request_id": "<request_id>",
      "digest": "<digest>",
      "system": "<system>",
      "operation": "<operation>",
      "target_kind": "<target_kind>"
    },
    "name": "redeem_action_grant"
  }
}

Input Schema

NameRequiredDescriptionDefault
digestYesThe grant's digest, passed through unchanged.
systemYesThe system you act in, e.g. "payments"; checked against the request.
grant_idYesFrom the grant request_action returned.
operationYesThe operation, e.g. "issue_refund"; checked against the request.
request_idYesThe request your job names, NOT copied from the grant.
target_kindYesWhat you act on, e.g. "order"; checked against the request.
param_digestNoCompute base64url(HMAC-SHA256(key: base64url-decoded param_salt, message: 'maplith-action-params/v1' + newline + canonical {system, operation, target, params} as sent to request_action)). Recipe: maplith://docs/mcp.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / properties / digest / description
      Previous value: -"The grant's digest, passed through unchanged: proof you hold what Maplith issued, not a check on the action (param_digest binds that)."New value: +"The grant's digest, passed through unchanged."
    • changedInput schema / properties / grant_id / description
      Previous value: -"The grant_id from the grant request_action returned."New value: +"From the grant request_action returned."
    • changedInput schema / properties / operation / description
      Previous value: -"The operation you are about to perform, e.g. \"issue_refund\". Checked against the request the grant was issued for."New value: +"The operation, e.g. \"issue_refund\"; checked against the request."
    • changedInput schema / properties / param_digest / description
      Previous value: -"Compute base64url(HMAC-SHA256(key: base64url-decoded param_salt, message: 'maplith-action-params/v1' + newline + canonical {system, operation, target, params} as sent to request_action)); never copy it. Recipe: maplith://docs/mcp."New value: +"Compute base64url(HMAC-SHA256(key: base64url-decoded param_salt, message: 'maplith-action-params/v1' + newline + canonical {system, operation, target, params} as sent to request_action)). Recipe: maplith://docs/mcp."
    • changedInput schema / properties / request_id / description
      Previous value: -"The request your job says you are fulfilling, taken from the job, NOT copied from the grant, or the check compares the grant with itself."New value: +"The request your job names, NOT copied from the grant."
    • changedInput schema / properties / system / description
      Previous value: -"The system you are about to act in, as the catalogue names it, e.g. \"payments\". Checked against the request the grant was issued for."New value: +"The system you act in, e.g. \"payments\"; checked against the request."
    • changedInput schema / properties / target_kind / description
      Previous value: -"The kind of thing you are about to act on, e.g. \"order\". Checked against the request the grant was issued for."New value: +"What you act on, e.g. \"order\"; checked against the request."
  2. Changed3 schema fields changed
    • changedInput schema / properties / digest / description
      Previous value: -"The grant's digest, exactly as it was given to you. Pass it through unchanged: it is a bearer factor — proof you hold what Maplith issued — and NOT a check on the action, because Maplith hashes the parameters in the masked form it stored, so an executor cannot recompute it from the values it holds. What binds the action is system, operation and target_kind, and param_digest."New value: +"The grant's digest, passed through unchanged: proof you hold what Maplith issued, not a check on the action (param_digest binds that)."
    • changedInput schema / properties / param_digest / description
      Previous value: -"The parameter binding, COMPUTED by you: base64url(HMAC-SHA256(key = the grant's param_salt, base64url-decoded; message = 'maplith-action-params/v1' + newline + the canonical encoding of {system, operation, target: {kind, id}, params} of the action you are about to perform, exactly as it was sent to request_action)). Never copy it out of the grant. Required for every grant that carries a param_salt."New value: +"Compute base64url(HMAC-SHA256(key: base64url-decoded param_salt, message: 'maplith-action-params/v1' + newline + canonical {system, operation, target, params} as sent to request_action)); never copy it. Recipe: maplith://docs/mcp."
    • changedInput schema / properties / request_id / description
      Previous value: -"The request your job says you are fulfilling -- taken from the job you were handed, NOT copied out of the grant, or the check compares the grant with itself. Checked against the grant."New value: +"The request your job says you are fulfilling, taken from the job, NOT copied from the grant, or the check compares the grant with itself."
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructive=true, openWorldHint=true and non-idempotent, so the safety profile is known. The description goes further than the structured data by disclosing single-use semantics ("good for one action"), the failure contract ("any other answer means do not act"), and an auth requirement (a key with an action policy where Maplith signs grants) — all behavior an agent would otherwise get wrong.

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 core instruction is front-loaded in the first clause, with constraints and prerequisites following in descending order of importance. A little friction comes from the terse "Details: maplith://docs/mcp" pointer and the compact "Needs:" fragment, but no sentence is filler.

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 7-parameter, destructive, non-idempotent tool with no output schema, the description supplies what the schema cannot: sequencing, the single-use constraint, auth prerequisites, and the success/failure branch. Parameter detail is fully delegated to a 100%-covered schema, so nothing an agent needs to call this correctly is missing.

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%, including a full recipe for param_digest, so the schema carries parameter meaning. The description adds only framing (the grant comes from request_action, the action must follow) and points to maplith://docs/mcp rather than explaining any field 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 states a specific verb and resource: "Spend the single-use grant request_action gave you." It explicitly ties the grant to its sibling request_action, so an agent can tell which of the two it is holding and what this call does with it.

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?

It gives an explicit ordering rule ("immediately before the allowed action") and an explicit decision rule ("act only if the answer is redeemed … any other answer means do not act"). It also names the prerequisite (a key with an action policy) and the source of the input (request_action).

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.

Resources