addition
Perform arithmetic addition operations within the Zerodha Trading Bot to calculate values for automated stock trading strategies and decision-making processes.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:32-34 (handler)The inline handler for the 'addition' tool. It takes two numbers 'a' and 'b', computes their sum using template literal `${a + b}`, and returns it wrapped in the required MCP response format with content as text.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: two required number parameters 'a' and 'b'.server.tool("addition", { a: z.number(), b: z.number() }, async ({ a, b }) => ({
- index.js:32-34 (registration)Registers the 'addition' tool on the MCP server with name 'addition', inline schema, and inline handler.server.tool("addition", { a: z.number(), b: z.number() }, async ({ a, b }) => ({ content: [{ type: "text", text: `${a + b}` }], }));