Skip to main content
Glama
b1-mcp-server

b1-mcp-server

execute_sql

Run read-only SQL SELECT queries against a confirmed target database; writes, DDL, and stored procedure calls are blocked server-side.

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.

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": {
      "query": "<query>"
    },
    "name": "execute_sql"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does so well: it discloses that all SQL passes server-side validation, that only SELECT and read-only DO blocks run, that writes and DDL are blocked with no confirmation bypass, and that EXEC/CALL and OPENQUERY-style pass-through are rejected. What it omits is operational behavior such as row limits, timeouts, and how results or errors are surfaced.

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?

It is front-loaded with the core action, then separated into a pre-call IMPORTANT block and a rules list, which is easy to scan. There is mild redundancy between the inline READ-ONLY sentence and the READ-ONLY bullet in the rules block, but nothing is wasted overall.

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 single-parameter tool with no annotations and no output schema, the description covers safety, preconditions, and fallback routing thoroughly. It stops short of describing the result shape or error behavior, which an agent would still need to interpret returned rows 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 single parameter is fully described in the schema, so the baseline is already a 3. The description goes beyond it by explaining that both user-authored and model-generated SQL are subject to the same server-side validation, which tells the agent the query string will be inspected rather than blindly run.

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 first sentence gives a specific verb and resource: execute a raw SQL statement against the currently connected database. It also immediately scopes the tool as read-only, so an agent understands what class of operation this is. It does not explicitly contrast itself with the execute_service_layer siblings, so differentiation is left partly implicit.

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?

The description states a hard precondition (confirm the target database with the user, ask if unstated, do not assume the connected DB), and a clear exclusion with a redirect: for INSERT/UPDATE/DELETE, do not call this tool and instead hand the SQL to the user for a real client like HANA Studio/DBeaver/hdbsql. Both when-to-use and when-not-to-use are explicit and actionable.

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