Skip to main content
Glama
index.ts1.27 kB
/** * Telegraph Tools Export * Combines all tool definitions and handlers */ import { accountTools, handleAccountTool } from './account.js'; import { pageTools, handlePageTool } from './pages.js'; import { templateTools, handleTemplateTool } from './templates.js'; import { exportTools, handleExportTool } from './export.js'; // Export all tool definitions export const allTools = [...accountTools, ...pageTools, ...templateTools, ...exportTools]; // Combined tool handler export async function handleTool(name: string, args: unknown) { // Try account tools first const accountResult = await handleAccountTool(name, args); if (accountResult !== null) { return accountResult; } // Try page tools const pageResult = await handlePageTool(name, args); if (pageResult !== null) { return pageResult; } // Try template tools const templateResult = await handleTemplateTool(name, args); if (templateResult !== null) { return templateResult; } // Try export tools const exportResult = await handleExportTool(name, args); if (exportResult !== null) { return exportResult; } // Unknown tool return { isError: true, content: [{ type: 'text' as const, text: `Unknown tool: ${name}`, }], }; }

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/NehoraiHadad/telegraph-mcp'

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