Skip to main content
Glama
ethanhan2014

SAP ADT MCP Server

by ethanhan2014

get_structure

Fetch the definition of a Data Dictionary (DDIC) structure from an SAP system. Provide the structure name and optionally the system ID to specify the target system.

Instructions

Fetch DDIC structure definition from SAP system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesStructure name (e.g. BAPISDHD1)
system_idNoSAP system ID (e.g. DEV). Omit to use default system.

Implementation Reference

  • Handler for the 'get_structure' tool. Parses the structure name from the input, then calls client.getSource() with the ADT URI for DDIC structures to fetch the source code.
    case "get_structure": {
      const { name: structName } = NameSchema.parse(args);
      const source = await client.getSource(
        `/sap/bc/adt/ddic/structures/${encodeURIComponent(structName.toUpperCase())}/source/main`
      );
      return { content: [{ type: "text", text: source }] };
    }
  • Registration of the 'get_structure' tool in the ListToolsRequestSchema handler, defining its name, description, and input schema (requires 'name' parameter for the structure name).
    {
      name: "get_structure",
      description: "Fetch DDIC structure definition from SAP system",
      inputSchema: {
        type: "object" as const,
        properties: { name: { type: "string", description: "Structure name (e.g. BAPISDHD1)" }, ...SYSTEM_ID_PROP },
        required: ["name"],
      },
    },
  • The getSource() helper method on AdtClient that performs the actual HTTP GET request to fetch source code from SAP ADT, used by the get_structure handler.
    async getSource(path: string): Promise<string> {
      const response = await this.http.get<string>(path, {
        headers: { Accept: "text/plain" },
        responseType: "text",
      });
      return response.data;
    }
  • The NameSchema Zod schema used to validate the 'name' parameter passed to get_structure (and other tools).
    const NameSchema = z.object({ name: z.string() });
    const FunctionModuleSchema = z.object({
Behavior2/5

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

With no annotations, the description carries full burden but fails to disclose behavioral traits like error handling, authorization requirements, or side effects. It only implies a read operation.

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

Conciseness5/5

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

A single, well-formed sentence with no redundant information. Ideal length for a straightforward fetch tool.

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?

No output schema and no description of the returned structure definition. The agent cannot anticipate the response format or content, which is critical for a fetch operation.

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?

Schema coverage is 100%, and the description provides an example for the name parameter but no additional meaning beyond what the schema already offers. Baseline 3 is appropriate.

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

Purpose5/5

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

The description clearly states the action ('Fetch') and resource ('DDIC structure definition from SAP system'), differentiating from sibling tools like get_table or get_class.

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 on when to use this tool vs alternatives (e.g., get_table for table definitions). The description does not mention prerequisites or preferred scenarios.

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/ethanhan2014/sap-adt-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server