Skip to main content
Glama

web3_clientVersion

Identify the client version of an EVM-compatible blockchain node to verify software compatibility and ensure proper network interaction.

Instructions

Returns the current client version

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'web3_clientVersion' tool. It calls the generic makeRPCCall helper with the method name to execute the RPC request, formats the result using formatResponse, and returns it as a text content response. Includes error handling.
    server.tool(
      "web3_clientVersion",
      "Returns the current client version",
      {},
      async () => {
        try {
          const result = await makeRPCCall("web3_clientVersion");
          return {
            content: [
              {
                type: "text",
                text: formatResponse(result, "Web3 Client Version"),
              },
            ],
          };
        } catch (error: any) {
          return {
            content: [
              {
                type: "text",
                text: `Error: ${error.message}`,
              },
            ],
          };
        }
      },
    );
  • Generic helper function used by the web3_clientVersion tool (and others) to perform RPC calls via the ethers JsonRpcProvider.
    async function makeRPCCall(method: string, params: any[] = []): Promise<any> {
      try {
        const result = await provider.send(method, params);
        return result;
      } catch (error: any) {
        throw new Error(`RPC call failed: ${error.message}`);
      }
    }
  • src/index.ts:100-126 (registration)
    Registration of the 'web3_clientVersion' tool using server.tool, including name, description, empty input schema, and handler function.
    server.tool(
      "web3_clientVersion",
      "Returns the current client version",
      {},
      async () => {
        try {
          const result = await makeRPCCall("web3_clientVersion");
          return {
            content: [
              {
                type: "text",
                text: formatResponse(result, "Web3 Client Version"),
              },
            ],
          };
        } catch (error: any) {
          return {
            content: [
              {
                type: "text",
                text: `Error: ${error.message}`,
              },
            ],
          };
        }
      },
    );
  • Empty input schema for the web3_clientVersion tool (no parameters required).
    {},
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 burden of behavioral disclosure. It states the tool returns a value but doesn't specify the return format (e.g., string, object), potential errors, or any side effects. For a tool with zero annotation coverage, this is a significant gap in transparency.

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, efficient sentence that directly states the tool's function without any unnecessary words. It's front-loaded and wastes no space, making it easy for an agent to parse quickly.

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?

Given the tool's simplicity (0 parameters, no annotations, no output schema), the description is minimally adequate but lacks depth. It doesn't explain the return value format or potential use cases, which could help an agent understand how to interpret the result. However, for such a straightforward tool, it meets basic requirements.

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?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't mention parameters, as there are none, which aligns with the schema and avoids redundancy.

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 clearly states the tool's purpose with a specific verb ('Returns') and resource ('the current client version'), making it immediately understandable. However, it doesn't explicitly differentiate this tool from sibling tools like 'net_version' or 'eth_chainId', which might also provide version-related information in different contexts.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'net_version' available, there's no indication of whether this tool is for general client version retrieval, debugging, or specific use cases, leaving the agent without context for selection.

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/JamesANZ/evm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server