Skip to main content
Glama

cast_convert

Convert Ethereum value formats such as wei, hex, decimal, bytes32, and custom bases to support smart contract and on-chain data handling.

Instructions

Convert between Ethereum value formats (cast to-wei, from-wei, to-hex, to-dec, to-bytes32, to-base).

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": {
      "operation": "<operation>",
      "value": "<value>"
    },
    "name": "cast_convert"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNoOutput base for to-base operation (e.g. 16 for hex, 2 for binary)
unitNoUnit for wei conversions (e.g. ether, gwei). Default: ether
valueYesValue to convert
baseInNoInput base for to-base operation (e.g. 16 if input is hex)
operationYesConversion operation to perform

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It names the conversion operations but does not state that this is a pure/local computation, whether any permissions or network access are required, whether invalid inputs error or return defaults, or what the output looks like. For a conversion tool these omissions are notable given zero annotation coverage.

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 a single, front-loaded sentence with no filler. It immediately identifies the resource and enumerates the operations. Every word contributes to identifying the tool's scope.

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?

The tool has five parameters and no output schema, so the description should ideally explain the return format or type (e.g., string decimal, hex string, bytes32). It does not. The rich schema covers inputs, but the lack of output description and examples leaves a gap for correct invocation and result interpretation.

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 description coverage is 100%, so the schema already documents value, operation, unit, base, and baseIn. The description only repeats the operation names already present in the enum and adds no additional parameter meaning, syntax, or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

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 states a specific verb and resource: converting between Ethereum value formats. It also enumerates the supported operations (to-wei, from-wei, to-hex, to-dec, to-bytes32, to-base), making the tool's scope clear. It does not explicitly differentiate from siblings, but no sibling appears to offer the same conversion function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the operation list and the phrase 'Convert between Ethereum value formats,' but there is no explicit when-to-use guidance, no alternatives named, and no examples showing which operation fits which scenario. An agent can infer the tool is for format conversion, but must rely on the schema enum to choose an operation.

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