get_page
Retrieve detailed information about a specific page using its website ID and page ID.
Instructions
Get page details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| website_id | Yes | The website ID | |
| page_id | Yes | The page ID |
Implementation Reference
- server/index.js:484-496 (registration)Registration of the 'get_page' tool using server.tool() with name 'get_page'.
server.tool( "get_page", "Get page details.", { website_id: z.string().describe("The website ID"), page_id: z.string().describe("The page ID"), }, { title: "Get Page Details", readOnlyHint: true, destructiveHint: false, openWorldHint: false }, async ({ website_id, page_id }) => { const data = await apiCall(`/v1/workspace/website/${website_id}/pages/${page_id}`, "GET"); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } ); - server/index.js:492-495 (handler)The async handler function that executes the get_page tool logic: calls the API to get page details.
async ({ website_id, page_id }) => { const data = await apiCall(`/v1/workspace/website/${website_id}/pages/${page_id}`, "GET"); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - server/index.js:487-490 (schema)Input schema for get_page: requires website_id (string) and page_id (string).
{ website_id: z.string().describe("The website ID"), page_id: z.string().describe("The page ID"), }, - server/index.js:112-123 (helper)The apiCall helper function used by the get_page handler to make HTTP requests to the backend API.
async function apiCall(path, method, body) { const url = `${BASE_URL}${path}`; const res = await fetch(url, { method, headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json", }, ...(body ? { body: JSON.stringify(body) } : {}), }); return res.json(); }