Skip to main content
Glama

query_database

Query a database with filters and sorting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortsNoSorting parameters
filterNoFilter conditions
page_sizeNoNumber of results per page
database_idYesID of the database to query
start_cursorNoPagination cursor

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description carries full disclosure burden. While it mentions filtering and sorting capabilities, it omits critical behavioral details: read-only status, pagination mechanics (despite 'start_cursor' parameter), result limits, or what the query returns (records, pages, metadata).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The six-word description is efficiently structured and front-loaded with the verb, but it is inappropriately concise given the tool's complexity (5 parameters, pagination support, nested objects). It leaves critical behavioral and contextual information to inference.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 5 parameters including pagination cursors and nested filter objects, the description is inadequate. With no output schema provided, the description fails to indicate what data structure is returned or how pagination behaves, leaving significant gaps in the agent's understanding.

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?

With 100% schema description coverage, the baseline is 3. The description references 'filters and sorting' which maps to the filter and sorts parameters, but adds no semantic detail beyond the schema's 'Filter conditions' and 'Sorting parameters' descriptions. No compensation needed for the complex nested filter object structure.

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 clearly states the action (query), resource (database), and key capabilities (filters, sorting). However, it fails to distinguish from the sibling 'search' tool, which likely performs similar retrieval functions but with different semantics (global vs. structured).

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?

The description mentions available features (filters, sorting) but provides no guidance on when to use this tool versus alternatives like 'search' or 'get_database'. No prerequisites or exclusions are stated.

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.