Skip to main content
Glama
ethanhan2014

SAP ADT MCP Server

by ethanhan2014

get_interface

Retrieve the full source code of an ABAP interface from an SAP system. Provide the interface name and optionally the system ID to access the interface definition.

Instructions

Fetch ABAP interface source code from SAP system

Input Schema

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

Implementation Reference

  • Tool registration for 'get_interface' in the ListToolsRequestSchema handler, defining the tool name, description, and input schema.
      name: "get_interface",
      description: "Fetch ABAP interface source code from SAP system",
      inputSchema: {
        type: "object" as const,
        properties: { name: { type: "string", description: "Interface name (e.g. IF_ABAP_TIMER_HANDLER)" }, ...SYSTEM_ID_PROP },
        required: ["name"],
      },
    },
  • The input schema used by the 'change_interface' tool (which references get_interface in its description), but the 'get_interface' tool itself uses NameSchema (name only).
    const ChangeInterfaceSchema = z.object({
      name: z.string(),
      source: z.string(),
    });
  • Handler implementation for 'get_interface'. Parses the interface name, constructs the ADT URI for interfaces, and makes an HTTP GET request via AdtClient.getSource() to fetch the ABAP interface source code.
    case "get_interface": {
      const { name: ifName } = NameSchema.parse(args);
      const source = await client.getSource(
        `/sap/bc/adt/oo/interfaces/${encodeURIComponent(ifName.toUpperCase())}/source/main`
      );
      return { content: [{ type: "text", text: source }] };
    }
  • The getSource() helper method on AdtClient that performs the actual HTTP GET request to fetch source code from an ADT endpoint. Used by the get_interface handler.
    async getSource(path: string): Promise<string> {
      const response = await this.http.get<string>(path, {
        headers: { Accept: "text/plain" },
        responseType: "text",
      });
      return response.data;
    }
Behavior2/5

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

No annotations provided, and the description omits behavioral details such as idempotency, error behavior, or permission requirements, leaving the agent with incomplete safety cues.

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

Conciseness4/5

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

Extremely concise single sentence, but could be slightly more informative without losing brevity.

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?

No output schema, and the description does not clarify the return format (e.g., source code as a string), leaving ambiguity for the agent.

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 coverage is 100%, so the schema already documents both parameters. The description adds no extra meaning beyond what the schema provides.

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 action ('Fetch') and the resource ('ABAP interface source code'), making it distinct from siblings like get_class or get_cds_view.

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 change_interface or create_interface, nor any 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