Skip to main content
Glama

MCP Practice

by Ijongwon
ExampleTool.ts527 B
import { MCPTool } from "mcp-framework"; import { z } from "zod"; interface ExampleInput { message: string; } class ExampleTool extends MCPTool<ExampleInput> { name = "example_tool"; description = "An example tool that processes messages"; schema = { message: { type: z.string(), description: "Message to process", }, }; async execute(input: ExampleInput) { console.log(`Processing message: ${input.message}`); return `Processed: ${input.message}`; } } export default ExampleTool;

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/Ijongwon/mcp-practice'

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