Skip to main content
Glama
Firenook

Firenook

Official

firestore_query

Read-onlyIdempotent

Run structured Firestore queries on a collection or collection group 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.

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": {
      "collection": "<collection>"
    },
    "name": "firestore_query"
  }
}

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?

Annotations already declare readOnlyHint, idempotentHint and non-destructive behavior, so the safety profile is covered. The description does add value with the return format ('plain JSON') and the collection-group traversal semantics, but omits notable traits such as pagination behavior and the fact that composite filters/orderings may fail without an index (relevant given the firestore_missing_indexes sibling).

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?

A single dense sentence that front-loads the core action and the collectionGroup variant, then closes with return format. The parenthetical '(Firestore runQuery)' earns its place as an API anchor; otherwise there is no filler.

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 read-only query tool with full schema coverage and no output schema, the description supplies the essential return-shape information and the dual collection/collectionGroup modes. Remaining gaps (pagination of large result sets, index-requirement failures) are secondary but real.

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 every parameter including where/orderBy/limit/collectionGroup is already documented in the schema. The description restates the collectionGroup behavior without adding syntax or format detail beyond it, so the baseline of 3 applies.

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 a structured query over one collection') and adds the collectionGroup fan-out mode, which is the non-obvious part. It does not explicitly contrast with siblings like firestore_get or firestore_count, but the query-with-filters framing is distinct enough for an agent to select correctly.

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 rather than stated: the description makes clear this is the tool for filtered/sorted/limited reads, but never says when to prefer it over firestore_get, firestore_count, or firestore_list_collections, and gives no exclusions or prerequisites.

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