Skip to main content
Glama
NigelThorne

Firebase MCP Server

by NigelThorne

list_documents

Retrieve documents from a Firestore collection in the Firebase Emulator. Specify a collection path and optional limit to view stored data.

Instructions

List documents in a collection with optional limit

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionPathYesCollection path (e.g., 'users' or 'users/user123/orders')
limitNoMax documents to return (default: 20)

Implementation Reference

  • The handler function that executes the logic to list documents from a Firebase collection.
    async function handleListDocuments(collectionPath: string, limit = 20) {
      const snapshot = await db.collection(collectionPath).limit(limit).get();
      return snapshot.docs.map(docToObject);
    }
  • src/index.ts:401-402 (registration)
    Registration of the "list_documents" tool within the MCP CallToolRequestSchema handler switch case.
    case "list_documents":
      result = await handleListDocuments(args?.collectionPath as string, args?.limit as number);
Behavior2/5

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

With no annotations provided, the description carries full burden but only adds 'optional limit' context. It does not confirm this is read-only, disclose pagination behavior (e.g., cursor/token support), explain error cases (empty collection vs invalid path), or describe return format despite no output schema being present.

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

Conciseness5/5

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

A single, efficient sentence front-loaded with the verb. No filler words or redundant phrases. Every word serves the core purpose statement.

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?

Given the lack of output schema and the presence of similar sibling tools (query_collection, list_collections), the description is insufficient. It omits return value structure, pagination mechanics, and differentiation from query operations that an agent needs to select the correct tool.

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%, establishing baseline 3. Description mentions 'optional limit' reinforcing the optionality seen in schema (limit not in required array), but adds no additional syntax details, format constraints, or examples beyond what the schema already provides for collectionPath.

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 clear verb 'List' and resource 'documents' with scope 'in a collection.' However, it fails to distinguish from sibling tool 'query_collection' which likely offers similar functionality with filtering capabilities.

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?

Provides no guidance on when to use this simple list operation versus the more powerful 'query_collection' alternative, nor does it mention prerequisites like collection existence or auth requirements.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NigelThorne/firebase_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server