Skip to main content
Glama
ethanhan2014

SAP ADT MCP Server

by ethanhan2014

get_table

Fetch ABAP database table definition from SAP system. Provide table name and optional system ID to retrieve table structure.

Instructions

Fetch ABAP database table definition from SAP system

Input Schema

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

Implementation Reference

  • Tool registration for 'get_table' in the ListToolsRequestSchema handler. Defines the tool name, description, and input schema (requires 'name' property with optional system_id).
    {
      name: "get_table",
      description: "Fetch ABAP database table definition from SAP system",
      inputSchema: {
        type: "object" as const,
        properties: { name: { type: "string", description: "Table name (e.g. VBAK)" }, ...SYSTEM_ID_PROP },
        required: ["name"],
      },
    },
  • Handler implementation for the 'get_table' tool. Parses the 'name' argument, calls client.getSource() with the ADT URI path for DDIC tables (/sap/bc/adt/ddic/tables/{name}/source/main), and returns the source code as text.
    case "get_table": {
      const { name: tableName } = NameSchema.parse(args);
      const source = await client.getSource(
        `/sap/bc/adt/ddic/tables/${encodeURIComponent(tableName.toUpperCase())}/source/main`
      );
      return { content: [{ type: "text", text: source }] };
    }
  • The getSource() helper method on AdtClient. Performs an HTTP GET request with Accept: text/plain to fetch the source code for any ADT object, including DDIC tables used by get_table.
    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 used by get_table for input validation. Defines a required string property 'name'.
    const NameSchema = z.object({ name: z.string() });
Behavior3/5

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

Description implies a read operation but lacks explicit declaration of side effects or permissions. With no annotations, it partially fulfills disclosure but doesn't elaborate on network dependencies or potential errors.

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?

Single sentence with no wasted words; starts with verb and clearly states purpose. Efficient and well-structured.

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

Completeness4/5

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

Adequate for a simple retrieval tool with two parameters and no output schema. Lacks details on return format or error handling but is sufficient given low complexity.

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 covers 100% of parameters with clear descriptions (e.g., 'Table name (e.g. VBAK)'). The description adds no extra meaning beyond the schema, meeting the baseline.

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 ('ABAP database table definition'), distinguishing it from sibling 'get_*' tools that fetch other entities like classes or CDS views.

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 versus alternatives, such as when to use get_table vs. get_structure or other data retrieval tools. Missing context on prerequisites or exclusions.

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