Skip to main content
Glama

GetPackageTree

Retrieve the complete hierarchical tree of an ABAP package, including subpackages, object names, types, and descriptions, to inspect package structure and contents.

Instructions

[read-only] Returns the complete tree of the ABAP package named by package_name: its subpackages and objects. Returns hierarchical tree with object names, types, and descriptions. Takes package_name (one package: its tree) or package_names (several packages: one entry per package, in the order given, each { package_name, tree, metadata } or { package_name, error }). Read in ADT batch envelopes: the package metadata with the root node structure, then each level of the walk; with include_descriptions, as single requests, several at a time. Runs on an ABAP session of its own. Optional timeout (seconds): when it passes, the read is cancelled, its ABAP session logged off, and the system stays as it was. Set it below your MCP client's request limit — the TypeScript SDK's client cancels at 60 s; a client's cancel ends only the client's wait, and SAP runs the read on. Runs outside batch mode.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "GetPackageTree"
  }
}

Input Schema

NameRequiredDescriptionDefault
debugNoInclude diagnostic metadata in response (counts, types, hierarchy info). Default: false
timeoutNoSeconds to wait for the answer: a whole number, at least 1, no default — without it the call waits until SAP answers. When it passes, the read is cancelled (its ABAP session is logged off) and the call answers that nothing was changed. Set it below your MCP client's request limit — the TypeScript SDK's client cancels at 60 s; a cancel does nothing to SAP.
max_depthNoMaximum depth for recursive package traversal. Default: 5
package_nameNoPackage name (give this or package_names)
package_namesNoSeveral package names, read together (give this or package_name)
include_subpackagesNoInclude subpackages recursively in the tree. If false, subpackages are shown as first-level objects but not recursively expanded. Default: true
include_descriptionsNoInclude each object's description in the response. The package metadata and the walk's levels are then read as single requests, several at a time, rather than in ADT batch envelopes. Default: false

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv20.1.0
    • changedInput schema / properties / include_descriptions / default
      Previous value: -trueNew value: +false
    • changedInput schema / properties / include_descriptions / description
      Previous value: -"Include object descriptions in response. Default: true"New value: +"Include each object's description in the response. The package metadata and the walk's levels are then read as single requests, several at a time, rather than in ADT batch envelopes. Default: false"
    • addedInput schema / properties / max_depth / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / max_depth / minimum
      Added value: +-9007199254740991
    • changedInput schema / properties / max_depth / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / package_name / description
      Previous value: -"Package name"New value: +"Package name (give this or package_names)"
    • addedInput schema / properties / package_names
      Added value: +{
      +  "description": "Several package names, read together (give this or package_name)",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / timeout
      Added value: +{
      +  "description": "Seconds to wait for the answer: a whole number, at least 1, no default — without it the call waits until SAP answers. When it passes, the read is cancelled (its ABAP session is logged off) and the call answers that nothing was changed. Set it below your MCP client's request limit — the TypeScript SDK's client cancels at 60 s; a cancel does nothing to SAP.",
      +  "maximum": 2147483,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "package_name"
      -]
  2. Changed1 schema field changedv16.0.0
    • changedInput schema / properties / package_name / description
      Previous value: -"Package name (e.g., \"ZMY_PACKAGE\")"New value: +"Package name"
  3. First observed

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it declares the tool read-only, states it runs on its own ABAP session, explains that a timeout cancels the read and logs off that session leaving the system unchanged, and warns that a client-side cancel does not stop SAP. The ADT batch-envelope explanation is dense and slightly ambiguous against the closing "Runs outside batch mode", and no permission/auth requirements are mentioned.

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

Conciseness3/5

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

The purpose is front-loaded and most sentences are informative, but the timeout caveat is restated almost verbatim from the schema description, and the ADT batch-envelope sentence is an implementation detail stated densely enough to be hard to parse. It could shed a third of its length without losing decision-relevant information.

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 7-parameter read tool with no annotations and no output schema, the description covers the important gaps: return shape per mode, failure representation, session lifecycle, and cancellation behavior. Missing pieces are minor (no mention of result size limits or pagination for large package trees).

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%, so the baseline is 3. The description goes somewhat beyond the schema by describing the per-package return shape ("{ package_name, tree, metadata } or { package_name, error }") and the ordering guarantee, but max_depth and include_subpackages are left entirely to the schema and debug is not mentioned at all.

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

Purpose4/5

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

The opening sentence names a specific verb and resource ("Returns the complete tree of the ABAP package") and clarifies that subpackages and objects are included, so the agent knows exactly what it gets. It does not distinguish itself from near-siblings such as GetPackageContents or GetObjectStructure, which would be the only way to reach a 5.

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?

It gives useful conditional guidance between package_name (one package) and package_names (several, ordered, with per-package error entries), plus guidance on when to raise/lower timeout. However, it never states when to prefer this tool over the many sibling read tools that also return package/object structure, so the usage context is implied rather than explicit.

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

Deploy Server

Other Tools