get_document
Retrieve specific documents from Simplicate business data using document IDs to access CRM records, project files, timesheets, and invoices.
Instructions
Get specific document by ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"document_id": {
"type": "string"
}
},
"required": [
"document_id"
],
"type": "object"
}
Implementation Reference
- src/mcp/server-full.ts:523-527 (handler)MCP tool handler for 'get_document' that validates the document_id parameter and delegates to SimplicateServiceExtended.getDocumentById, returning JSON-formatted result.case 'get_document': { if (!toolArgs.document_id) throw new Error('document_id is required'); const data = await this.simplicateService.getDocumentById(toolArgs.document_id); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }
- src/mcp/server-full.ts:311-319 (registration)Tool registration in ListTools handler, including name, description, and input schema definition.{ name: 'get_document', description: 'Get specific document by ID', inputSchema: { type: 'object', properties: { document_id: { type: 'string' } }, required: ['document_id'], }, },
- Core service method that fetches the document by ID from the Simplicate API endpoint `/documents/document/{documentId}`.async getDocumentById(documentId: string): Promise<SimplicateDocument> { const response = await this.client.get(`/documents/document/${documentId}`); return response.data; }
- src/mcp/server-full.ts:314-319 (schema)Input schema defining the required 'document_id' string parameter for the tool.inputSchema: { type: 'object', properties: { document_id: { type: 'string' } }, required: ['document_id'], }, },