Skip to main content
Glama

Read Table Contents

read_table_contents
Read-onlyIdempotent

Read rows from one ABAP dictionary table or view, optionally filtered by a WHERE clause and capped by maxRows, for quick table data inspection.

Instructions

Read the rows of one ABAP dictionary table or view by name, optionally filtered with a WHERE clause, up to maxRows. Use it for a quick look at one table; use execute_data_query for joins, selected columns, aggregates or ORDER BY, describe_database_table for the field list, and customizing_read for a customizing table filtered on one key field. Read-only. The optional whereClause filter requires the ADT Data Preview service (SICF node /sap/bc/adt/datapreview, SAP_BASIS ≥ 7.40 SP08) to be active. If whereClause returns an error, use execute_data_query with a full SELECT ... WHERE ... UP TO n ROWS statement instead — that uses a different ADT endpoint and works on all supported SAP versions.

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": {
      "tableName": "<tableName>"
    },
    "name": "read_table_contents"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxRowsNoMaximum rows (default: 100)
tableNameYesABAP table or view name (e.g. MARA, EKPO, Z_MY_TABLE)
whereClauseNoOptional WHERE clause without the WHERE keyword (e.g. MATNR LIKE 'Z%'). Requires SICF /sap/bc/adt/datapreview to be active — use execute_data_query if this fails.
connectionIdNoSAP system connection ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.16.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent and openWorld, so the safety profile is covered; the description adds substantial context beyond that. It discloses the ADT Data Preview prerequisite (SICF node, SAP_BASIS ≥ 7.40 SP08), the maxRows cap, and a version-independent workaround, which are exactly the operational facts an agent needs before calling.

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 definition is dense but front-loaded: purpose first, then routing to siblings, then prerequisites. The final fallback sentence partially repeats the whereClause prerequisite already implied earlier and in the schema, which is minor redundancy rather than wasted space.

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?

For a read-only single-table tool with full schema coverage and annotations, the description covers selection, scope, prerequisites and failure handling. With no output schema, it could say a bit more about the returned row shape, but nothing needed to invoke it correctly is missing.

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 tableName, maxRows, whereClause and connectionId are already documented, including the default of 100 rows and the whereClause format example. The description restates the whereClause prerequisite and fallback but adds no new syntax or constraint details beyond the schema, so the baseline of 3 applies.

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 states a specific verb and resource ('Read the rows of one ABAP dictionary table or view by name'), including the filter and row-cap semantics. It explicitly distinguishes itself from execute_data_query, describe_database_table, and customizing_read, so an agent can pick the right tool without opening any 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 gives explicit when-to-use guidance ('quick look at one table') and names each alternative with the condition that selects it — joins/columns/aggregates/ORDER BY go to execute_data_query, field lists to describe_database_table, key-filtered customizing reads to customizing_read. It also supplies a concrete fallback path when whereClause fails.

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