add
Calculate the sum of two numbers using a straightforward API endpoint on the RAGmonsters Custom PostgreSQL MCP Server.
Instructions
Add two numbers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- src/mcp-server/index.js:54-64 (registration)Registration of the 'add' tool including schema and inline handler functionserver.addTool({ name: "add", description: "Add two numbers", parameters: z.object({ a: z.number(), b: z.number(), }), execute: async (args) => { return String(args.a + args.b); }, });
- src/mcp-server/index.js:61-63 (handler)The handler function that executes the addition of two numbers and returns the result as a stringexecute: async (args) => { return String(args.a + args.b); },
- src/mcp-server/index.js:57-60 (schema)Input schema using Zod defining two required number parameters 'a' and 'b'parameters: z.object({ a: z.number(), b: z.number(), }),