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
| Name | Required | Description | Default |
|---|---|---|---|
| access_token | Yes | Access token of the Telegraph account | |
| offset | No | Sequential number of the first page to be returned (default: 0) | |
| limit | No | Number of pages to be returned (0-200, default: 50) |
Implementation Reference
- src/tools/pages.ts:288-301 (handler)Handler case in handlePageTool that validates input using GetPageListSchema and delegates to telegraph.getPageList, returning JSON stringified resultcase '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), }], }; }
- src/tools/pages.ts:36-40 (schema)Zod input schema for validating tool parametersexport 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)'), });
- src/tools/pages.ts:165-191 (registration)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'], }, },
- src/telegraph-client.ts:206-216 (helper)Supporting function that performs the actual Telegraph API call to retrieve page list using apiRequestexport async function getPageList( access_token: string, offset?: number, limit?: number ): Promise<PageList> { return apiRequest<PageList>('getPageList', { access_token, offset, limit, }); }