addition
Add two numbers to calculate trading values for the Zerodha Trading Bot, enabling precise financial computations in automated stock trading operations.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- index.js:32-34 (registration)Registration of the 'addition' tool, including inline schema {a: z.number(), b: z.number()} and handler that returns the sum of a and b as text content.server.tool("addition", { a: z.number(), b: z.number() }, async ({ a, b }) => ({ content: [{ type: "text", text: `${a + b}` }], }));
- index.js:32-34 (handler)Inline handler function for the 'addition' tool that computes a + b and formats it as MCP content.server.tool("addition", { a: z.number(), b: z.number() }, async ({ a, b }) => ({ content: [{ type: "text", text: `${a + b}` }], }));
- index.js:32-32 (schema)Input schema for the 'addition' tool using Zod: numbers a and b.server.tool("addition", { a: z.number(), b: z.number() }, async ({ a, b }) => ({