Skip to main content
Glama

Get ABAP Batch Source

get_abap_batch_lines
Read-onlyIdempotent

Fetches source code for multiple ABAP objects in one call with URL headers, isolating failures so one bad URL does not block the rest. Use for small batches only.

Instructions

Return the source of several ABAP objects in one call, each under a header line with its URL. One failing URL is reported as an error entry and does not stop the others. Use get_abap_object_lines for a single object. Read-only; the combined text can be large, so batch only what you need.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "urls": "<urls>"
    },
    "name": "get_abap_batch_lines"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlsYesADT URLs of the objects or their sources, e.g. ['/sap/bc/adt/programs/programs/ZREPORT/source/main', '/sap/bc/adt/oo/classes/zcl_order_api']
connectionIdNoSAP system connection ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.16.2
    • changedInput schema / properties / urls / description
      Previous value: -"Array of ADT source URLs to fetch"New value: +"ADT URLs of the objects or their sources, e.g. ['/sap/bc/adt/programs/programs/ZREPORT/source/main', '/sap/bc/adt/oo/classes/zcl_order_api']"
  2. First observedv1.16.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so safety and repeatability are covered. The description adds genuinely non-obvious behavior: per-URL partial failure handling ('one failing URL is reported as an error entry and does not stop the others') and the result layout of a header line with the URL. It stops short of stating any permission or auth prerequisites.

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?

Four short sentences, each carrying unique information: capability, output shape, failure mode, alternative, then a size caution. The capability and the batching scale warning are front-loaded, and nothing repeats the schema or annotations.

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?

With no output schema, the description carries the return-shape burden and does so by describing header lines with URLs plus error entries. For a two-parameter batch reader that is nearly complete; only edge details like ordering of results or behavior on an empty array are left implicit.

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 schema already documents both parameters, including a URL example, so justification stays at baseline. The description adds only indirect parameter meaning, that each supplied URL maps to a headed section in the output, without covering ordering or duplicate-URL handling.

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 opens with a specific verb and resource ('Return the source of several ABAP objects') and immediately scopes it as a batch operation ('in one call'). It distinguishes itself from the single-object sibling by name, so an agent can tell the two apart without inspecting either schema.

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

Usage Guidelines5/5

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

It names the explicit alternative ('Use get_abap_object_lines for a single object') and states the condition that selects it. It also adds a selection heuristic ('batch only what you need' because output can be large), which is guidance an agent can act on.

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