We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jcr82/bruno-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
IToolHandler.ts•762 B
/**
* Tool Handler Interface
* Defines the contract for all MCP tool handlers
*/
import type { TextContent } from '@modelcontextprotocol/sdk/types.js';
/**
* Tool response format
*/
export interface ToolResponse {
content: TextContent[];
}
/**
* Interface for all tool handlers
* Each tool handler is responsible for:
* - Validating its parameters
* - Executing its specific logic
* - Formatting its response
*/
export interface IToolHandler {
/**
* Get the tool name this handler is responsible for
*/
getName(): string;
/**
* Handle the tool execution
* @param args - Tool arguments (will be validated by the handler)
* @returns Tool response with formatted content
*/
handle(args: unknown): Promise<ToolResponse>;
}