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';
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Retrieve' which implies a read operation, but doesn't specify permissions needed, rate limits, error handling, or what the return format looks like. This is inadequate for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded and clear, though it could benefit from more detail to improve other dimensions without sacrificing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'Retrieve' entails (e.g., returns metadata, fields, or full definition), making it hard for an agent to understand the tool's behavior and output without additional context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with 'structure_name' fully documented. The description doesn't add any parameter details beyond what the schema provides, such as examples or constraints. With high schema coverage, the baseline score of 3 is appropriate as the schema handles the parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Retrieve ABAP Structure' clearly states the action (retrieve) and resource (ABAP Structure), but it doesn't differentiate from siblings like GetClass, GetFunction, GetTable, etc. It's vague about what specifically distinguishes retrieving a structure from retrieving other ABAP objects, though the purpose is understandable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, context for use, or comparisons to sibling tools like GetTypeInfo or SearchObject, leaving the agent with no usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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