add
Perform addition of two numerical values (a and b) to simplify Ethereum blockchain calculations and data analysis tasks using the ethereum-tools suite.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- tools/utility.js:11-13 (handler)Executes the addition of two input numbers 'a' and 'b', returning the result as a text content block.async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }] })
- tools/utility.js:10-10 (schema)Zod input schema validating 'a' and 'b' as numbers for the 'add' tool.{ a: z.number(), b: z.number() },
- tools/utility.js:9-14 (registration)Registers the 'add' tool on the MCP server with its schema and handler function.server.tool("add", { a: z.number(), b: z.number() }, async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }] }) );