Skip to main content
Glama

telegraph_get_page_list

Retrieve a list of pages from a Telegraph account using an access token, with options to specify offset and limit for paginated results.

Instructions

Get a list of pages belonging to a Telegraph account. Returns a PageList object with total_count and pages array.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
access_tokenYesAccess token of the Telegraph account
offsetNoSequential number of the first page to be returned (default: 0)
limitNoNumber of pages to be returned (0-200, default: 50)

Implementation Reference

  • Handler case in handlePageTool that validates input using GetPageListSchema and delegates to telegraph.getPageList, returning JSON stringified result
    case 'telegraph_get_page_list': { const input = GetPageListSchema.parse(args); const result = await telegraph.getPageList( input.access_token, input.offset, input.limit ); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2), }], }; }
  • Zod input schema for validating tool parameters
    export const GetPageListSchema = z.object({ access_token: z.string().describe('Access token of the Telegraph account'), offset: z.number().int().min(0).optional().describe('Sequential number of the first page (default: 0)'), limit: z.number().int().min(0).max(200).optional().describe('Number of pages to return (0-200, default: 50)'), });
  • Tool registration definition in pageTools array including name, description, and JSON inputSchema
    { name: 'telegraph_get_page_list', description: 'Get a list of pages belonging to a Telegraph account. Returns a PageList object with total_count and pages array.', inputSchema: { type: 'object' as const, properties: { access_token: { type: 'string', description: 'Access token of the Telegraph account', }, offset: { type: 'integer', description: 'Sequential number of the first page to be returned (default: 0)', minimum: 0, default: 0, }, limit: { type: 'integer', description: 'Number of pages to be returned (0-200, default: 50)', minimum: 0, maximum: 200, default: 50, }, }, required: ['access_token'], }, },
  • Supporting function that performs the actual Telegraph API call to retrieve page list using apiRequest
    export async function getPageList( access_token: string, offset?: number, limit?: number ): Promise<PageList> { return apiRequest<PageList>('getPageList', { access_token, offset, limit, }); }

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