get_page
Retrieve full page details including scrape and rewrite status, SEO metrics, WordPress publish status, and featured image for a given page ID.
Instructions
Get full page details: scrape status, rewrite status, SEO data (traffic, keywords, backlinks), WordPress publish status, and featured image
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | Page UUID |
Implementation Reference
- src/tools.ts:157-171 (handler)The get_page tool handler: calls client.getPage(page_id) and returns the full page details (scrape/rewrite/publish status, SEO data, featured image). Wrapped with withErrors for structured error handling.
server.tool( "get_page", "Get full page details: scrape status, rewrite status, SEO data (traffic, keywords, backlinks), WordPress publish status, and featured image URL.", { page_id: z.string().uuid().describe("Page UUID"), }, { title: "Get page", readOnlyHint: true, idempotentHint: true, openWorldHint: true }, withErrors( async ({ page_id }) => { const res = await client.getPage(page_id); return json(res.data); }, "Use list_pages to find valid page IDs." ) ); - src/client.ts:47-65 (schema)The PageData interface defines the schema returned by get_page: id, url, archive_url, title, source, top_keywords, status, is_scraped, is_rewritten, posted_to_wordpress, seo (traffic/keywords/backlinks), featured_image_url, created_at.
export interface PageData { id: string; url: string; archive_url: string; title: string | null; source?: string; top_keywords?: string | null; status: string; is_scraped: boolean; is_rewritten: boolean; posted_to_wordpress: boolean; seo: { traffic: number | null; keywords: number | null; backlinks: number | null; }; featured_image_url: string | null; created_at: string; } - src/client.ts:237-238 (helper)The client.getPage method: sends GET /api/v1/pages/{id} and returns ApiResponse<PageData>. This is the underlying API call invoked by the get_page tool handler.
async getPage(id: string): Promise<ApiResponse<PageData>> { return this.request("GET", `/api/v1/pages/${id}`); - src/tools.ts:157-171 (registration)The get_page tool is registered via server.tool() in the registerTools function inside src/tools.ts. It uses the MCP server's tool registration API with Zod schema for input validation.
server.tool( "get_page", "Get full page details: scrape status, rewrite status, SEO data (traffic, keywords, backlinks), WordPress publish status, and featured image URL.", { page_id: z.string().uuid().describe("Page UUID"), }, { title: "Get page", readOnlyHint: true, idempotentHint: true, openWorldHint: true }, withErrors( async ({ page_id }) => { const res = await client.getPage(page_id); return json(res.data); }, "Use list_pages to find valid page IDs." ) );