Skip to main content
Glama

dero_get_sc

Read-only

Retrieve a DERO smart contract's source code and stored variables by its 64-character SCID to inspect contract state. Use as the first step in any DVM contract investigation.

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
codeNoInclude contract source (default true)
scidYes64-char hex Smart Contract ID
variablesNoInclude stored variables (default true)
topoheightNoTopo height; omit or use -1 for latest
Install Server

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false, and the description is consistent with that. The description adds valuable behavioral context beyond annotations: default values for code and variables, the meaning of topoheight (-1 for latest), the critical 64-hex scid requirement, and an outline of the output structure. This gives the agent a clear mental model of what happens when parameters are omitted.

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?

The description is longer than average but well-structured with clear sections: purpose, when-to-call, input requirements, and output. The most important information is front-loaded (what the tool does, then when to call). Some redundancy exists with the schema (defaults are repeated), but each line adds or reinforces useful context, so the length is justified.

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?

For a read-only, one-required-parameter tool with 100% schema coverage, the description covers everything needed: input validation, optional parameter behavior, output shape, and guidance on how to interpret results via docs. The presence of an output description compensates for the lack of an output schema. No significant information is missing for an agent to invoke this tool correctly.

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%, so the baseline is 3. The description reinforces the schema's defaults but also adds extra meaning for parameters: 'Set false to skip the source blob when you only need stored variables' and 'Set false to skip variables when you only need the source.' These usage-oriented explanations go beyond the schema's simple 'Include ...' descriptions, justifying a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Read smart contract state') and the resource (code and/or stored variables by SCID). It also frames the tool as 'the primary entry point for any contract inspection on DERO', which gives a sense of scope. However, it does not explicitly name sibling tools like explain_smart_contract to differentiate itself, so the distinction is implied rather than stated.

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 provides an explicit 'When to call' section: 'as the first step in any DVM contract investigation.' It also recommends pairing with dero_docs_search and tells the agent to prefer citing docs pages for user interpretation. It does not explicitly mention when NOT to use this tool or how it contrasts with explain_smart_contract, so it lacks exclusions for alternative tools.

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