Skip to main content
Glama
ethanhan2014

SAP ADT MCP Server

by ethanhan2014

disable_st05_trace

Stop all active ST05 performance trace collection on the SAP server, ending performance monitoring to free system resources.

Instructions

Disable ST05 performance trace. Stops all active trace collection on the server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
system_idNoSAP system ID (e.g. DEV). Omit to use default system.

Implementation Reference

  • Core handler that disables the ST05 trace. Reads current state, then sends an XML PUT request to /sap/bc/adt/st05/trace/state with all trace types set to false and isSelected=false, effectively stopping all trace collection.
      async disableSt05Trace(): Promise<string> {
        const state = await this.getSt05TraceState();
    
        const instanceMatch = state.match(/<ts:instance>([^<]+)<\/ts:instance>/);
        const hostMatch = state.match(/<ts:host>([^<]+)<\/ts:host>/);
        const instance = instanceMatch?.[1] ?? "";
        const host = hostMatch?.[1] ?? "";
    
        const xml = `<?xml version="1.0" encoding="UTF-8"?>
    <ts:traceStateInstanceTable xmlns:ts="http://www.sap.com/adt/tools/performance/tracestate">
      <ts:traceStateInstance>
        <ts:instance>${this.escapeXml(instance)}</ts:instance>
        <ts:host>${this.escapeXml(host)}</ts:host>
        <ts:isLocal>true</ts:isLocal>
        <ts:isSelected>false</ts:isSelected>
        <ts:modificationUser>${this.escapeXml(this.config.username.toUpperCase())}</ts:modificationUser>
        <ts:modificationDateTime>${new Date().toISOString().replace(/\.\d+Z$/, "Z")}</ts:modificationDateTime>
        <ts:traceTypes>
          <ts:sqlOn>false</ts:sqlOn>
          <ts:bufOn>false</ts:bufOn>
          <ts:enqOn>false</ts:enqOn>
          <ts:rfcOn>false</ts:rfcOn>
          <ts:httpOn>false</ts:httpOn>
          <ts:apcOn>false</ts:apcOn>
          <ts:amcOn>false</ts:amcOn>
          <ts:authOn>false</ts:authOn>
        </ts:traceTypes>
        <ts:traceProperties>
          <ts:includeMissingTableNameOn>false</ts:includeMissingTableNameOn>
          <ts:authErrorsOnly>false</ts:authErrorsOnly>
          <ts:stackTraceOn>false</ts:stackTraceOn>
          <ts:includedTables/>
          <ts:excludedTables/>
        </ts:traceProperties>
        <ts:traceFilter>
          <ts:traceUser/>
          <ts:transactionCode/>
          <ts:program/>
          <ts:rfcFunction/>
          <ts:url/>
          <ts:wpId/>
        </ts:traceFilter>
      </ts:traceStateInstance>
    </ts:traceStateInstanceTable>`;
    
        return (await this.putWithCsrf(
          "/sap/bc/adt/st05/trace/state",
          xml,
          "application/vnd.sap.adt.perf.trace.state.v1+xml",
          "application/vnd.sap.adt.perf.trace.state.v1+xml"
        )).data as string;
      }
    
      private escapeXml(s: string): string {
        return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
      }
    
      private async fetchCsrfToken(): Promise<void> {
        const response = await this.http.get("/sap/bc/adt/discovery", {
  • MCP tool handler in the switch statement that routes disable_st05_trace calls to the AdtClient.disableSt05Trace() method.
    case "disable_st05_trace": {
      await client.disableSt05Trace();
      return { content: [{ type: "text", text: "ST05 trace disabled." }] };
    }
  • Tool registration in the ListToolsRequestSchema handler. Defines the tool name, description, and input schema (only optional system_id).
    {
      name: "disable_st05_trace",
      description: "Disable ST05 performance trace. Stops all active trace collection on the server.",
      inputSchema: {
        type: "object" as const,
        properties: { ...SYSTEM_ID_PROP },
        required: [],
      },
    },
  • Helper method that fetches the current ST05 trace state from the SAP server, used by disableSt05Trace() to read the current instance/host info before sending the disable request.
    async getSt05TraceState(): Promise<string> {
      const response = await this.http.get<string>(
        "/sap/bc/adt/st05/trace/state",
        { headers: { Accept: "*/*" }, responseType: "text" }
      );
      return response.data;
    }
Behavior2/5

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

With no annotations, the description carries full burden. It only states the basic effect (stops trace collection) but does not disclose side effects, reversibility, permissions, or impact on existing traces. This is insufficient for a mutation tool.

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 extremely concise with two sentences that provide essential information without extraneous content. Front-loaded with the main action.

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

Completeness3/5

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

Given the simple tool (one optional param, no output schema), the description is minimally adequate but lacks details on effect granularity (e.g., does it clear traces?) and comparison with delete_trace. Missing guidance for agents.

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?

The input schema fully describes the single parameter (system_id) with an example and default behavior. The description adds no additional meaning beyond the schema, so baseline score of 3 is appropriate.

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 action (disable) and the resource (ST05 performance trace), and it specifies that it stops all active trace collection. This distinguishes it from sibling tools like enable_st05_trace or get_st05_trace_state.

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 such as delete_trace or disable_cross_trace. It does not mention context, prerequisites, or edge cases.

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