Skip to main content
Glama

telegraph_get_page

Retrieve Telegraph page content and metadata using its path identifier. Returns a Page object with optional content field for programmatic access.

Instructions

Get a Telegraph page by its path. Returns a Page object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the Telegraph page (e.g., "Sample-Page-12-15")
return_contentNoIf true, content field will be returned

Implementation Reference

  • The handler case block in handlePageTool that executes the telegraph_get_page tool logic: validates input with GetPageSchema, calls the telegraph client getPage function, and formats the result as MCP content.
    case 'telegraph_get_page': { const input = GetPageSchema.parse(args); const result = await telegraph.getPage( input.path, input.return_content ); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2), }], }; }
  • Zod schema for input validation used in the telegraph_get_page handler.
    export const GetPageSchema = z.object({ path: z.string().describe('Path to the Telegraph page (e.g., "Sample-Page-12-15")'), return_content: z.boolean().optional().describe('If true, content field will be returned'), });
  • Tool registration object defining name, description, and inputSchema for telegraph_get_page, included in pageTools and thus allTools.
    { name: 'telegraph_get_page', description: 'Get a Telegraph page by its path. Returns a Page object.', inputSchema: { type: 'object' as const, properties: { path: { type: 'string', description: 'Path to the Telegraph page (e.g., "Sample-Page-12-15")', }, return_content: { type: 'boolean', description: 'If true, content field will be returned', default: false, }, }, required: ['path'], }, },
  • Helper function implementing the core API call to Telegraph's getPage endpoint via apiRequest, called by the tool handler.
    export async function getPage(path: string, return_content?: boolean): Promise<Page> { return apiRequest<Page>('getPage', { path, return_content, }); }
  • Aggregation of all tools including pageTools (which contains telegraph_get_page) into allTools, exported and used by the MCP server.
    export const allTools = [...accountTools, ...pageTools, ...templateTools, ...exportTools];

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