Skip to main content
Glama

Decode SCALE data

subtensor_decode
Read-onlyIdempotent

Decode SCALE-encoded hex into labelled fields with RAO→TAO and hex→SS58 conversions applied. Omit pallet and name to identify an event or call from its two-byte (pallet index, item index) prefix — the usual case when you have bytes and want to know what they are.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "hex": "<hex>"
    },
    "name": "subtensor_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
hexYesSCALE-encoded bytes as hex, with or without a 0x prefix. Whitespace is ignored.
kindNoWhat the bytes are: 'event' (default), 'call', or 'value' for a bare value of a given type
nameNoEvent or call name. Must be given together with "pallet".
typeNoFor kind="value": the SCALE type to decode against, e.g. "u64", "AccountId", "Vec<u16>", "Option<u32>"
formatNoResponse format: 'text' (compact, default) or 'json' (structured)
palletNoPallet of the event or call. Omit together with "name" to identify the item from the byte prefix instead.

Output Schema

NameRequiredDescriptionDefault
kindYes
inputYes
fieldsYes
trailing_bytesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds real behavioral context the annotations do not carry: that output values are converted (RAO→TAO, hex→SS58) and that identification falls back to the (pallet index, item index) prefix when pallet/name 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler. The core purpose and its conversions come first, and the second sentence is entirely spent on the one genuinely ambiguous decision an agent faces: the pallet/name vs prefix mode.

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?

An output schema exists, so return values need not be described. With 6 params at 100% coverage and the mode-selection rule spelled out, an agent has everything needed to invoke this correctly in either mode.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents hex, kind, type, format, pallet and name, including the enum options. The description only re-states the pallet/name omission coupling, adding no syntax or format detail beyond the structured fields; baseline 3 applies.

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?

States a specific verb (decode) plus the resource (SCALE-encoded hex) and even the transformations applied (RAO→TAO, hex→SS58). The sibling set is all retrieval/explanation tools, so 'decode bytes' is unambiguous without naming any of them.

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?

Explicitly tells the agent how to pick between the two modes: give pallet+name, or omit both to let the two-byte prefix identify the item, and notes that prefix-based identification is 'the usual case'. That is clear operational guidance, though it does not name an alternative sibling tool for cases this one cannot handle.

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.

Resources