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';

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