GetFunctionGroup
Retrieve ABAP Function Group source code from SAP systems to access development artifacts for analysis or integration purposes.
Instructions
Retrieve ABAP Function Group source code
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| function_group | Yes | Name of the function module |
Implementation Reference
- The handler function that implements the GetFunctionGroup tool logic, fetching source code from SAP ADT API.export async function handleGetFunctionGroup(args: any) { try { if (!args?.function_group) { throw new McpError(ErrorCode.InvalidParams, 'Function Group is required'); } const encodedFunctionGroup = encodeURIComponent(args.function_group); const url = `${await getBaseUrl()}/sap/bc/adt/functions/groups/${encodedFunctionGroup}/source/main`; const response = await makeAdtRequest(url, 'GET', 30000); return return_response(response); } catch (error) { return return_error(error); } }
- src/index.ts:135-144 (schema)Input schema definition for the GetFunctionGroup tool, specifying the required 'function_group' parameter.inputSchema: { type: 'object', properties: { function_group: { type: 'string', description: 'Name of the function module' } }, required: ['function_group'] }
- src/index.ts:132-145 (registration)Tool registration in the listTools response, including name, description, and input schema.{ name: 'GetFunctionGroup', description: 'Retrieve ABAP Function Group source code', inputSchema: { type: 'object', properties: { function_group: { type: 'string', description: 'Name of the function module' } }, required: ['function_group'] } },
- src/index.ts:313-314 (registration)Dispatch logic in CallToolRequest handler that routes to the GetFunctionGroup handler function.case 'GetFunctionGroup': return await handleGetFunctionGroup(request.params.arguments);
- src/index.ts:16-16 (registration)Import statement for the GetFunctionGroup handler.import { handleGetFunctionGroup } from './handlers/handleGetFunctionGroup';