add
Add two numbers to perform basic arithmetic calculations within Ethereum blockchain analysis workflows.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- tools/utility.js:11-13 (handler)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) }] })
- tools/utility.js:10-10 (schema)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);