Skip to main content
Glama

dero_get_sc

Read-only

Read smart contract state by SCID: retrieve source code and stored variables for DERO contract inspection.

Instructions

Read smart contract state (code and/or stored variables) by SCID via DERO.GetSC. This is the primary entry point for any contract inspection on DERO.

When to call: as the first step in any DVM contract investigation. Pair with dero_docs_search("DVM-BASIC") to interpret the returned code blob. PREFER citing dero_docs_search("smart contract") or dero_docs_get_page on a relevant DVM page so the user can interpret the contract's state model.

Input Requirements (CRITICAL):

  • scid MUST be exactly 64 hex characters (the contract id).

  • code is OPTIONAL (defaults to true). Set false to skip the source blob when you only need stored variables.

  • variables is OPTIONAL (defaults to true). Set false to skip variables when you only need the source.

  • topoheight is OPTIONAL. Omit or use -1 for the latest committed state.

Output: { code, balances, variables: { stringkeys, uint64keys }, ... }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scidYes64-char hex Smart Contract ID
codeNoInclude contract source (default true)
variablesNoInclude stored variables (default true)
topoheightNoTopo height; omit or use -1 for latest
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, confirming a safe read operation. The description adds useful behavioral details like default values for code and variables, the meaning of topoheight, and the output structure, going beyond what annotations provide without contradiction.

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 well-structured with sections for purpose, usage guidance, and critical input requirements. It is concise (every sentence adds value) and front-loads the main purpose, making it easy for an AI agent to parse efficiently.

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 the tool's complexity (4 parameters, no output schema), the description provides complete context: input constraints, optional behavior, default values, output format, and usage context with documentation tools. It covers all necessary information for correct invocation and interpretation.

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

Parameters4/5

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

Schema coverage is 100% with adequate descriptions, but the description adds value by grouping parameters, emphasizing the critical format constraint for scid (64 hex characters), and clarifying defaults and optionality, which enhances usability beyond the schema alone.

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 reads smart contract state (code and/or stored variables) by SCID and identifies it as the primary entry point for contract inspection on DERO, distinguishing it from sibling tools like dero_get_block or dero_get_transaction.

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 ('as the first step in any DVM contract investigation') and suggests pairing with dero_docs_search('DVM-BASIC') or citing relevant documentation pages for interpretation, providing clear guidance on when to use this tool versus alternatives.

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