Skip to main content
Glama

cast_block

Retrieves blockchain block details or the latest block number from an RPC network, optionally extracting a specific field as JSON.

Instructions

Get block information (cast block). If no blockTag is given, returns the latest block number (cast block-number).

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": {
      "rpcUrl": "<rpcUrl>"
    },
    "name": "cast_block"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonNoOutput as JSON
fieldNoSpecific block field to extract (e.g. timestamp, baseFeePerGas)
rpcUrlYesRPC URL of the network
blockTagNoBlock identifier (number, hash, "latest", "pending"). Omit to get the latest block number.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It usefully discloses the non-obvious branch that omission of blockTag changes the return type from a full block object to a bare block number, but it says nothing about the read-only nature beyond 'Get', RPC endpoint requirements, or error behavior for invalid tags.

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?

Two short sentences, front-loaded with the primary action and followed immediately by the conditional default. No filler, though the parenthetical CLI command references add little for an agent that is not shelling out.

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?

With four fully documented parameters and no output schema, the main remaining gap is return shape: the description never indicates that a full block object versus a plain number is returned depending on blockTag, nor which fields exist for use with 'field'. Adequate but leaves the agent guessing at output format.

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%, with blockTag, field, json, and rpcUrl all documented in the schema itself. The description's statement about omitting blockTag duplicates the schema's own 'Omit to get the latest block number' wording rather than adding new meaning, so it sits at the baseline.

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?

States a specific verb and resource ('Get block information'), and adds a concrete behavioral variant (returns latest block number when blockTag is omitted). It is clearly distinct from siblings like cast_balance or cast_tx, though folding the 'cast block-number' behavior into the same tool makes the single purpose slightly muddier.

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?

The description gives one conditional usage rule -- omit blockTag to get only the latest block number -- which implies the two modes of use. It offers no guidance on when to prefer this over cast_rpc or how to choose a blockTag value beyond what the schema already lists.

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