Skip to main content
Glama

tela_get_doc_content

Read-only

Extract the actual file content (HTML, CSS, JS) stored in a TELA-DOC-1 smart contract on the DERO blockchain. Decompresses gzip files and paginates large outputs.

Instructions

Composite: fetch the actual file content stored in a TELA-DOC-1 contract. A DOC's file (HTML/CSS/JS/...) lives inside a DVM-BASIC comment block in the contract code — NOT in a stored variable — so this tool fetches DERO.GetSC, confirms the SCID is a DOC, and extracts the file bytes. Gzip-compressed files (a .gz filename, the TELA-CLI default) are transparently base64-decoded + decompressed to plaintext. Large files paginate via offset.

When to call: when a user wants to READ or inspect the actual code/markup a TELA app file holds (e.g. "show me the HTML of this TELA DOC", "what does this app's app.js contain"). Get DOC SCIDs from tela_inspect on an INDEX first. PREFER this over dero_get_sc: that returns the raw DVM contract wrapper; this extracts just the embedded file content and reports docType, size, and signature presence.

Input Requirements:

  • scid is REQUIRED. Must be 64 hex chars and reference a TELA-DOC-1 contract (an INDEX or non-TELA SCID returns INVALID_INPUT with guidance).

  • offset is OPTIONAL. Byte offset into the extracted content; pass next_offset to read the next chunk of a large file.

  • topoheight is OPTIONAL. Omit for the latest committed state.

Output: { scid, topoheight, filename, doc_type, sub_dir, content_embedded, content, content_offset, content_length, content_truncated, next_offset, compressed, decompressed, stored_filename, signature, signature_note, note, narrative, related_docs }. content is the plaintext file (a 60000-char chunk; paginate via next_offset), or null when content is not embedded (DocShard/STATIC/external). compressed is true for .gz files; decompressed is true when this tool gunzipped them (filename then strips .gz; stored_filename keeps the on-chain name). The contract's author signature presence is reported but NOT cryptographically verified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scidYes64-char hex Smart Contract ID of a TELA-DOC-1 file contract
offsetNoByte offset into the extracted file content; use next_offset to paginate large files
topoheightNoOptional topo height; omit for latest committed state
Behavior5/5

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

Annotations declare readOnlyHint=true and destructiveHint=false. The description adds extensive behavioral context: it explains the composite operation (fetches DERO.GetSC, confirms SCID is a DOC, extracts bytes), transparent handling of gzip decompression, pagination via offset, and details about output fields like compressed and decompressed flags. 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 well-structured: begins with a bold purpose statement, then explains the mechanism, provides usage guidance, lists input requirements, and summarizes output. Every sentence adds value without redundancy. It is front-loaded with the core purpose.

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?

Despite having no output schema, the description details the output structure with all fields (including content, compressed, decompressed, etc.). It covers edge cases like non-embedded content (DocShard/STATIC/external), pagination, and decompression. The description is complete for an AI agent to correctly invoke the tool and interpret results.

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 description coverage is 100%. The description reinforces parameter semantics: scid is required, must be 64 hex chars and reference a TELA-DOC-1 contract; offset is optional and used for pagination; topoheight is optional. It also explains validation behavior (returns INVALID_INPUT for non-DOC SCIDs), adding value beyond the schema.

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's purpose: fetching file content from a TELA-DOC-1 contract. It specifies that the content is stored in a DVM-BASIC comment block, not a stored variable, and distinguishes itself from dero_get_sc which returns the raw wrapper. This provides a specific verb+resource and differentiates from siblings.

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 description explicitly says 'When to call: when a user wants to READ or inspect the actual code/markup' and advises getting DOC SCIDs from tela_inspect first. It also states 'PREFER this over dero_get_sc', giving 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