Check Page Creation Status
check_page_statusPoll the status of a page-creation workflow by providing the workflow_id; call repeatedly until done is true and status is complete or errored.
Instructions
Poll the status of a page-creation workflow started by create_page. Pass the workflow_id you received from that tool. While running, call this again after poll_after_ms ms. Once done is true, status is complete or errored; when complete, result holds the published page info.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflow_id | Yes | Workflow id returned by create_page |
Implementation Reference
- server/index.js:907-922 (registration)Registration of the 'check_page_status' tool using server.registerTool with the name 'check_page_status'.
server.registerTool( "check_page_status", { title: "Check Page Creation Status", description: "Poll the status of a page-creation workflow started by `create_page`. Pass the `workflow_id` you received from that tool. While running, call this again after `poll_after_ms` ms. Once `done` is true, `status` is `complete` or `errored`; when complete, `result` holds the published page info.", inputSchema: { workflow_id: z.string().describe("Workflow id returned by create_page"), }, annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false }, }, async ({ workflow_id }) => { const data = await apiCall(`/v1/ai/workspace/page/status/${encodeURIComponent(workflow_id)}`, "GET"); const payload = data?.result || data; return { content: [{ type: "text", text: JSON.stringify(payload, null, 2) }] }; } ); - server/index.js:917-921 (handler)Handler function that accepts workflow_id, calls the API endpoint /v1/ai/workspace/page/status/{workflow_id}, and returns the result as text content.
async ({ workflow_id }) => { const data = await apiCall(`/v1/ai/workspace/page/status/${encodeURIComponent(workflow_id)}`, "GET"); const payload = data?.result || data; return { content: [{ type: "text", text: JSON.stringify(payload, null, 2) }] }; } - server/index.js:912-914 (schema)Input schema for check_page_status: requires workflow_id (string) described as 'Workflow id returned by create_page'.
inputSchema: { workflow_id: z.string().describe("Workflow id returned by create_page"), }, - server/index.js:112-123 (helper)The apiCall helper function used by the handler to make HTTP requests to the Lindo 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(); }