pageGet
Retrieve a specific page by ID from Routine's MCP server to manage calendars, tasks, or notes efficiently.
Instructions
Get a page.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/tools.ts:206-224 (handler)The handler function for the 'pageGet' tool. It takes a page 'id' parameter, sends an RPC request to 'page.get' via sendRpcRequest, and returns the page data as a JSON-formatted text content block or an error response if the request fails.async ({ id }) => { try { const data = await sendRpcRequest("page.get", [id]); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }], }; } catch (error) { logger.error("Error fetching page.get: %o", error); return { content: [ { type: "text", text: `Error fetching auth id: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }
- src/tools.ts:201-205 (schema)Zod schema defining the input parameter for 'pageGet': 'id' as a required string (page identifier). The comment contains the corresponding JSON schema.{ /* {"$id":"#page-id","$schema":"https://json-schema.org/draft/2019-09/schema","type":"string"} */ id: z.string(), },
- src/tools.ts:198-225 (registration)Registration of the 'pageGet' tool on the MCP server using server.tool(). Includes the tool name, description, input schema validator, and the handler function.server.tool( "pageGet", "Get a page.", { /* {"$id":"#page-id","$schema":"https://json-schema.org/draft/2019-09/schema","type":"string"} */ id: z.string(), }, async ({ id }) => { try { const data = await sendRpcRequest("page.get", [id]); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }], }; } catch (error) { logger.error("Error fetching page.get: %o", error); return { content: [ { type: "text", text: `Error fetching auth id: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } } );