Skip to main content
Glama

Address detect / validate / convert / script (dev tool)

address_tool
Read-onlyIdempotent

Work with public crypto addresses: op=detect (every chain/format an address fits; forks share version bytes, so expect several, e.g. a D... address returns doge, dgb and pivx; detect/validate support does not mean SwapChan can scan or sweep that chain), validate (address + chain), convert (address to another chain's format, e.g. BTC→LTC), cashaddr_to_legacy / legacy_to_cashaddr / cashaddr_decode / cashaddr_encode (Bitcoin Cash; prefix for to_cashaddr; encode takes kind p2pkh|p2sh + hash hex [+ prefix]), to_script (address+chain → scriptPubKey hex), from_script (script hex+chain → address), base58_encode (hex data) / base58_decode (base58 data). convert accepts optional from chain. Pure, offline computation (blocktools); nothing is fetched or stored. How to combine this with the other tools: swapchan_playbook (workflows: find-money, best-swap, rebalance, revoke-approvals, bridge-stuck, token-safety, recover-old-wallet).

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": {
      "op": "<op>"
    },
    "name": "address_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYes
toNo
dataNo
fromNo
hashNo
kindNo
chainNo
prefixNo
scriptNo
addressNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / hash
      Added value: +{
      +  "maxLength": 130,
      +  "type": "string"
      +}
    • addedInput schema / properties / kind
      Added value: +{
      +  "enum": [
      +    "p2pkh",
      +    "p2sh"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / op / enum
      Previous value: -[
      -  "detect",
      -  "validate",
      -  "convert",
      -  "cashaddr_to_legacy",
      -  "legacy_to_cashaddr",
      -  "cashaddr_decode",
      -  "to_script",
      -  "from_script",
      -  "base58_encode",
      -  "base58_decode"
      -]New value: +[
      +  "detect",
      +  "validate",
      +  "convert",
      +  "cashaddr_to_legacy",
      +  "legacy_to_cashaddr",
      +  "cashaddr_decode",
      +  "cashaddr_encode",
      +  "to_script",
      +  "from_script",
      +  "base58_encode",
      +  "base58_decode"
      +]
  2. Added

TDQS

A3.9/5.0
Behavior4/5

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

The annotations already establish read-only, idempotent, non-destructive, and non-open-world behavior, and the description adds meaningful context: it is a pure offline computation using blocktools with nothing fetched or stored. It also discloses the important limitation that address detection is broader than actual chain support for SwapChan scanning/sweeping, though return behavior is not described for every operation.

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 dense but appropriately front-loaded with the operation list and examples, and most sentences carry operational information. It is a single long paragraph rather than a structured list, which slightly reduces scanability for an 11-operation tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex multi-operation tool with 10 parameters, no output schema, and 0% schema description coverage, the description is adequate but incomplete. It explains several return-like outcomes such as detected chains, converted addresses, and scriptPubKey hex, but it does not describe outputs for validate, cashaddr_decode, base58_decode, or error conditions.

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 description coverage is 0%, so the description has to carry parameter meaning, and it does a strong job mapping most parameters to operations: op values, convert from/to, cashaddr kind/hash/prefix, script/address/chain for script ops, and data for base58 encode/decode. Some ambiguity remains for cashaddr operations using the address versus data parameter, so it is not fully exhaustive.

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 gives a specific resource (public crypto addresses) and enumerates each supported operation with concrete examples, so the agent knows exactly what the tool does. It does not explicitly contrast with nearby siblings like create_address, solana_address, or xpub_addresses, so it falls short of full sibling differentiation.

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 explains operation-level usage with examples such as BTC→LTC conversion and BCH cashaddr operations, and it includes a useful caveat that detect/validate support does not imply SwapChan can scan or sweep that chain. It does not explicitly route the agent away from sibling tools, so usage is clear but not fully comparative.

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.