Skip to main content
Glama

DERO MCP Server

explain_smart_contract

Read-only

Composite: fetch a DERO smart contract (code + variables + balances) and return its function surface, a classification of the contract pattern (tela_index | tela_doc | token | registry | minimal | generic), a plain-language narrative, and curated DVM docs citations re-ordered so the most relevant page is first. TELA contracts (apps/files) are detected first and cite the TELA spec; for a deep TELA parse use tela_inspect.

When to call: when the user wants to UNDERSTAND a smart contract — its functions, state shape, or which DVM concept to read about. PREFER this over chaining dero_get_sc with a docs lookup yourself: this composite already parses the DVM-BASIC source for function declarations, sorts stringkeys/uint64keys deterministically, and picks the right docs page from a heuristic so the agent does not have to learn DVM-BASIC syntax to summarize a contract.

Input Requirements:

  • scid is REQUIRED. Must be 64 hex chars (the smart contract id). Use 0000…0001 for the on-chain name registry as a known-good example.

  • topoheight is OPTIONAL. Provide to inspect the contract at a specific topo height; omit for latest tip.

Output: { scid, topoheight, kind, surface: { functions[], stringkeys[], uint64keys[], balances }, narrative, raw_code_length, has_code, related_docs }. kind is one of tela_index | tela_doc | token | registry | minimal | generic. surface.functions items are { name, args, returns }. has_code is false when the SCID is unknown or has no on-chain code; functions is then [] and the narrative explains the gap. raw_code_length is always present so the agent knows when to fall back to dero_get_sc for the full source.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scidYes64-char hex Smart Contract ID
topoheightNoOptional topo height; omit for latest tip

TDQS

A5/5.0
Behavior5/5

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

Beyond the read-only annotation, the description discloses significant behavioral details: it parses DVM-BASIC source, detects TELA contracts first, handles unknown SCIDs by setting has_code false and providing explanatory narrative, and always includes raw_code_length so the agent can decide when to call dero_get_sc. These details meaningfully extend beyond the 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 well structured and front-loaded with the composite result, followed by when-to-call, input requirements, and output shape. It is appropriately detailed for a complex tool with no output schema, and every section earns its place.

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?

With no output schema, the description provides a complete output contract, including field names, possible kind values, shape of surface functions, and behavior for unknown SCIDs. It also addresses the one likely failure mode (has_code false) and tells the agent when to fall back to dero_get_sc.

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?

Even though the schema covers 100% of parameter descriptions, the description adds valuable practical guidance: scid is required and must be 64 hex chars, with a known-good example `0000…0001`; topoheight is optional for inspecting a specific height and omitted for latest. This exceeds the schema's bare descriptions and helps the agent choose and format values correctly.

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?

Description uses a specific verb and resource: 'fetch a DERO smart contract' and returns a well-defined surface ('function surface, classification, narrative, curated docs citations'). It clearly distinguishes from siblings like dero_get_sc and tela_inspect by calling itself a composite and naming a fallback.

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?

The 'When to call' section explicitly states the intended use case ('user wants to UNDERSTAND a smart contract') and recommends preference over chaining dero_get_sc with a docs lookup. It also gives a direct alternative ('for a deep TELA parse use tela_inspect') and a fallback to dero_get_sc for full source.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose, with detailed descriptions that specify when to call it and how it differs from similar tools. Composite tools are well-defined, overlapping concerns are minimized.

Naming Consistency4/5

Tool names follow a general pattern: 'dero_' for core daemon RPC wrappers, 'tela_' for TELA-specific composites, and descriptive names for other composites. While mostly consistent, there are exceptions like 'audit_chain_artifact_claim' and 'dero_durl_to_scid' breaking the pattern slightly.

Tool Count4/5

With 32 tools, the server is comprehensive but slightly heavy. However, each tool serves a specific need in the DERO ecosystem, covering chain queries, docs, TELA, and composite analyses. The count is justifiable given the domain breadth.

Completeness4/5

The tool set covers core chain operations, documentation, TELA app lifecycle, and common analytical tasks. Minor gaps exist, such as lack of wallet interaction tools or transaction submission, but these are outside the apparent read-only/analysis scope.