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];
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns a Page object, which adds some context beyond the input schema, but it doesn't cover critical aspects like error handling (e.g., what happens if the path is invalid), authentication requirements, rate limits, or whether it's a read-only operation. This leaves significant gaps for an agent to understand how to use it safely and effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded with the core purpose in the first sentence. Every word earns its place, with no redundant information. It efficiently communicates the action and outcome in a single, clear statement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (2 parameters, no nested objects) and 100% schema coverage, the description is minimally adequate. However, with no annotations and no output schema, it lacks details on behavioral traits like error handling or authentication, and the return value ('Page object') is vague without further explanation. This makes it incomplete for fully informed use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema fully documents both parameters ('path' and 'return_content'). The description adds no additional meaning beyond what's in the schema, such as explaining the format of the path further or the implications of 'return_content'. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('a Telegraph page by its path'), making the purpose immediately understandable. It distinguishes from siblings like 'telegraph_get_page_list' (which lists pages) and 'telegraph_export_page' (which exports). However, it doesn't explicitly mention that this retrieves a single page versus other get operations, slightly limiting differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over 'telegraph_get_page_list' for listing pages or 'telegraph_export_page' for exporting content, nor does it specify prerequisites like needing a valid path. Usage is implied by the action but lacks explicit context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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