Skip to main content
Glama
Firenook

Firenook

Official

firestore_query

Run structured Firestore queries across one collection or collection groups with where filters, ordering, and limits, returning matching documents as plain JSON.

Instructions

Run a structured query over one collection, or with collectionGroup over every collection with that id (Firestore runQuery): optional where filters, ordering and limit; returns matching documents as plain JSON.

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum documents; default 50
whereNoFilters combined with AND
orderByNoSort keys
databaseNoFirestore database id; default (default)
collectionYesCollection path, e.g. users or users/alice/posts; with collectionGroup a collection id (posts) or a path whose parent bounds it
collectionGroupNoCollection-group query: every collection with the last segment's id at any depth under the parent (the database root for a bare id, e.g. posts; users/alice/posts for one document's descendants)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the behavioral burden; it does disclose read semantics, the collection-vs-collection-group scope difference, and that results come back as plain JSON. It omits operationally important traits: Firestore's composite index requirement, pagination/cursor behavior, result-size limits, and the fact that the 50-document default cap can silently truncate results (the default appears only in the schema).

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?

One dense sentence that front-loads the core action and appends scope and return-shape clauses; nothing is redundant. It is slightly overloaded with the parenthetical 'Firestore runQuery' reference and the collectionGroup parenthetical, but no sentence is wasted.

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 a 6-parameter, fully documented schema with no output schema, the description covers the action, both query scopes, and the return format, which is close to sufficient. The main gaps are index requirements and result-limit/truncation behavior, which matter for real Firestore queries but are not strictly needed to call the tool correctly.

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 100%, so the baseline is 3. The description reinforces that where/orderBy/limit are optional but adds no syntax or format detail beyond the schema, which already documents AND-combined filters, sort direction defaults, and collectionGroup path semantics in more depth than the description does.

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 and resource ('Run a structured query over one collection') and explicitly covers the collectionGroup variant plus the return shape ('matching documents as plain JSON'). It implicitly separates itself from single-document siblings like firestore_get and counting sibling firestore_count by describing filtered/ordered multi-document retrieval, though it never names an alternative outright.

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 implied through the optional where/orderBy/limit clause: an agent can infer this is the tool for filtered or sorted reads. However, there is no explicit guidance on when to prefer firestore_get, firestore_count, or firestore_list_collections, and no note about prerequisites such as composite indexes for multi-field filters.

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