Skip to main content
Glama
DB MCP Server

DB MCP Server

by HW-public

execute_query

Run read-only SELECT queries against configured Oracle or PostgreSQL data sources to retrieve database results safely.

Instructions

Execute a read-only SELECT query.

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": {
      "sql": "<sql>"
    },
    "name": "execute_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesA SELECT statement.
dataSourceNoName of the data source to use (see list_data_sources). Defaults to the single configured database, if only one is connected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It does disclose the most important behavioral trait — read-only, i.e., non-destructive — but says nothing about permissions, row limits, timeouts, result-set size, or how invalid SQL is reported.

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?

A single front-loaded sentence with no padding. It is efficient but so short that the 'read-only SELECT' phrasing is somewhat redundant, and brevity comes at the cost of the missing guidance noted above.

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?

For a two-parameter query tool with a fully described schema and no output schema, the basics are covered, but an agent still lacks knowledge of result shape, limits, or failure modes when invoking it.

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 coverage is 100% and both parameters are documented in-schema, including the pointer to list_data_sources for dataSource. The description adds no further meaning about SQL dialect, statement restrictions, or default data source behavior, so baseline 3 applies.

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 (Execute) and resource (SELECT query) plus an explicit scope constraint (read-only). This implicitly separates it from execute_dml, though no sibling is named; the agent can still tell it is the read path.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No when-to-use guidance beyond the phrase 'read-only SELECT'. It never names execute_dml as the alternative for writes or describe_table/list_tables for schema discovery, nor does it state prerequisites such as needing a data source configured first.

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