eventGet
Retrieve event details from Routine by providing a unique event ID, enabling streamlined calendar and task management.
Instructions
An event.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/tools.ts:128-146 (handler)The handler function for the 'eventGet' tool. It takes an 'id' parameter, sends an RPC request to 'event.get' with the id, and returns the JSON-formatted data or an error response.async ({ id }) => { try { const data = await sendRpcRequest("event.get", [id]); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }], }; } catch (error) { logger.error("Error fetching event.get: %o", error); return { content: [ { type: "text", text: `Error fetching auth id: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }
- src/tools.ts:123-127 (schema)Zod schema for the input parameters of the 'eventGet' tool, defining a required 'id' string parameter.{ /* {"$id":"#event-id","$schema":"https://json-schema.org/draft/2019-09/schema","type":"string"} */ id: z.string(), },
- src/tools.ts:120-147 (registration)The server.tool call that registers the 'eventGet' MCP tool with its description, input schema, and handler function.server.tool( "eventGet", "An event.", { /* {"$id":"#event-id","$schema":"https://json-schema.org/draft/2019-09/schema","type":"string"} */ id: z.string(), }, async ({ id }) => { try { const data = await sendRpcRequest("event.get", [id]); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }], }; } catch (error) { logger.error("Error fetching event.get: %o", error); return { content: [ { type: "text", text: `Error fetching auth id: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } } );
- src/index.ts:234-234 (registration)Calls registerServerTools which includes the registration of the 'eventGet' tool among others on the MCP server.registerServerTools(server, sendRpcRequest, logger);