Skip to main content
Glama

estimate_deploy_cost

Read-only

Estimate DVM-BASIC contract deployment cost before broadcasting, returning gascompute/gasstorage breakdown, parsed functions, and relevant docs.

Instructions

Composite: send a DVM-BASIC contract source to the daemon's gas estimator, then return the raw estimate alongside a plain-text breakdown (what each gas number means), the parsed contract surface, and curated DVM deploy docs as citations.

When to call: BEFORE asking a wallet to broadcast a deploy transaction, OR when explaining the cost of a contract to a user. PREFER this over chaining dero_get_gas_estimate yourself: this composite already explains gascompute vs gasstorage in plain language, parses the SC source to show what functions the user is about to deploy (reusing extractScSurface from explain_smart_contract), and protects against fabricating a breakdown when the daemon reports 0/0 with a non-OK status.

Input Requirements:

  • sc is REQUIRED. The full DVM-BASIC contract source — must contain at least one Function ... End Function block. A function body alone will fail with INVALID_INPUT.

  • signer is OPTIONAL. A dero1.../deto1... address that will sign the eventual deploy tx. The daemon uses it for fee context; omitting it still returns a meaningful estimate.

  • include_breakdown is OPTIONAL (default true). Set false when you only need the raw numbers (e.g. piping into a fee table).

Output: { estimate: { gascompute, gasstorage, status }, breakdown: { compute_note, storage_note, total_units } | null, signer_used, include_breakdown, sc_surface: { functions, stringkeys, uint64keys, raw_code_length, function_count }, related_docs }. breakdown is null when include_breakdown=false OR when the daemon returned 0/0 with a non-OK status (never fabricated). On DVM compile failure the composite returns a structured _meta.error with code INVALID_INPUT and the daemon's exact compile message in _meta.error.raw.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scYesDVM-BASIC contract source to deploy. MUST be the full contract (Function ... End Function blocks), not a function body alone.
signerNoOptional dero1.../deto1... signer for the eventual deploy tx.
include_breakdownNoDefault true. Set false to return raw estimate numbers only.
Install Server

TDQS

A5/5.0
Behavior5/5

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

Annotations already mark this read-only and non-destructive, and the description adds meaningful behavioral detail: it never fabricates a breakdown when the daemon returns 0/0 with non-OK status, and it returns structured errors on DVM compile failure. No contradiction with annotations.

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?

The description is long but every section earns its place: purpose, when-to-use, input requirements, and output shape. It is well-organized with clear labels and no redundant repetition of schema-only details.

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?

Given there is no output schema, the description fully specifies the return shape, conditional null behavior, error behavior, and input constraints. For a composite tool with multiple moving parts, nothing critical is left unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds important semantics beyond schemas: sc must contain complete Function blocks or it fails with INVALID_INPUT, signer gives the daemon fee context but is optional, and include_breakdown defaults to true with a defined effect on output.

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 composite action: sending DVM-BASIC source to the daemon's gas estimator and returning the estimate, breakdown, contract surface, and docs. It clearly distinguishes itself from the sibling dero_get_gas_estimate by saying this composite should be preferred.

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?

Explicitly states when to call (before broadcasting a deploy tx or when explaining contract cost) and when to prefer it over dero_get_gas_estimate. Also gives concrete conditions for setting include_breakdown to false.

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

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/DHEBP/dero-mcp-server'

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