Skip to main content
Glama

Sap Read Table

sap_read_table

Reads rows from the ALV grid or table on the current SAP screen, with row-range and session options to limit data returned.

Instructions

Read data from an ALV grid or table on the current screen

Session parameter:

  • session=None (default): Uses primary session ("s1")

  • session="s2": Targets specific session (for parallel agents)

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": "sap_read_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
end_rowNoLast row to read (None = up to max_rows visible rows)
sessionNoSession ID (e.g., "s1", "s2"). None uses primary session.
agent_idNoAgent identifier for binding check. Optional.
max_rowsNoMaximum rows to return (default: 100, prevents huge responses)
start_rowNoFirst row to read (1-indexed, default: 1)

Output Schema

NameRequiredDescriptionDefault
alvNoALV grid metadata (only present for ALV grids)
rowsNoRow data
errorNoError message if success=False
popupNoPresent when a popup dialog is active on screen
end_rowNoLast row returned
headersNoColumn headers
successNoWhether the operation succeeded
start_rowNoFirst row returned (1-indexed)
truncatedNoTrue if rows of the requested range are missing: a table control (e.g. SE24 methods) only holds the rows in its window (enlarge the SAP GUI window or narrow the range), or a classic list was read up to its row limit
total_rowsNoTotal rows found; for a table control (e.g. SE24 methods) only the visible window is read, so compare with the rows returned (start_row to end_row)
active_windowNoWhich window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/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 it does disclose that this is a read-only extraction and that the session parameter exists for running parallel agents. What it omits is failure behavior when no grid is present and whether reads paginate/scroll the UI, so it is good but not complete.

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?

The purpose sentence is front-loaded and short, and the session note is clearly sectioned rather than buried in prose. A little space is spent restating schema-documented session semantics, which is mild redundancy rather than bloat.

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 all five parameters are optional with schema coverage. What is missing for a screen-scraping tool is what happens when the current screen has no ALV grid/table, which an agent would need to recover gracefully.

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%, so all five parameters are already documented, and the description's session note largely restates the schema's 'None uses primary session' wording. It adds the rationale (parallel agents) but does not clarify the interaction between max_rows and end_row, which is the one genuinely ambiguous pair.

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?

States a specific verb and resource: 'Read data from an ALV grid or table on the current screen.' The 'on the current screen' qualifier usefully scopes it away from tools like sap_se16_query or sap_read_se38_source, though it never names an alternative outright.

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?

Usage is only implied: the agent must infer that this tool applies when an ALV grid/table is already displayed, and that other screen-reading tools (sap_get_screen_text, sap_get_form_fields) serve different content. There are no explicit when-not conditions or named alternatives.

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