Skip to main content
Glama

estimate_deploy_cost

Read-only

Estimates gas cost of deploying a DVM-BASIC smart contract, returns gascompute, gasstorage, and a plain-text breakdown explaining each value.

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.
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false. Description adds behavioral details: not fabricating breakdown when daemon returns 0/0 non-OK, returns structured error on compile failure, and clarifies that it is a composite using other tools. No contradictions.

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?

Well-structured with sections for when to call, input requirements, output format. While comprehensive, it could be slightly trimmed without losing clarity; still good.

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?

Completes the picture for a composite tool with no output schema: explains output structure fully, including null cases and error handling. Covers all needed context given tool complexity and sibling competition.

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 description adds significant meaning: sc must be full contract (not body), signer is for fee context, include_breakdown default true and when to set false. These go beyond the schema's basic descriptions.

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 it is a composite tool that estimates DVM-BASIC contract deploy costs, returning raw estimate, plain-text breakdown, parsed contract surface, and docs. It distinguishes itself from siblings like dero_get_gas_estimate by explicitly recommending this tool over chaining that.

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 or explaining costs—and advises preference over manual chaining. Specifies input requirements like sc must contain Function blocks, and when to set include_breakdown=false.

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

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