RuntimeListSystemMessages
List SM02 system messages with details on severity, validity period, and author. Filter by user, date range, or limit results.
Instructions
[runtime] List SM02 system messages. Returns structured entries with id, title, text, severity, validity period, and author.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | No | Filter by author username. | |
| max_results | No | Maximum number of messages to return. | |
| from | No | Start of time range in YYYYMMDDHHMMSS format. | |
| to | No | End of time range in YYYYMMDDHHMMSS format. |
Implementation Reference
- Main handler function that executes the RuntimeListSystemMessages tool logic. Uses AdtRuntimeClient to fetch system messages with optional filters (user, max_results, from, to).
export async function handleRuntimeListSystemMessages( context: HandlerContext, args: RuntimeListSystemMessagesArgs, ) { const { connection, logger } = context; try { const runtimeClient = new AdtRuntimeClient(connection, logger); const feeds = runtimeClient.getFeeds(); const messages = await feeds.systemMessages({ user: args?.user, maxResults: args?.max_results, from: args?.from, to: args?.to, }); return return_response({ data: JSON.stringify( { success: true, count: messages.length, messages, }, null, 2, ), status: 200, statusText: 'OK', headers: {}, config: {}, }); } catch (error: unknown) { logger?.error('Error listing system messages:', error); return return_error(error); } } - Tool definition with input schema for RuntimeListSystemMessages. Defines optional parameters: user (string), max_results (number), from (string YYYYMMDDHHMMSS), to (string YYYYMMDDHHMMSS).
export const TOOL_DEFINITION = { name: 'RuntimeListSystemMessages', available_in: ['onprem', 'cloud'] as const, description: '[runtime] List SM02 system messages. Returns structured entries with id, title, text, severity, validity period, and author.', inputSchema: { type: 'object', properties: { user: { type: 'string', description: 'Filter by author username.', }, max_results: { type: 'number', description: 'Maximum number of messages to return.', }, from: { type: 'string', description: 'Start of time range in YYYYMMDDHHMMSS format.', }, to: { type: 'string', description: 'End of time range in YYYYMMDDHHMMSS format.', }, }, required: [], }, } as const; - src/lib/handlers/groups/SystemHandlersGroup.ts:169-173 (registration)Registration of RuntimeListSystemMessages tool in SystemHandlersGroup.getHandlers() method, mapping the tool definition to the handler function.
{ toolDefinition: RuntimeListSystemMessages_Tool, handler: (args: any) => handleRuntimeListSystemMessages(this.context, args), },