Skip to main content
Glama
ethanhan2014

SAP ADT MCP Server

by ethanhan2014

get_cds_view

Retrieve the DDL source definition of a CDS view from an SAP system using the view name, optionally specifying system ID.

Instructions

Fetch CDS view DDL source definition from SAP system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCDS view name (e.g. I_BUSINESSPARTNER)
system_idNoSAP system ID (e.g. DEV). Omit to use default system.

Implementation Reference

  • Tool 'get_cds_view' is registered in the ListToolsRequestSchema handler with input schema requiring a 'name' parameter (CDS view name).
      name: "get_cds_view",
      description: "Fetch CDS view DDL source definition from SAP system",
      inputSchema: {
        type: "object" as const,
        properties: { name: { type: "string", description: "CDS view name (e.g. I_BUSINESSPARTNER)" }, ...SYSTEM_ID_PROP },
        required: ["name"],
      },
    },
  • Handler for 'get_cds_view': parses the name argument, then calls client.getSource() with the ADT URI for DDL sources (/sap/bc/adt/ddic/ddl/sources/{name}/source/main). Returns the CDS view DDL source code.
    case "get_cds_view": {
      const { name: cdsName } = NameSchema.parse(args);
      const source = await client.getSource(
        `/sap/bc/adt/ddic/ddl/sources/${encodeURIComponent(cdsName.toUpperCase())}/source/main`
      );
      return { content: [{ type: "text", text: source }] };
    }
  • AdtClient.getSource() is the helper that performs the HTTP GET request to fetch source code from the SAP ADT system at the given path.
    async getSource(path: string): Promise<string> {
      const response = await this.http.get<string>(path, {
        headers: { Accept: "text/plain" },
        responseType: "text",
      });
      return response.data;
    }
Behavior2/5

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

No annotations are provided, and the description only states the action ('Fetch') without disclosing behavioral traits such as permissions, side effects, or rate limits. The absence of details leaves the agent with limited understanding of tool behavior.

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?

The description is a single, front-loaded sentence that efficiently conveys the tool's purpose without any wasted words.

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?

For a simple fetch tool, the description adequately conveys the return value (DDL source definition) and parameters. It lacks details about the exact structure of the return, but this is not critical given the tool's simplicity.

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% coverage with descriptions for both parameters; the description does not add meaning beyond the schema, meeting the baseline for parameter semantics.

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 verb 'Fetch' and the specific resource 'CDS view DDL source definition', distinguishing it from sibling tools like create_cds_view and change_cds_view.

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

Usage Guidelines3/5

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

No explicit when-to-use or alternatives are provided; usage is implied by the name and sibling tools, but no guidance is given for exclusion or context.

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