Skip to main content
Glama

telegraph_list_templates

Retrieve available page templates and their fields to create structured Telegraph pages with consistent formatting.

Instructions

List all available page templates with their fields

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler logic for the 'telegraph_list_templates' tool. It calls listTemplates() from the templates module and returns the result as formatted JSON text content.
    if (name === 'telegraph_list_templates') { return { content: [{ type: 'text' as const, text: JSON.stringify(listTemplates(), null, 2), }], }; }
  • Tool definition including name, description, and empty inputSchema (no parameters required). Part of the templateTools array.
    { name: 'telegraph_list_templates', description: 'List all available page templates with their fields', inputSchema: { type: 'object' as const, properties: {}, }, },
  • Imports templateTools (containing 'telegraph_list_templates') and handleTemplateTool, then registers it in the combined allTools export for the MCP server.
    import { templateTools, handleTemplateTool } from './templates.js'; import { exportTools, handleExportTool } from './export.js'; // Export all tool definitions export const allTools = [...accountTools, ...pageTools, ...templateTools, ...exportTools];
  • Helper function listTemplates() that returns a list of all available templates with their metadata (name, description, fields), used by the tool handler.
    export function listTemplates(): Array<{name: string; description: string; fields: TemplateField[]}> { return Object.values(templates).map(t => ({ name: t.name, description: t.description, fields: t.fields, })); }

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