get_event
Retrieve detailed information about a specific log event using its unique event ID, enabling precise analysis and troubleshooting in SEQ structured logging.
Instructions
Get detailed information about a specific log event
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| eventId | Yes |
Implementation Reference
- src/index.ts:186-205 (handler)The main handler function for the 'get_event' tool. It validates input arguments using getEventSchema, fetches the specific event from the SeqClient, formats the event data into JSON, and returns it as a text content response.private async getEvent(args: unknown) { const params = getEventSchema.parse(args); const event = await this.seqClient.getEvent(params.eventId); return { content: [ { type: 'text', text: JSON.stringify({ id: event.Id, timestamp: event.TimeStamp, level: event.Level, messageTemplate: event.MessageTemplate, message: event.RenderedMessage, properties: event.Properties, exception: event.Exception }, null, 2) } ] };
- src/index.ts:25-27 (schema)Zod schema defining the input parameters for the 'get_event' tool, requiring an 'eventId' string.const getEventSchema = z.object({ eventId: z.string().describe('The ID of the event to retrieve') });
- src/index.ts:75-82 (registration)Registration of the 'get_event' tool in the ListTools response, including name, description, and input schema referencing getEventSchema.{ name: 'get_event', description: 'Get detailed information about a specific log event', inputSchema: { type: 'object', properties: getEventSchema.shape, required: ['eventId'] }
- src/seq-client.ts:50-52 (helper)Helper method in SeqClient that performs the actual HTTP GET request to retrieve a specific Seq event by ID from the Seq server API.async getEvent(id: string): Promise<SeqEvent> { const response = await this.client.get<SeqEvent>(`/api/events/${id}`); return response.data;