multiply
Calculate the product of two numbers by multiplying them together using this mathematical operation tool.
Instructions
Multiply two numbers together
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | First number to multiply | |
| b | Yes | Second number to multiply |
Implementation Reference
- src/index.ts:160-171 (handler)Handler for the 'multiply' tool that multiplies two numbers (a and b) and returns a formatted text 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:56-73 (registration)Tool registration in the listTools handler, including name, description, and input schema for two numbers (a and b).{ name: "multiply", description: "Multiply two numbers together", inputSchema: { type: "object", properties: { a: { type: "number", description: "First number to multiply", }, b: { type: "number", description: "Second number to multiply", }, }, required: ["a", "b"], }, },