List Notifications
list_notificationsRetrieve user notifications with pagination and filtering by read status, using offset or cursor.
Instructions
Get user notifications.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| first | No | Number of notifications to fetch | |
| offset | No | Offset for pagination | |
| after | No | Cursor for pagination | |
| unreadOnly | No | Show only unread notifications |
Implementation Reference
- src/util/mcp.ts:8-24 (helper)The text() helper utility used by listNotificationsHandler to format the response as MCP text content.
export function text(data: unknown) { if (typeof data === "string") { return { content: [{ type: "text" as const, text: data }] }; } if (data !== null && typeof data === "object" && !Array.isArray(data)) { const structuredContent = cloneJsonValue(data); return { content: [{ type: "text" as const, text: JSON.stringify(structuredContent) }], structuredContent, }; } return { content: [{ type: "text" as const, text: JSON.stringify(data) }], }; }