Skip to main content
Glama

Read SE38 Source

sap_read_se38_source
Read-onlyIdempotent

Reads ABAP report source code directly from transaction SE38 by opening the program and displaying its code, letting you verify abapGit pull results or inspect reports when ADT is unavailable.

Instructions

Read ABAP report source code from SE38. If sap-adt is available, prefer its get_source tool. Navigates to SE38, enters the program name, and displays the source code. Useful for verifying abapGit pull operations.

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": {
      "program_name": "<program_name>"
    },
    "name": "sap_read_se38_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
sessionNoSession ID (e.g., "s1", "s2"). None uses primary session.
agent_idNoAgent identifier for binding check. Optional.
program_nameYesThe ABAP program/report name (e.g., Z_REPORT_TEST)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description's main addition is the GUI-driven mechanism: it navigates the session to SE38 and enters a program name, which changes the current screen state. That is useful context beyond the annotations, but there is no mention of failure behavior (program not found, missing authorization) or what happens to the existing session screen.

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?

Four short sentences, front-loaded with purpose and the preferred alternative. The mechanism sentence partially restates the purpose but earns its place by revealing the GUI navigation side effect.

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?

An output schema exists, so return values need no explanation, and annotations cover safety. For a three-parameter read tool the definition is nearly sufficient; only error conditions and screen-state side effects 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%, so program_name, session, and agent_id are already documented in the schema. The description only implies that program_name is an ABAP report name; it adds nothing about session selection or the agent binding check. Baseline 3 is appropriate.

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?

States a specific verb and resource ("Read ABAP report source code from SE38") and adds the mechanism: navigate to SE38, enter the program name, display the source. This clearly separates it from sap_se38_edit, which mutates the same object.

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?

Gives explicit routing advice ("If sap-adt is available, prefer its get_source tool") and a concrete use case ("verifying abapGit pull operations"), which also distinguishes it from sap_abapgit_pull. It does not state when this tool should be avoided, e.g. when the session is mid-transaction or already on another screen.

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