Skip to main content
Glama
MCP SAP GUI Server

MCP SAP GUI Server

by kts982

Sap Read List

sap_read_list
Read-only

Read classic ABAP WRITE report lists and F4 hit lists as visible text lines, with colors and paging, so plain list output can be inspected without a screenshot.

Instructions

Read a classic ABAP list (WRITE output of a report) as lines of text.

Use it when a report shows a plain list rather than an ALV grid (program SAPMSSY0, screen 120), and for F4 hit lists in a popup (window_id= 'wnd[1]'). Such a list has no table object: every word is its own label, so sap_get_screen_elements leaves the cells out and reports it under 'lists'. This returns the page as the lines the user sees, with no screenshot needed.

  • colors: rows whose text has a semantic list colour, e.g. 'negative' (red, errors), 'positive' (green), 'total', 'heading'

  • scroll: present when the list is longer than the page; pass scroll_to=position+page_size to read the next page

  • with_ids=true adds the ID of each line's first label, to set the focus on a line (sap_set_focus) before F2 / double-click

  • is_list=false means this screen has no list: use sap_read_table

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_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
with_idsNo
max_linesNo
scroll_toNo
window_idNownd[0]

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare a safe read operation, but the description adds substantial behavior: lists have no table object and are reported under 'lists' by sap_get_screen_elements, colors carry semantic meaning, scroll indicates pagination with a concrete next-page pattern, and with_ids enables focus before F2/double-click. These are traits not derivable from annotations alone.

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?

Front-loads the definition, then the usage context, then a tight bullet list of behaviors. Every sentence carries necessary information, and the fallback condition is clearly placed at the end.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists, the description need not explain return fields, yet it still adds useful semantics about colors, scroll, and is_list. For a read-only tool with four optional parameters, nothing critical is missing except the minor max_lines detail.

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 description coverage is 0%, so the description must compensate. It explains with_ids (adds line label ID for focus), scroll_to (position+page_size for next page), and window_id ('wnd[1]' for F4 popups). However, max_lines is never mentioned, leaving one of four parameters undocumented anywhere.

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 a classic ABAP list ... as lines of text') and immediately distinguishes it from ALV grids, table objects, and screens without lists. An agent can identify the operation and its output form without opening the 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?

Explicitly names when to use it (plain WRITE list, program SAPMSSY0 screen 120, F4 hit lists in wnd[1]) and when not to (is_list=false -> use sap_read_table). Alternatives and selection conditions are stated rather than implied.

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