Skip to main content
Glama
abap0917

abap-adt-mcp

by abap0917

adt_read_source

Read ABAP source code from SAP objects with line-range slicing and optional DDIC context to optimize token usage.

Instructions

Read the ABAP source of an object. Accept either the object URI (e.g. /sap/bc/adt/oo/classes/zcl_x) or its /source/main URI. Supports line-range slicing and line-number prefixes. Large sources are truncated with a warning unless a range is given. Set attachContext=true to prepend a compressed prologue of the DDIC objects (domains/data elements) referenced by TYPE/LIKE clauses — saves the agent from issuing one lookup per referenced type (token optimisation).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endLineNo1-based end line
objectUriYesObject URI or .../source/main URI from adt_search_objects
startLineNo1-based start line
attachContextNoPrepend a compressed prologue of referenced DDIC objects (token optimisation)
Behavior4/5

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

No annotations provided, so description bears full burden. It discloses truncation with a warning for large sources, the effect of attachContext (prepends compressed prologue of referenced DDIC objects), and that URIs can be two forms. No contradictions. Minor gaps: doesn't explicitly state whether it modifies anything or if authentication is required.

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

Conciseness4/5

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

Well-structured: starts with core purpose, then details. Each sentence adds value. Could trim 'token optimisation' redundancy, but otherwise efficient. Slightly verbose in the attachContext explanation.

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?

No output schema, but description implies return value (source code with optional prologue and truncation warning). Covers essential usage aspects. Could mention error handling or format of warning, but sufficient for a read-only tool with good parameter documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, baseline 3. Description adds meaning: objectUri can be object URI or source/main URI; startLine and endLine are 1-based; attachContext saves agent from one lookup per referenced type (token optimisation). These go beyond schema definitions.

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?

Description clearly states it reads ABAP source of an object, accepts specific URI forms (object URI or /source/main URI), and lists features like line-range slicing and line-number prefixes. It distinguishes from siblings like adt_search_objects (which returns URIs) and adt_write_source (which writes).

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

Usage Guidelines4/5

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

Provides explicit guidance: URI must come from adt_search_objects; recommends using line-range for large sources to avoid truncation; suggests setting attachContext=true for token optimization. Lacks explicit when-not-to-use but implies alternatives for different tasks (e.g., adt_read_function_module for function modules).

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/abap0917/abap-adt-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server