Skip to main content
Glama
base.ts482 B
import { z } from 'zod'; import { McpBaseTool, McpToolResponse } from '../types.js'; export abstract class BaseTool<T = any> implements McpBaseTool<T> { abstract name: string; abstract description: string; abstract paramsSchema: z.ZodObject<any>; abstract cb(args: T): Promise<McpToolResponse>; protected createTextResponse(text: string): McpToolResponse { return { content: [ { type: 'text', text, }, ], }; } }

Latest Blog Posts

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/0xdwong/sui-mcp'

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