Skip to main content
Glama
Simplicity MCP Server

Simplicity MCP Server

contract_spend

Spends funds from a Simplicity contract by submitting a base64 program with a witness file and optional UTXO and destination details.

Instructions

Spend funds from a Simplicity contract

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": {
      "program": "<program>",
      "witness_file": "<witness_file>"
    },
    "name": "contract_spend"
  }
}

Input Schema

NameRequiredDescriptionDefault
programYesBase64-encoded Simplicity program
utxo_txidNoTransaction ID of UTXO to spend
utxo_voutNoOutput index of UTXO to spend
destinationNoDestination address
witness_fileYesPath to witness file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full disclosure burden and largely drops it. It does not state that this is an irreversible fund-moving mutation, what happens if the witness file fails validation, whether destination defaults are possible when utxo/destination are omitted, or whether fees are handled internally.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single sentence is front-loaded and free of padding, which is good, but the brevity comes at the cost of under-specification rather than efficiency. There is no structure signaling prerequisites, effects, or return behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter, fund-moving mutation with no annotations and no output schema, this description is far too thin. An agent needs to know the preconditions, the irreversibility, and what the call produces (a transaction? a txid?) — none of which is present.

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 all five parameters are already documented in the schema and the baseline of 3 applies. The description adds nothing beyond the schema — notably it does not clarify the relationship between the two required parameters (program, witness_file) and the three optional ones (utxo_txid, utxo_vout, destination), nor whether those optionals are jointly required in practice.

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?

The description names a specific verb and resource ("Spend funds from a Simplicity contract"), which is clear enough to distinguish it from read-only siblings like elements_get_transaction or simplicity_analyze. However, it does not differentiate itself from adjacent write-path tools such as contract_deploy or pset_finalize, leaving the agent to infer where this fits in a signing/spending workflow.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no stated prerequisites (e.g., that the contract must already be deployed and funded at the referenced UTXO), and no mention of alternatives or follow-up steps. The agent must infer the entire invocation context from the parameter names alone.

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