multiply
Perform multiplication of two numbers using the Arithmetic MCP Server. Input 'a' and 'b' to quickly calculate their product.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Implementation Reference
- src/index.ts:40-45 (handler)Handler function for the 'multiply' tool that takes two numbers a and b, multiplies them, and returns a text response with the result in Japanese.async ({ a, b }) => ({ content: [{ type: "text", text: `${a} と ${b} の掛け算の結果: ${a * b}` }] })
- src/index.ts:39-39 (schema)Input schema for the 'multiply' tool using Zod, defining two number parameters a and b.{ a: z.number(), b: z.number() },
- src/index.ts:37-46 (registration)Registration of the 'multiply' tool on the MCP server using server.tool() method.server.tool( "multiply", { a: z.number(), b: z.number() }, async ({ a, b }) => ({ content: [{ type: "text", text: `${a} と ${b} の掛け算の結果: ${a * b}` }] }) );