Skip to main content
Glama

Calculator MCP

by wrtnlabs
mul.ts525 B
import { z } from "zod"; import { zodToJsonSchema } from "zod-to-json-schema"; import type { Tool } from "./types"; export const mul: Tool = { schema: { name: "mul", description: "Multiply two numbers", inputSchema: zodToJsonSchema(z.object({ a: z.number(), b: z.number() })), }, handle: async (params) => { const a = params.a as number; const b = params.b as number; const result = a * b; return { content: [{ type: "text", text: `The product of ${a} and ${b} is ${result}` }] }; }, };

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wrtnlabs/calculator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server