Skip to main content
Glama
ethanhan2014

SAP ADT MCP Server

by ethanhan2014

create_trace_config

Create an ABAP runtime trace configuration to capture traces for a specific program, transaction, or other object. Specify object name, process type, and execution limit to diagnose performance issues.

Instructions

Create a trace collection configuration to capture an ABAP runtime trace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
object_nameYesObject name to trace (e.g. program or transaction)
process_typeNoProcess type: HTTP, DIALOG, RFC, etc. (default: any)
descriptionNoDescription for the trace configuration
max_executionsNoMaximum number of executions to capture (default: 10)
object_typeNoObject type: any, report, transaction, functionmodule, url (default: any)
system_idNoSAP system ID (e.g. DEV). Omit to use default system.

Implementation Reference

  • Tool registration: 'create_trace_config' is listed in the ListToolsRequestSchema handler with its name, description, and input schema.
    {
      name: "create_trace_config",
      description: "Create a trace collection configuration to capture an ABAP runtime trace",
      inputSchema: {
        type: "object" as const,
        properties: {
          object_name: { type: "string", description: "Object name to trace (e.g. program or transaction)" },
          process_type: { type: "string", description: "Process type: HTTP, DIALOG, RFC, etc. (default: any)" },
          description: { type: "string", description: "Description for the trace configuration" },
          max_executions: { type: "number", description: "Maximum number of executions to capture (default: 10)" },
          object_type: { type: "string", description: "Object type: any, report, transaction, functionmodule, url (default: any)" },
          ...SYSTEM_ID_PROP,
        },
        required: ["object_name"],
      },
    },
  • Zod schema CreateTraceConfigSchema defines the input validation for create_trace_config: object_name (required), process_type, description, max_executions, object_type (all optional).
    const CreateTraceConfigSchema = z.object({
      object_name: z.string(),
      process_type: z.string().optional(),
      description: z.string().optional(),
      max_executions: z.number().optional(),
      object_type: z.string().optional(),
    });
  • Handler logic for create_trace_config in the CallToolRequestSchema: parses args with CreateTraceConfigSchema, then calls client.createTraceConfig() with the parsed parameters and returns the result.
    case "create_trace_config": {
      const { object_name, process_type, description, max_executions, object_type } = CreateTraceConfigSchema.parse(args);
      const result = await client.createTraceConfig(object_name, process_type, description, max_executions, object_type);
      return { content: [{ type: "text", text: result }] };
    }
  • Actual implementation: AdtClient.createTraceConfig() method that builds URLSearchParams with objectName, processType (default 'any'), description (default ''), maximalExecutions (default 10), objectType (default 'any'), and sends a POST request to the SAP ADT runtime traces endpoint.
    async createTraceConfig(objectName: string, processType = "any", description = "", maxExecutions = 10, objectType = "any"): Promise<string> {
      const processTypeUri = processType.startsWith("/sap/")
        ? processType
        : `/sap/bc/adt/runtime/traces/abaptraces/processtypes/${processType}`;
      const objectTypeUri = objectType.startsWith("/sap/")
        ? objectType
        : `/sap/bc/adt/runtime/traces/abaptraces/objecttypes/${objectType}`;
      const params = new URLSearchParams({
        objectName,
        objectType: objectTypeUri,
        processType: processTypeUri,
        description,
        maximalExecutions: String(maxExecutions),
      });
      return (await this.postWithCsrf(
        `/sap/bc/adt/runtime/traces/abaptraces/requests?${params.toString()}`,
        "",
        "*/*"
      )).data as string;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, and the description does not disclose any behavioral traits such as whether the configuration starts tracing immediately, permissions required, or side effects. It only states the creation act.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that efficiently conveys the tool's purpose with no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (6 parameters, no output schema, no annotations), the description lacks crucial context such as what the return value is, how to use the created config, or subsequent steps. It is incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema already explains all parameters. The description adds no extra meaning beyond what the schema provides, meeting the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool creates a trace collection configuration to capture an ABAP runtime trace, with a specific verb and resource. It distinguishes from sibling tools like delete_trace_config or get_trace_hitlist.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like list_traces or enable_cross_trace. The purpose is implied but not explicitly contrasted with other trace-related tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ethanhan2014/sap-adt-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server