Skip to main content
Glama

GetSqlQuery

Execute ABAP SQL SELECT queries on SAP database tables and CDS views to retrieve ad-hoc data, count rows, or run filtered queries.

Instructions

[read-only] Execute ABAP SQL SELECT queries on database tables and CDS views via SAP ADT Data Preview API. Use for ad-hoc data retrieval, row counts, and filtered queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
detailNoHow much of the answer to return: "terse" (default, the fields you need to act), "full" (the whole parse), "raw" (the document as ADT sent it).terse
sql_queryYesSQL query to execute
row_numberNo[read-only] Maximum number of rows to return

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv16.0.0
    • addedInput schema / properties / detail
      Added value: +{
      +  "default": "terse",
      +  "description": "How much of the answer to return: \"terse\" (default, the fields you need to act), \"full\" (the whole parse), \"raw\" (the document as ADT sent it).",
      +  "enum": [
      +    "terse",
      +    "full",
      +    "raw"
      +  ],
      +  "type": "string"
      +}
  2. First observed

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose read-only semantics ("[read-only]") and that only SELECT queries are executed, which is meaningful. But it omits what happens on a non-SELECT statement, any authorization requirements, and row/result-size limits, leaving real gaps for a query-execution tool.

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?

Two sentences, with the read-only tag and the core action front-loaded before the usage hint. No filler, and the sentences each carry distinct information.

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

Completeness3/5

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

There is no output schema and no annotations, so the description must carry more weight. It covers what the tool does and when to use it, but says nothing about the SQL dialect/subset supported, error behavior, or result limits beyond the row_number parameter. Adequate but with noticeable gaps for an arbitrary-query tool.

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 three parameters (sql_query, detail, row_number) are already documented in the schema, including the enum values and default. The description adds no parameter-level detail beyond that. Baseline 3 applies when the schema does the heavy lifting.

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: executes ABAP SQL SELECT queries against database tables and CDS views, and names the underlying mechanism (SAP ADT Data Preview API). This distinguishes it from read tools like GetTableContents, though it never explicitly names that sibling as the alternative. Clear enough to select 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Use for ad-hoc data retrieval, row counts, and filtered queries" gives concrete usage contexts. However, it offers no when-not guidance and does not point to GetTableContents for the simpler table-read case, so the boundary with siblings is left implicit.

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

Deploy Server

Other Tools