GetTypeInfo
Retrieve detailed ABAP type information from SAP systems to understand data structures and development artifacts.
Instructions
Retrieve ABAP type information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type_name | Yes | Name of the ABAP type |
Implementation Reference
- src/handlers/handleGetTypeInfo.ts:4-33 (handler)The handler function for the GetTypeInfo tool. It validates the type_name argument, encodes it, and makes ADT requests first to the domain source endpoint, falling back to the data element endpoint if not found. Uses shared utilities for requests and responses.export async function handleGetTypeInfo(args: any) { try { if (!args?.type_name) { throw new McpError(ErrorCode.InvalidParams, 'Type name is required'); } } catch (error) { return return_error(error); } const encodedTypeName = encodeURIComponent(args.type_name); try { const url = `${await getBaseUrl()}/sap/bc/adt/ddic/domains/${encodedTypeName}/source/main`; const response = await makeAdtRequest(url, 'GET', 30000); return return_response(response); } catch (error) { // no domain found, try data element try { const url = `${await getBaseUrl()}/sap/bc/adt/ddic/dataelements/${encodedTypeName}`; const response = await makeAdtRequest(url, 'GET', 30000); return return_response(response); } catch (error) { return return_error(error); } } }
- src/index.ts:228-237 (schema)Input schema for the GetTypeInfo tool, defining the required 'type_name' property.inputSchema: { type: 'object', properties: { type_name: { type: 'string', description: 'Name of the ABAP type' } }, required: ['type_name'] }
- src/index.ts:225-238 (registration)Tool registration in the ListTools response, including name, description, and input schema.{ name: 'GetTypeInfo', description: 'Retrieve ABAP type information', inputSchema: { type: 'object', properties: { type_name: { type: 'string', description: 'Name of the ABAP type' } }, required: ['type_name'] } },
- src/index.ts:323-324 (registration)Dispatch logic in the CallToolRequest handler that routes GetTypeInfo calls to the specific handler function.case 'GetTypeInfo': return await handleGetTypeInfo(request.params.arguments);
- src/index.ts:23-23 (registration)Import statement for the GetTypeInfo handler function.import { handleGetTypeInfo } from './handlers/handleGetTypeInfo';