Skip to main content
Glama

Db Query

db_query

Execute a read-only SELECT query on a Drupal database to retrieve site data without modifying records or accessing files.

Instructions

Execute a single read-only SELECT query on the Drupal database.

One statement only, no comments, and no write or file-access clauses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that the tool is read-only and rejects multi-statement input, comments, and file-access clauses, which is real constraint information. It says nothing about required permissions, row limits/pagination, or failure behavior, leaving meaningful gaps for a raw-SQL tool.

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?

Two short sentences, the core action front-loaded, followed by the constraints. No filler, no restatement of the title, every clause carries 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?

An output schema exists so return values need not be explained. But with zero annotation coverage, zero schema description coverage, and no mention of the args parameter or execution prerequisites, the definition is only minimally complete for a raw-SQL 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 0%, so the description must compensate for two undocumented parameters. The sentence 'One statement only, no comments, and no write or file-access clauses' adds real meaning for the query parameter's accepted syntax, but the args parameter (query placeholders/bind values) is never mentioned, so the compensation is only partial.

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 (Execute) and resource (a single read-only SELECT on the Drupal database) with a clear scope constraint, so an agent knows this is arbitrary SQL reading rather than the structured sibling helpers (db_tables, db_count, query_nodes). It stops short of explicitly naming those alternatives, which is why it isn't a 5.

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

Usage Guidelines3/5

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

Usage is only implied: the agent can infer this is the tool for ad-hoc SELECTs, and the constraints (one statement, no comments, no write/file clauses) shape the input. However, there is no explicit when-to-use/when-not guidance and no routing to siblings like db_tables, db_table_info, or db_count for simpler introspection.

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