Skip to main content
Glama

GetInterface

Retrieve ABAP interface source code from SAP systems to analyze or implement development artifacts.

Instructions

Retrieve ABAP interface source code

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
interface_nameYesName of the ABAP interface

Implementation Reference

  • The main handler function for the 'GetInterface' tool. It validates the interface_name parameter, constructs the ADT URL, makes a GET request to fetch the interface source code, and returns the response or error.
    export async function handleGetInterface(args: any) {
        try {
            if (!args?.interface_name) {
                throw new McpError(ErrorCode.InvalidParams, 'Interface name is required');
            }
            const encodedInterfaceName = encodeURIComponent(args.interface_name);
            const url = `${await getBaseUrl()}/sap/bc/adt/oo/interfaces/${encodedInterfaceName}/source/main`;
            const response = await makeAdtRequest(url, 'GET', 30000);
            return return_response(response);
        } catch (error) {
            return return_error(error);
        }
    }
  • Input schema definition for the GetInterface tool, specifying the required 'interface_name' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        interface_name: {
          type: 'string',
          description: 'Name of the ABAP interface'
        }
      },
      required: ['interface_name']
    }
  • src/index.ts:286-299 (registration)
    Registration of the GetInterface tool in the ListTools response, including name, description, and input schema.
    {
      name: 'GetInterface',
      description: 'Retrieve ABAP interface source code',
      inputSchema: {
        type: 'object',
        properties: {
          interface_name: {
            type: 'string',
            description: 'Name of the ABAP interface'
          }
        },
        required: ['interface_name']
      }
    }
  • src/index.ts:329-330 (registration)
    Dispatch logic in the CallToolRequest handler that routes 'GetInterface' calls to the handleGetInterface function.
    case 'GetInterface':
      return await handleGetInterface(request.params.arguments);
  • Import statement for the GetInterface handler function.
    import { handleGetInterface } from './handlers/handleGetInterface';
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves source code but doesn't describe what 'retrieve' entails (e.g., read-only operation, format of returned data, error handling, or authentication requirements). This leaves significant gaps for a tool that presumably accesses system resources.

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, efficient sentence with zero wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly.

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?

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'retrieve' returns (e.g., raw code, metadata, error formats) or address behavioral aspects like permissions or system impact, leaving the agent with incomplete context for safe and effective use.

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 the single parameter 'interface_name' fully documented in the schema. The description doesn't add any parameter-specific details beyond what the schema provides, such as naming conventions or examples, so it meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('Retrieve') and the resource ('ABAP interface source code'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like GetClass or GetFunction, which follow the same pattern for different ABAP object types.

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 GetClass or GetFunction. The description doesn't mention prerequisites, context for interface retrieval, or any limitations compared to other retrieval tools in the sibling list.

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/mario-andreschak/mcp-abap-adt'

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