list_traces
List ABAP runtime traces (SAT/SE30) for a given SAP user. Traces must be pre-recorded via SAP GUI. Optionally specify system ID.
Instructions
List ABAP runtime traces (SAT/SE30) for a user. Traces must be created via SAP GUI (transaction SAT or SE30) since the ADT REST API cannot profile programrun executions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | No | SAP username (default: current user) | |
| system_id | No | SAP system ID (e.g. DEV). Omit to use default system. |
Implementation Reference
- src/mcp-server.ts:531-542 (registration)Tool registration in ListToolsRequestSchema handler — defines tool name, description, and input schema for list_traces
{ name: "list_traces", description: "List ABAP runtime traces (SAT/SE30) for a user. Traces must be created via SAP GUI (transaction SAT or SE30) since the ADT REST API cannot profile programrun executions.", inputSchema: { type: "object" as const, properties: { user: { type: "string", description: "SAP username (default: current user)" }, ...SYSTEM_ID_PROP, }, required: [], }, }, - src/mcp-server.ts:79-79 (schema)Zod schema definition for list_traces input — accepts optional 'user' string
const TraceUserSchema = z.object({ user: z.string().optional() }); - src/mcp-server.ts:1141-1145 (handler)Handler in CallToolRequestSchema — parses args with TraceUserSchema, delegates to AdtClient.listTraces(user)
case "list_traces": { const { user } = TraceUserSchema.parse(args); const result = await client.listTraces(user); return { content: [{ type: "text", text: result }] }; } - src/adt-client.ts:233-240 (helper)Helper method on AdtClient — makes GET request to SAP ADT REST API to list ABAP runtime traces for a user
async listTraces(user?: string): Promise<string> { const u = encodeURIComponent((user ?? this.config.username).toUpperCase()); const response = await this.http.get<string>( `/sap/bc/adt/runtime/traces/abaptraces?user=${u}`, { headers: { Accept: "*/*" }, responseType: "text" } ); return response.data; }