list-events
Retrieve event subscriptions with pagination support, field selection, and option to include deleted or all entities.
Instructions
List event subscriptions
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Comma-separated fields to include | |
| limit | No | Number of results per page | |
| before | No | Cursor for backward pagination | |
| after | No | Cursor for forward pagination | |
| include | No | Include deleted entities | non-deleted |
Implementation Reference
- src/tools/events.ts:14-16 (handler)The listEvents async function that executes the tool logic by making a GET request to /events/subscriptions with the provided parameters.
export async function listEvents(params: z.infer<typeof listEventsSchema>) { return omClient.get("/events/subscriptions", params); } - src/tools/events.ts:6-12 (schema)Zod schema defining input parameters for list-events: fields, limit (default 10), before/after cursors for pagination, and include filter (non-deleted by default).
export const listEventsSchema = z.object({ fields: z.string().optional().describe("Comma-separated fields to include"), limit: z.coerce.number().optional().default(10).describe("Number of results per page"), before: z.string().optional().describe("Cursor for backward pagination"), after: z.string().optional().describe("Cursor for forward pagination"), include: z.enum(["non-deleted", "deleted", "all"]).optional().default("non-deleted").describe("Include deleted entities"), }); - src/index.ts:410-410 (registration)Registration of the 'list-events' tool via the tool() function, wiring the schema and handler together with a description 'List event subscriptions'.
tool("list-events", "List event subscriptions", listEventsSchema.shape, wrapToolHandler(listEvents)); - src/index.ts:124-124 (registration)Import of listEventsSchema and listEvents from ./tools/events.js into the registration file.
import { listEventsSchema, listEvents, getEventSubscriptionSchema, getEventSubscription, getEventSubscriptionByNameSchema, getEventSubscriptionByName } from "./tools/events.js";