Skip to main content
Glama

AgentMail

by agentmail-to
mcp.ts844 B
import { type ToolCallback } from '@modelcontextprotocol/sdk/server/mcp.js' import { type ZodRawShape } from 'zod' import { ListToolkit } from './toolkit' import { type Tool } from './tools' interface McpTool { name: string description: string paramsSchema: ZodRawShape callback: ToolCallback<ZodRawShape> } export class AgentMailToolkit extends ListToolkit<McpTool> { protected buildTool(tool: Tool): McpTool { return { name: tool.name, description: tool.description, paramsSchema: tool.params_schema.shape, callback: async (args) => { const { isError, result } = await this.safeCall(tool.method, args) return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }], isError } }, } } }

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/agentmail-to/agentmail-toolkit'

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