Skip to main content
Glama

faucet_raw_sql

Run ad-hoc SQL statements against a Faucet database service to read or modify data, with positional parameters, row limits and query timeouts. Requires raw SQL enabled on the service.

Instructions

Execute a raw SQL query against a database service. Only available for services with raw_sql_allowed enabled. Use faucet_list_services to check which services allow raw SQL. Because arbitrary SQL can touch any object, it requires a role rule granting all verbs (GET, POST, PUT, PATCH, DELETE) on the _sql component of the service.

The statement is executed as-is and may modify data; it is refused on services flagged read_only. Parameters should be passed as an array and referenced with positional placeholders ($1, $2 for PostgreSQL; ?, ? for MySQL).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL query to execute
limitNoMaximum number of rows to return (default 100, max 10000)
paramsNoPositional parameters for the SQL query
serviceYesName of the database service
timeoutNoQuery timeout in seconds (default 30)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only give readOnlyHint=false, but the description adds substantial context beyond that: the RBAC requirement (role rule granting all verbs on _sql), the as-is execution semantics, the refusal on read_only services, and the placeholder syntax per dialect. This is rich behavioral disclosure the annotations do not cover.

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 and availability, then permissions, then execution semantics and parameter syntax. Every sentence earns its place with only minor density in the middle clause about role rules.

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?

Complete for a dangerous arbitrary-SQL tool: availability gate, permission requirement, mutation warning, and dialect-specific parameter syntax are all covered. A mention of return shape would help, but no output schema exists and the query-result nature is inferable.

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%, so the schema already documents all five parameters. The description adds useful detail on params syntax ($1 vs ?) that goes beyond the schema's generic 'Positional parameters' text, but does not cover limit or timeout nuances.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Execute a raw SQL query') and immediately scopes when it applies ('Only available for services with raw_sql_allowed enabled'). This clearly distinguishes it from siblings like faucet_query and faucet_insert, which are narrower typed operations.

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 names the alternative tool to check availability ('Use faucet_list_services to check which services allow raw SQL') and states the exclusion condition (refused on read_only services). When-to-use and when-not-to-use are both present.

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