Skip to main content
Glama

faucet_query

Read-only

Query records from a database table with optional filtering, field selection, ordering, and pagination; returns JSON results.

Instructions

Query records from a database table with optional filtering, field selection, ordering, and pagination. Returns results as JSON. Requires GET permission on the table.

Filter syntax (DreamFactory-compatible):

  • Simple: name = 'John'

  • Comparison: age > 21, price <= 100

  • Logical: status = 'active' AND role = 'admin'

  • IN: status IN ('active', 'pending')

  • LIKE: name LIKE 'J%'

  • NULL: email IS NOT NULL

  • BETWEEN: age BETWEEN 18 AND 65

  • CONTAINS: name CONTAINS 'smith'

Order syntax: 'column ASC, other_column DESC'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupNoComma-separated columns to GROUP BY (e.g. "region,status"). Aggregate in 'fields' to compute per group; order by an aggregate's alias.
limitNoMaximum number of records to return (default 25, max 1000)
orderNoOrder clause (e.g. "created_at DESC, name ASC")
tableYesName of the table to query
fieldsNoList of columns to return, each either a plain column or an aggregate such as "SUM(amount)", "COUNT(*)", or "AVG(price) AS avg_price". Omit for all columns.
filterNoFilter expression (e.g. "status = 'active' AND age > 21")
offsetNoNumber of records to skip for pagination
serviceYesName of the database service

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

The readOnlyHint=true annotation is consistent with the read semantics. The description goes beyond it by disclosing the authorization requirement (GET permission on the table) and the response format (JSON), plus default/max record behavior via the schema. It does not cover things like row-limit enforcement errors or pagination end conditions, but it adds real context over the annotation.

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?

Purpose and permission requirement are front-loaded, followed by an efficiently bulleted syntax reference. The length is justified by the query-language surface area, though the filter example list is somewhat padded with overlapping comparison forms.

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 an 8-parameter query tool with no output schema, the description covers return format, auth needs, and both filter and order grammars, which is most of what an agent needs. The main gap is the absence of any statement about limitations relative to faucet_raw_sql (joins, subqueries) and about pagination behavior such as limit/offset interaction.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds materially useful semantics: a full DreamFactory-compatible filter operator reference (comparisons, AND/OR, IN, LIKE, IS NOT NULL, BETWEEN, CONTAINS) and order-clause syntax. That enriches 'filter' and 'order' well beyond the schema's single-line examples.

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+resource ("Query records from a database table") and enumerates its supported capabilities: filtering, field selection, ordering, pagination, JSON output. An agent can readily distinguish this from faucet_insert/delete/update. It stops short of naming a sibling (e.g. faucet_raw_sql) for advanced cases, so it is clear but not fully differentiated.

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?

"Requires GET permission on the table" is a genuinely useful precondition for deciding whether to call it. Otherwise there is no explicit when-to-use/when-not-to-use guidance and no routing to alternatives such as faucet_raw_sql for complex or join-style queries. Usage is implied by the read-oriented verb rather than stated.

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