Skip to main content
Glama
bersimao

b1-mcp-server for SAP B1

execute_sql

Run read-only SQL SELECT statements against a user-confirmed connected database for data queries; server-side validation blocks writes.

Instructions

Execute a raw SQL statement against the currently connected database. All SQL, whether written by the user or generated by you, goes through the same server-side validation.

IMPORTANT: Before calling this tool, you MUST confirm which database the user intends to query. If the user has not explicitly stated the target database in their message, ASK them first. Do NOT assume the currently connected database is the intended target.

READ-ONLY: only SELECT (and read-only DO BEGIN...END blocks) execute. Data-changing statements are blocked server-side.

If the user needs a write (INSERT/UPDATE/DELETE), do NOT call this tool — generate the SQL and give it to the user to run in a real DB client (HANA Studio / DBeaver / hdbsql), where a human can review the statement and control its transaction handling.

Rules enforced server-side:

  • READ-ONLY: INSERT/UPDATE/DELETE/DROP are blocked for everyone — no confirmation bypass.

  • Direct EXEC/EXECUTE/CALL: blocked (stored procedures are disabled).

  • CREATE/ALTER: blocked.

  • MS SQL pass-through (OPENQUERY/OPENROWSET/OPENDATASOURCE): blocked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe SQL statement to execute (SELECT only — read-only server)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.1

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: server-side read-only enforcement, an enumerated block list (INSERT/UPDATE/DELETE/DROP, EXEC/CALL, CREATE/ALTER, OPENQUERY pass-through), and that there is no confirmation bypass. It also notes the reason writes are excluded (human review and transaction control), which is behaviorally meaningful.

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?

Front-loaded with purpose, then clearly sectioned with IMPORTANT / READ-ONLY / Rules headings that make it scannable. The read-only restriction is stated two or three times (prose, rule list, schema), which is mild redundancy, but the length is justified by the safety-critical content.

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?

Given no annotations and no output schema, the description is impressively complete on safety and routing. It is silent on operational limits that matter for a SQL executor (row caps, timeouts, pagination, or what the result set looks like), which is the only notable gap.

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?

One parameter with 100% schema coverage, so the schema already documents 'query'. The description only restates that it is SELECT-only, which duplicates the schema's own description; baseline 3 is appropriate.

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 precise verb and resource ('Execute a raw SQL statement against the currently connected database'), which is unambiguous. It does not, however, name or contrast itself against the sibling tools execute_service_layer / execute_service_layer_write, so an agent must infer the raw-SQL-vs-service-layer split.

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 states the precondition (the user MUST have named the target database, otherwise ask first), the allowed case (SELECT only), and the exclusion with a concrete alternative (writes should be handed to the user to run in HANA Studio / DBeaver / hdbsql). Both when-to-use and when-not-to-use are covered with a redirect.

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