Skip to main content
Glama

Query Cloud database

projects_cloud_database_query
DestructiveIdempotent

Run SQL on the project's Cloud Postgres database. Use this for SELECT and for schema changes such as CREATE TABLE. Results are capped by the database API.

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

Input Schema

NameRequiredDescriptionDefault
sqlYesSQL to run on the Cloud Postgres database.
project_idYesUUID of a Bunstation project owned by the authenticated user.

Output Schema

NameRequiredDescriptionDefault
rowsYes
fieldsYes
commandYes
rowCountYes
truncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=true, so the safety profile is covered. The description adds a genuinely useful non-annotated trait — 'Results are capped by the database API' — but leaves the cap amount unknown and says nothing about permission requirements, transaction behavior, or irreversible DDL effects that an agent invoking arbitrary SQL should know.

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?

Three short sentences, front-loaded with the core action, no filler. The only weakness is that 'Results are capped by the database API' is vague about the actual limit, so the sentence delivers less than it could for its length.

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-value explanation is not required, and both parameters are fully described in the schema. For a destructive, arbitrary-SQL execution tool with overlapping siblings, however, the definition should say more about when to prefer the dedicated row/schema tools and what destructive statements imply.

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 (sql, project_id) are documented in the schema with format and length constraints. The description adds no meaning beyond that, so the baseline 3 applies; note that the 20000-character SQL limit and the authenticated-user ownership constraint are only visible in the schema.

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: 'Run SQL on the project's Cloud Postgres database,' which is clearly distinct from the row- and table-scoped siblings. It does not explicitly name those siblings (projects_cloud_database_row_insert, projects_cloud_database_rows, projects_cloud_database_schema_create) even though their scopes overlap with 'schema changes such as CREATE TABLE.'

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?

'Use this for SELECT and for schema changes such as CREATE TABLE' gives a positive when-to-use signal covering reads and DDL. There is no when-not guidance, no mention of the dedicated row/table/schema tools as alternatives, and no guidance on whether destructive statements like DROP or DELETE are acceptable here.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources