calendarGet
Retrieve calendar details by ID from the Routine MCP server. Use this tool to access specific calendars for managing schedules, tasks, and events efficiently.
Instructions
A calendar.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/tools.ts:54-72 (handler)Handler function that takes a calendar ID, sends an RPC request to 'calendar.get', and returns the JSON-stringified data or an error message.async ({ id }) => { try { const data = await sendRpcRequest("calendar.get", [id]); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }], }; } catch (error) { logger.error("Error fetching calendar.get: %o", error); return { content: [ { type: "text", text: `Error fetching auth id: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }
- src/tools.ts:49-53 (schema)Input schema defining 'id' as a string using Zod (z.string()), with embedded JSON schema comment.{ /* {"$id":"#calendar-id","$schema":"https://json-schema.org/draft/2019-09/schema","type":"string"} */ id: z.string(), },
- src/tools.ts:46-73 (registration)Registration of the 'calendarGet' tool via server.tool() within registerServerTools, including name, description, schema, and handler.server.tool( "calendarGet", "A calendar.", { /* {"$id":"#calendar-id","$schema":"https://json-schema.org/draft/2019-09/schema","type":"string"} */ id: z.string(), }, async ({ id }) => { try { const data = await sendRpcRequest("calendar.get", [id]); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }], }; } catch (error) { logger.error("Error fetching calendar.get: %o", error); return { content: [ { type: "text", text: `Error fetching auth id: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } } );