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
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: {} }, },