Skip to main content
Glama
DrVelvetFog

kaspa-script-mcp

by DrVelvetFog

estimate_script_cost

Estimate a Kaspa script's compute cost before signing: get script units, compute-mass grams, share of the 500,000-gram block limit, and the minimum per-input compute budget to commit, helping avoid ExceededCommittedScriptUnits.

Instructions

Estimate a Kaspa script's compute cost: script units, compute-mass grams, share of the 500,000-gram block compute limit, and the minimum per-input compute budget to commit. Approximate; use it to size a compute budget before signing and to avoid ExceededCommittedScriptUnits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
script_hexYesScript bytes as hex.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that the estimate is 'Approximate' and that it is meant for pre-signing budget sizing, implying no side effects. It could add more about what happens on invalid hex or exactness, but the key behavioral trait is well covered.

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

Conciseness5/5

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

Two sentences, no filler. The output list is front-loaded, and the approximate nature and use case follow immediately. Every sentence earns its place.

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?

No output schema exists, so the description compensates by listing the returned values: script units, compute-mass grams, share of the block limit, and minimum per-input budget. It omits potential error handling for invalid scripts, but for a single-parameter estimator this is quite complete.

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 the baseline is 3. The description adds little beyond 'script_hex' being the script to estimate; it doesn't clarify encoding or edge cases. This matches the baseline exactly.

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 ('Estimate') and a specific resource ('Kaspa script's compute cost'), then enumerates the concrete outputs. It is clearly distinct from siblings like disassemble_script, explain_script_error, and lookup_opcode, which target different operations.

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?

The description gives clear usage context: 'use it to size a compute budget before signing and to avoid ExceededCommittedScriptUnits.' It doesn't explicitly say when not to use or name alternatives, but the intended scenario is clear and non-overlapping with the sibling tools.

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