Skip to main content
Glama

execute_hook

Simulate a Xahau Hook by running its real WebAssembly bytecode in a local VM against a mock transaction and ledger state, reporting the accept or reject decision, state writes, and emitted transactions.

Instructions

GROUNDBREAKING: actually RUN a Hook's real WebAssembly bytecode in a local VM against a simulated transaction + ledger state, and report the true accept/rollback decision, return code/string, state writes, emitted txns and execution trace. The first dev-accessible Hook simulator that needs no xahaud node. Implements a subset of the Hook API; unsupported calls are recorded (fidelity LOCAL_VM, never faked).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateNoinitial hook state: 32-byte key hex -> value hex
txTypeNooriginating tx type, e.g. "Payment"
feeBaseNo
networkNomainnet
wasmHexNo
otxnBlobNofull originating-txn serialized blob hex (enables otxn_slot)
ledgerSeqNo
hookParamsNo
otxnFieldsNofield-id -> hex value of originating-txn fields the hook reads
otxnParamsNootxn param name -> hex value
wasmBase64No
keyletBlobsNo32-byte ledger index hex -> serialized object hex, for slot_set
hookAccountIdNo20-byte account-id hex the hook is installed on
resolveKeyletsNoif true, fetch any slot_set'd ledger objects live and re-run (async pre-resolve)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
exitNo
errorNo
traceNo
caveatNo
emittedNo
degradedNo
fidelityNo
returnCodeNo
stateWritesNo
returnStringNo
stateAppliedNo
wantedKeyletsNo
syntheticCallsNo
resolvedKeyletsNo
unsupportedCallsNo
foreignStateWritesNo
wantedForeignStateNo
resolvedForeignStateNo
Behavior4/5

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

The description discloses key behavioral traits: it runs real bytecode (not faked), records unsupported API calls with fidelity LOCAL_VM, and does not require a xahaud node. Given no annotations, this provides sufficient transparency for safe invocation, though it could mention the simulation's accuracy limits or performance characteristics.

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 description is a single dense paragraph with a marketing introductory word 'GROUNDBREAKING', which adds minimal informational value. It conveys necessary information but could be more structured (e.g., bullet points) and remove hyperbolic language to improve conciseness.

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?

Given 14 parameters, an output schema, and no annotations, the description covers the tool's purpose, inputs (simulated transaction and ledger state), and outputs (decision, return code, state writes, emitted txns, execution trace). It lacks explicit mention of parameter defaults or required fields but is sufficient for an informed agent to understand the tool's scope.

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 57%, with some parameters like state and txType described in the schema. The tool description adds overall context (simulating transaction and ledger state) but does not explain individual parameters beyond what the schema provides. For parameters without schema descriptions (e.g., feeBase, ledgerSeq), the description offers no additional guidance.

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 clearly states the tool runs real Hook WebAssembly bytecode in a local VM, simulating a transaction and ledger state, and reports the true accept/rollback decision, return code, state writes, emitted transactions, and execution trace. It distinguishes itself as the first dev-accessible Hook simulator without needing a node, setting it apart from siblings like simulate_hook_trigger.

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

Usage Guidelines3/5

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

The description implies use when simulating a Hook locally without a node, but does not explicitly state when to use or avoid this tool compared to alternatives like hook_dry_run or simulate_hook_trigger. No exclusions or prerequisites are mentioned, leaving the agent to infer usage context from the tool's capabilities.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Hugegreencandle/xahau-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server