Skip to main content
Glama
ethanhan2014

SAP ADT MCP Server

by ethanhan2014

get_st05_trace_state

Retrieve the current ST05 performance trace state, showing active trace types, user filter, and server information.

Instructions

Get the current ST05 performance trace state — shows which trace types are active, the user filter, and server info.

Input Schema

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

Implementation Reference

  • Handler for 'get_st05_trace_state' tool that fetches ST05 trace state from the SAP system via client.getSt05TraceState(), parses the XML response to extract trace type statuses (SQL, buffer, enqueue, RFC, HTTP, auth, stack), server info, user filter, modification info, and returns a formatted text response showing whether trace is ACTIVE or INACTIVE.
    case "get_st05_trace_state": {
      const state = await client.getSt05TraceState();
      const sqlOn = state.match(/<ts:sqlOn>(\w+)<\/ts:sqlOn>/)?.[1];
      const bufOn = state.match(/<ts:bufOn>(\w+)<\/ts:bufOn>/)?.[1];
      const enqOn = state.match(/<ts:enqOn>(\w+)<\/ts:enqOn>/)?.[1];
      const rfcOn = state.match(/<ts:rfcOn>(\w+)<\/ts:rfcOn>/)?.[1];
      const httpOn = state.match(/<ts:httpOn>(\w+)<\/ts:httpOn>/)?.[1];
      const authOn = state.match(/<ts:authOn>(\w+)<\/ts:authOn>/)?.[1];
      const stackOn = state.match(/<ts:stackTraceOn>(\w+)<\/ts:stackTraceOn>/)?.[1];
      const traceUser = state.match(/<ts:traceUser>([^<]*)<\/ts:traceUser>/)?.[1] || "(none)";
      const selected = state.match(/<ts:isSelected>(\w+)<\/ts:isSelected>/)?.[1];
      const instance = state.match(/<ts:instance>([^<]+)<\/ts:instance>/)?.[1];
      const modUser = state.match(/<ts:modificationUser>([^<]*)<\/ts:modificationUser>/)?.[1];
      const modTime = state.match(/<ts:modificationDateTime>([^<]*)<\/ts:modificationDateTime>/)?.[1];
      const active = selected === "true" && (sqlOn === "true" || bufOn === "true" || enqOn === "true" || rfcOn === "true" || httpOn === "true" || authOn === "true");
      const lines = [
        `ST05 trace state: ${active ? "ACTIVE" : "INACTIVE"}`,
        `  Server:      ${instance}`,
        `  User filter: ${traceUser}`,
        `  SQL:         ${sqlOn}`,
        `  Buffer:      ${bufOn}`,
        `  Enqueue:     ${enqOn}`,
        `  RFC:         ${rfcOn}`,
        `  HTTP:        ${httpOn}`,
        `  Auth:        ${authOn}`,
        `  Stack trace: ${stackOn}`,
        `  Modified by: ${modUser} at ${modTime}`,
      ];
      return { content: [{ type: "text", text: lines.join("\n") }] };
    }
  • Schema/registration for 'get_st05_trace_state' tool in the ListToolsRequestSchema handler. Takes only optional system_id. No dedicated Zod schema needed since only SYSTEM_ID_PROP is used.
    name: "get_st05_trace_state",
    description: "Get the current ST05 performance trace state — shows which trace types are active, the user filter, and server info.",
    inputSchema: {
      type: "object" as const,
      properties: { ...SYSTEM_ID_PROP },
      required: [],
    },
  • Helper method in AdtClient that performs the actual HTTP GET request to the SAP ADT endpoint /sap/bc/adt/st05/trace/state to retrieve the ST05 performance trace state XML.
    async getSt05TraceState(): Promise<string> {
      const response = await this.http.get<string>(
        "/sap/bc/adt/st05/trace/state",
        { headers: { Accept: "*/*" }, responseType: "text" }
      );
      return response.data;
    }
Behavior4/5

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

The description clearly indicates a read operation ('Get') and outlines the returned information. Without annotations, it carries the burden, but it is sufficient for a simple getter.

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?

Single sentence that is front-loaded with the verb and resource, and no unnecessary words.

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

Completeness5/5

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

Given no output schema, the description adequately explains the return value (what the state shows). For a low-complexity tool, this is complete.

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% with a clear parameter description. The tool description does not add further parameter details beyond the schema, so baseline 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 specifies the verb 'Get', the resource 'ST05 performance trace state', and lists what the state includes (active trace types, user filter, server info). It distinguishes itself from sibling tools like enable/disable_st05_trace.

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 on when to use this tool versus alternatives like get_trace_hitlist or enable_st05_trace. It does not mention prerequisites or exclusions.

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