get_document
Retrieve a single Firestore document from the Firebase Emulator by specifying its full path to access specific data entries.
Instructions
Get a single document by path
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": {
"documentPath": "<documentPath>"
},
"name": "get_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentPath | Yes | Full document path (e.g., 'users/user123') |
Implementation Reference
- src/index.ts:261-264 (handler)The implementation of the get_document tool handler.
async function handleGetDocument(documentPath: string) { const doc = await db.doc(documentPath).get(); return docToObject(doc); } - src/index.ts:175-185 (registration)The MCP tool registration for get_document.
{ name: "get_document", description: "Get a single document by path", inputSchema: { type: "object" as const, properties: { documentPath: { type: "string", description: "Full document path (e.g., 'users/user123')" }, }, required: ["documentPath"], }, },