Skip to main content
Glama

GetInclude

Retrieve ABAP include source code from SAP systems to access development artifacts for analysis or integration purposes.

Instructions

Retrieve ABAP Include Source Code

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_nameYesName of the ABAP Include

Implementation Reference

  • The handler function that implements the logic for the GetInclude tool. It validates the include_name argument, constructs the ADT API URL, performs a GET request to fetch the source code, and returns the response or handles errors.
    export async function handleGetInclude(args: any) { try { if (!args?.include_name) { throw new McpError(ErrorCode.InvalidParams, 'Include name is required'); } const encodedIncludeName = encodeURIComponent(args.include_name); const url = `${await getBaseUrl()}/sap/bc/adt/programs/includes/${encodedIncludeName}/source/main`; const response = await makeAdtRequest(url, 'GET', 30000); return return_response(response); } catch (error) { return return_error(error); } }
  • src/index.ts:239-252 (registration)
    Registration of the GetInclude tool in the ListTools response, including its name, description, and input schema definition.
    { name: 'GetInclude', description: 'Retrieve ABAP Include Source Code', inputSchema: { type: 'object', properties: { include_name: { type: 'string', description: 'Name of the ABAP Include' } }, required: ['include_name'] } },
  • src/index.ts:325-326 (registration)
    Dispatch logic in the CallToolRequest handler that routes GetInclude calls to the handleGetInclude function.
    case 'GetInclude': return await handleGetInclude(request.params.arguments);
  • Input schema definition for the GetInclude tool, specifying the required 'include_name' parameter.
    inputSchema: { type: 'object', properties: { include_name: { type: 'string', description: 'Name of the ABAP Include' } }, required: ['include_name'] }

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