multiply
Calculate the product of two numbers using this mathematical tool from the Simple Calculator MCP server. Enter two numerical values to get their multiplication result.
Instructions
计算两个数字的乘积
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | 第一个数字 | |
| b | Yes | 第二个数字 |
Implementation Reference
- src/index.ts:149-160 (handler)The handler function for the 'multiply' tool. It extracts parameters 'a' and 'b' from the arguments, computes their product, and returns a text response with the formatted result.
case "multiply": { const { a, b } = args as { a: number; b: number }; const result = a * b; return { content: [ { type: "text", text: `${a} × ${b} = ${result}`, }, ], }; } - src/index.ts:54-71 (schema)The schema definition for the 'multiply' tool, including name, description, and inputSchema specifying two required number parameters 'a' and 'b'.
{ name: "multiply", description: "计算两个数字的乘积", inputSchema: { type: "object", properties: { a: { type: "number", description: "第一个数字", }, b: { type: "number", description: "第二个数字", }, }, required: ["a", "b"], }, },