add
Add two numbers together to calculate their sum. Use this tool to perform basic addition operations within the Notes MCP Server.
Instructions
Add two numbers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- src/index.ts:46-50 (handler)Handler function that adds two numbers a and b, returns the result as text.async ({ a, b }) => { return { content: [{ type: "text", text: String(a + b) }], }; }
- src/index.ts:42-45 (schema)Input schema validating two numbers a and b.{ a: z.number().describe("First number"), b: z.number().describe("Second number"), },
- src/index.ts:39-51 (registration)Registers the 'Add' tool on the MCP server with name, description, input schema, and handler function.server.tool( "Add", "Add two numbers", { a: z.number().describe("First number"), b: z.number().describe("Second number"), }, async ({ a, b }) => { return { content: [{ type: "text", text: String(a + b) }], }; } );