Skip to main content
Glama
ethanhan2014

SAP ADT MCP Server

by ethanhan2014

get_package

Retrieve a list of all objects with their types and descriptions contained in an ABAP package from an SAP system by specifying the package name and optional system ID.

Instructions

Fetch ABAP package contents (list of objects with types and descriptions) from SAP system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesPackage name (e.g. $TMP)
system_idNoSAP system ID (e.g. DEV). Omit to use default system.

Implementation Reference

  • Registration of the get_package tool in the ListToolsRequestSchema handler. Defines the tool name, description, and input schema (requires a package name, plus optional system_id).
      name: "get_package",
      description: "Fetch ABAP package contents (list of objects with types and descriptions) from SAP system",
      inputSchema: {
        type: "object" as const,
        properties: { name: { type: "string", description: "Package name (e.g. $TMP)" }, ...SYSTEM_ID_PROP },
        required: ["name"],
      },
    },
  • Handler for the get_package tool in the CallToolRequestSchema handler. Parses the 'name' argument and delegates to client.getPackageContents(), returning the results as text.
    case "get_package": {
      const { name: pkgName } = NameSchema.parse(args);
      const contents = await client.getPackageContents(pkgName);
      return { content: [{ type: "text", text: contents }] };
    }
  • The getPackageContents() method on AdtClient which performs the actual API call. Sends a POST request to /sap/bc/adt/repository/nodestructure with the package name to fetch the package's contents (list of objects with types and descriptions).
    async getPackageContents(name: string): Promise<string> {
      const body = `parent_type=DEVC%2FK&parent_name=${encodeURIComponent(name.toUpperCase())}&withShortDescriptions=true`;
      return (await this.postWithCsrf(
        "/sap/bc/adt/repository/nodestructure",
        body,
        "*/*",
        "application/x-www-form-urlencoded"
      )).data as string;
    }
Behavior3/5

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

No annotations are present, so the description carries full burden. It correctly indicates a read operation (fetching contents) and hints at the return format, but does not explicitly state safety (e.g., read-only) or other behavioral traits like error handling when package is not found.

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 sentence with no wasted words, front-loaded with the core action and result. Every word serves the purpose.

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?

Given the simplicity of the tool (2 parameters, no output schema), the description adequately explains what the tool returns. Minor gap: it does not mention behavior for missing packages or limitations like pagination, but overall complete for its 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 description coverage is 100%; both parameters have clear descriptions in the schema. The tool description adds no additional meaning or context beyond what is already in the schema, earning a baseline score of 3.

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 resource 'ABAP package contents', specifying the output as a list of objects with types and descriptions. It distinguishes from sibling get_* tools by targeting a specific resource (package contents) uniquely.

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. While the name and description imply it is for fetching package contents, it does not mention exclusions or direct the agent to other tools for similar but different purposes.

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