get-event-subscription-by-name
Get event subscription details by name, optionally specifying fields and inclusion status.
Instructions
Get event subscription by name
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Event Subscription name | |
| fields | No | Comma-separated fields to include | |
| include | No |
Implementation Reference
- src/tools/events.ts:39-42 (handler)The handler function for get-event-subscription-by-name. Extracts the 'name' from params, constructs an API GET request to `/events/subscriptions/name/{encodedName}` using omClient.
export async function getEventSubscriptionByName(params: z.infer<typeof getEventSubscriptionByNameSchema>) { const { name, ...query } = params; return omClient.get(`/events/subscriptions/name/${encodeURIComponent(name)}`, query); } - src/tools/events.ts:33-37 (schema)The Zod schema for get-event-subscription-by-name, defining input parameters: name (required string), fields (optional string), and include (optional enum).
export const getEventSubscriptionByNameSchema = z.object({ name: z.string().describe("Event Subscription name"), fields: z.string().optional().describe("Comma-separated fields to include"), include: z.enum(["non-deleted", "deleted", "all"]).optional(), }); - src/index.ts:412-412 (registration)Registration of the tool in the MCP server using the tool() function with schema and wrapped handler.
tool("get-event-subscription-by-name", "Get event subscription by name", getEventSubscriptionByNameSchema.shape, wrapToolHandler(getEventSubscriptionByName)); - src/index.ts:124-124 (registration)Import statement that brings in getEventSubscriptionByNameSchema and getEventSubscriptionByName from the events module.
import { listEventsSchema, listEvents, getEventSubscriptionSchema, getEventSubscription, getEventSubscriptionByNameSchema, getEventSubscriptionByName } from "./tools/events.js";