Skip to main content
Glama

GetStructure

Retrieve ABAP structure definitions from SAP systems to analyze data models and development artifacts for integration or debugging purposes.

Instructions

Retrieve ABAP Structure

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
structure_nameYesName of the ABAP Structure

Implementation Reference

  • The core handler function that executes the GetStructure tool logic by fetching the structure source code via ADT API.
    export async function handleGetStructure(args: any) { try { if (!args?.structure_name) { throw new McpError(ErrorCode.InvalidParams, 'Structure name is required'); } const encodedStructureName = encodeURIComponent(args.structure_name); const url = `${await getBaseUrl()}/sap/bc/adt/ddic/structures/${encodedStructureName}/source/main`; const response = await makeAdtRequest(url, 'GET', 30000); return return_response(response); } catch (error) { return return_error(error); } }
  • Input schema defining the required 'structure_name' parameter for the GetStructure tool.
    inputSchema: { type: 'object', properties: { structure_name: { type: 'string', description: 'Name of the ABAP Structure' } }, required: ['structure_name'] }
  • src/index.ts:315-316 (registration)
    Dispatches calls to the 'GetStructure' tool to the corresponding handler function.
    case 'GetStructure': return await handleGetStructure(request.params.arguments);
  • src/index.ts:164-177 (registration)
    Registers the GetStructure tool in the list of available tools, including name, description, and schema.
    { name: 'GetStructure', description: 'Retrieve ABAP Structure', inputSchema: { type: 'object', properties: { structure_name: { type: 'string', description: 'Name of the ABAP Structure' } }, required: ['structure_name'] } },
  • src/index.ts:19-19 (registration)
    Imports the GetStructure handler function.
    import { handleGetStructure } from './handlers/handleGetStructure';

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