Skip to main content
Glama

Resolve a transaction Plan to unsigned bytes (dev tool)

build_plan_tx
Read-onlyIdempotent

Resolve a declarative blocktools Plan (JSON text) against a Context (JSON text: evm nonce, gas, max_fee_per_gas, priority_fee; utxo fee_rate) to UNSIGNED bytes: evm returns unsigned_tx (EIP-1559 hex), utxo returns a psbt with fee, vsize and outputs. The account family is not built here (family_not_built). Signs nothing; the user's wallet signs. Pure, offline computation (blocktools); nothing is fetched or stored. How to combine this with the other tools: swapchan_playbook (workflows: find-money, best-swap, rebalance, revoke-approvals, bridge-stuck, token-safety, recover-old-wallet).

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": {
      "plan": "<plan>"
    },
    "name": "build_plan_tx"
  }
}

Input Schema

NameRequiredDescriptionDefault
planYesPlan JSON text
contextNoContext JSON text (default {})

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld=false, and the description goes well beyond them: it names the failure mode (family_not_built), states that signing happens in the user's wallet, confirms no network or persistence side effects, and sketches the return payload per chain family. This is exactly the behavioral context annotations cannot express.

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-loaded with the verb, inputs, and outputs, and the per-family return detail is packed efficiently into one clause. The trailing playbook pointer is useful but slightly tacked on, and the run-on sentence carries more clauses than an agent needs at first read.

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 steps in to describe return values for both families and covers side effects and the unsupported-family error. The remaining gap is that the Plan JSON format itself (a 30k-char required string) is never characterized, so an agent still needs outside knowledge to construct one.

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 earns above that by expanding the opaque 'context' string into its actual fields (evm nonce, gas, max_fee_per_gas, priority_fee; utxo fee_rate). It does not, however, describe the structure of the required 'plan' string, which is the tool's central input.

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 ('Resolve a declarative blocktools Plan ... to UNSIGNED bytes') and then enumerates the two concrete outputs per family (unsigned_tx EIP-1559 hex; psbt with fee, vsize, outputs). An agent can immediately tell this is a plan-resolution/encoding step, distinct from siblings like broadcast_tx or sign flows.

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 clear operating context: pure offline computation, nothing fetched or stored, signs nothing, and the account family is explicitly unsupported (family_not_built). It routes workflow questions to swapchan_playbook. What it lacks is explicit differentiation from the many other build_* siblings (build_swap_tx, build_revoke_tx, build_limit_order), so the agent must infer when to pick this one over those.

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.