add
Perform addition of two numbers using the Remote MCP Server (Authless), enabling integration with AI clients like Claude Desktop or Cloudflare AI Playground for numerical operations.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- src/index.ts:17-19 (handler)The inline handler function for the 'add' tool that takes two numbers a and b, computes their sum, and returns it as a text content response.async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }], })
- src/index.ts:16-16 (schema)Zod input schema for the 'add' tool, defining parameters a and b as numbers.{ a: z.number(), b: z.number() },
- src/index.ts:14-20 (registration)Registration of the 'add' tool on the MCP server using this.server.tool(), specifying name, schema, and handler.this.server.tool( "add", { a: z.number(), b: z.number() }, async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }], }) );