RuntimeGetDumpById
Read a specific ABAP runtime dump by its ID to view full content, summary, or formatted details for analysis.
Instructions
[runtime] Read a specific ABAP runtime dump by its ID. First use RuntimeListFeeds to find dumps and get their IDs, then pass dump_id here to read the full dump content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dump_id | Yes | Full runtime dump ID (e.g. from RuntimeListFeeds). | |
| view | No | Dump view mode: default payload, summary section, or formatted long text. | default |
| response_mode | No | Controls what is returned: "payload" — full parsed dump data, "summary" — compact key facts only (title, exception, program, line, user, date…), "both" — summary + full payload. | both |
Implementation Reference
- Main handler function that reads a specific ABAP runtime dump by its ID using AdtRuntimeClient, parses the payload to JSON, optionally extracts a summary of key facts, and returns the result based on the response_mode parameter.
export async function handleRuntimeGetDumpById( context: HandlerContext, args: RuntimeGetDumpByIdArgs, ) { const { connection, logger } = context; try { const dumpId = args?.dump_id?.trim(); if (!dumpId) { throw new Error( 'dump_id is required. Use RuntimeListFeeds to find dump IDs first.', ); } const view = args.view ?? 'default'; const responseMode = args.response_mode ?? 'both'; const runtimeClient = new AdtRuntimeClient(connection, logger); const response = await runtimeClient.getDumps().getById(dumpId, { view }); const parsedPayload = parseRuntimePayloadToJson(response.data); const result: Record<string, unknown> = { success: true, dump_id: dumpId, view, status: response.status, }; if (responseMode === 'summary' || responseMode === 'both') { const summary: Record<string, unknown> = {}; collectKeyFacts(parsedPayload, summary); result.summary = summary; } if (responseMode === 'payload' || responseMode === 'both') { result.payload = parsedPayload; } return return_response({ data: JSON.stringify(result, null, 2), status: response.status, statusText: response.statusText, headers: response.headers, config: response.config, }); } catch (error: any) { logger?.error('Error reading runtime dump by ID:', error); return return_error(error); } } - Tool definition including name 'RuntimeGetDumpById', inputSchema with dump_id (required), view, and response_mode parameters.
export const TOOL_DEFINITION = { name: 'RuntimeGetDumpById', available_in: ['onprem', 'cloud'] as const, description: '[runtime] Read a specific ABAP runtime dump by its ID. First use RuntimeListFeeds to find dumps and get their IDs, then pass dump_id here to read the full dump content.', inputSchema: { type: 'object', properties: { dump_id: { type: 'string', description: 'Full runtime dump ID (e.g. from RuntimeListFeeds).', }, view: { type: 'string', enum: ['default', 'summary', 'formatted'], description: 'Dump view mode: default payload, summary section, or formatted long text.', default: 'default', }, response_mode: { type: 'string', enum: ['payload', 'summary', 'both'], description: 'Controls what is returned: "payload" — full parsed dump data, "summary" — compact key facts only (title, exception, program, line, user, date…), "both" — summary + full payload.', default: 'both', }, }, required: ['dump_id'], }, } as const; - TypeScript interface RuntimeGetDumpByIdArgs defining the types for the input arguments.
interface RuntimeGetDumpByIdArgs { dump_id: string; view?: 'default' | 'summary' | 'formatted'; response_mode?: 'payload' | 'summary' | 'both'; } - src/lib/handlers/groups/SystemHandlersGroup.ts:77-80 (registration)Import of handleRuntimeGetDumpById and its TOOL_DEFINITION from the handler file.
import { handleRuntimeGetDumpById, TOOL_DEFINITION as RuntimeGetDumpById_Tool, } from '../../../handlers/system/readonly/handleRuntimeGetDumpById'; - src/lib/handlers/groups/SystemHandlersGroup.ts:146-149 (registration)Registration of RuntimeGetDumpById_Tool and its handler in the SystemHandlersGroup.
{ toolDefinition: RuntimeGetDumpById_Tool, handler: (args: any) => handleRuntimeGetDumpById(this.context, args), },