Skip to main content
Glama

add

Add two numbers to perform basic arithmetic calculations within Ethereum blockchain analysis workflows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • The asynchronous handler function for the 'add' tool that adds two input numbers 'a' and 'b' and returns the sum as text content.
    async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }] })
  • Zod input schema for the 'add' tool, requiring two numeric parameters 'a' and 'b'.
    { a: z.number(), b: z.number() },
  • tools/utility.js:9-14 (registration)
    Registration of the 'add' tool on the MCP server, specifying name, input schema, and handler function.
    server.tool("add", { a: z.number(), b: z.number() }, async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }] }) );
  • main.js:59-59 (registration)
    Call to registerUtilityTools function in main.js, which registers the 'add' tool among others.
    registerUtilityTools(server);

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/0xGval/evm-mcp-tools'

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