Skip to main content
Glama

MCP Boilerplate

tools.ts1.25 kB
import { createSuccessResult, CustomTool } from "./types/tool.types.js"; import { calculator } from "./tools/calculator.js"; // Tool configurations export const toolConfigs: CustomTool[] = [ { name: "calculator", description: "Perform basic arithmetic calculations", inputSchema: { type: "object" as const, properties: { operation: { type: "string", enum: ["add", "subtract", "multiply", "divide"], description: "The arithmetic operation to perform", }, a: { type: "number", description: "First number" }, b: { type: "number", description: "Second number" }, }, required: ["operation", "a", "b"], }, annotations: { title: "Calculator", readOnlyHint: true, openWorldHint: false, }, handler: calculator, }, // add your new tool example here // { // name: "myTool", // description: "My tool description", // inputSchema: { // type: "object" as const, // properties: {}, // required: [], // }, // handler: async () => { // return createSuccessResult({ result: "Tool result" }); // }, // }, // Add more tools here as they are created ];

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/iamsrikanthnani/mcp-boilerplate'

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