Skip to main content
Glama

Read Table Contents

sap_read_table
Read-onlyIdempotent

Read SAP table or view data with optional field selection, WHERE filtering, and row limits to fetch only authorized business or customizing records.

Instructions

Read the CONTENTS of any table or view the user is authorized for, via the ADT SQL Data Preview. This is the primary tool for reading customizing (T*) tables and business data.

Args:

  • table (string): table/view name.

  • fields (string[]): optional columns; omit for all.

  • where (string): optional WHERE clause without the 'WHERE' keyword. Use single quotes for literals.

  • max_rows (number): 1-1000 (default 100).

  • response_format ('markdown' | 'json').

Returns (json): { query, columns: [{name,type,length,description,key}], rows: [{col: value}], rowCount, totalRows, truncated }.

Examples:

  • "Show company codes" -> table='T001', fields=['BUKRS','BUTXT'].

  • "CO-PA derivation rules for strategy 1" -> table='TKEDRS', where="kalsm = '...'".

  • "FI documents for company 1000 in 2026" -> table='BKPF', where="bukrs = '1000' AND gjahr = '2026'", max_rows=50. Notes & Error Handling:

  • Read-only (SELECT only). Authorization is enforced by SAP (S_TABU_*).

  • 403 -> the user lacks display authorization for this table.

  • Large tables: always pass 'where' and/or 'fields' and a small 'max_rows'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable or view name (e.g. 'T001', 'BSEG', 'TKEDRS').
whereNoOptional ABAP-SQL WHERE clause WITHOUT the 'WHERE' keyword, e.g. "bukrs = '1000' AND gjahr = '2026'".
fieldsNoOptional list of columns to return. Omit for all columns ('*').
max_rowsNoMaximum rows to return (1-1000, default 100).
response_formatNoOutput format: 'markdown' (human-readable, default) or 'json' (structured).markdown
Install Server

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already indicate read-only/idempotent behavior, and the description adds meaningful behavioral details beyond them: authorization is enforced by SAP (S_TABU_*), 403 means missing display authorization, and large tables should be queried with fields/where/max_rows. This is exactly the kind of context that helps an agent invoke the tool safely.

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?

The description is organized into clear sections (Args, Returns, Examples, Notes & Error Handling) and front-loads the core purpose. Every section earns its place: examples clarify usage, the returns block compensates for the missing output schema, and the notes handle real failure modes without excessive verbosity.

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?

For a table-reading tool with no output schema, the description is remarkably complete: it explains return structure, authorization behavior, error meaning, large-result handling, parameter options, and provides concrete examples. An agent has everything needed to select and call this tool correctly.

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?

The input schema already covers all parameters at 100% with descriptions, so the baseline is 3. The description adds value through concrete examples (e.g., 'T001', 'BKPF', where-clause patterns), the single-quote literal rule, and the max_rows range reminder, which go beyond the schema's dry parameter definitions.

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?

The description states a specific verb and resource: reading the contents of any authorized table or view via ADT SQL Data Preview. It clearly identifies itself as the primary tool for reading customizing tables and business data, though it does not explicitly name or contrast a sibling like sap_sql_query.

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?

The description gives clear context for when to use the tool: it is the primary reader for table contents and business data, with examples mapping natural language requests to concrete table/where-clause combinations. It lacks explicit exclusions or named alternatives, but the intended use cases are well conveyed.

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

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/appmaster3000/sap-abap-mcp-server'

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