list_collections
Retrieve top-level Firestore collections to inspect database structure and navigate document hierarchies in Firebase projects.
Instructions
List top-level collections in Firestore
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_collections"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:245-248 (handler)The handler function `handleListCollections` that executes `db.listCollections()` and maps the result to collection IDs.
async function handleListCollections() { const collections = await db.listCollections(); return collections.map((col) => col.id); } - src/index.ts:147-151 (registration)The registration of the `list_collections` tool in the `tools` array.
{ name: "list_collections", description: "List top-level collections in Firestore", inputSchema: { type: "object" as const, properties: {} }, },