get_documents
Retrieve documents from Simplicate business data to access CRM records, project files, timesheets, and invoices for comprehensive business information management.
Instructions
Retrieve documents
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No |
Input Schema (JSON Schema)
{
"properties": {
"limit": {
"type": "number"
},
"offset": {
"type": "number"
}
},
"type": "object"
}
Implementation Reference
- Core implementation of getDocuments: fetches documents from Simplicate API endpoint '/documents/document' with optional pagination parameters.async getDocuments(params?: { limit?: number; offset?: number }): Promise<SimplicateDocument[]> { const response = await this.client.get('/documents/document', params); return response.data || []; }
- src/mcp/server-full.ts:516-522 (handler)MCP ServerFull tool dispatch handler for 'get_documents': processes tool arguments, calls service, formats MCP response.case 'get_documents': { const data = await this.simplicateService.getDocuments({ limit: (toolArgs.limit as number) || 10, offset: (toolArgs.offset as number) || 0, }); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }
- src/mcp/server-full.ts:300-310 (registration)Tool registration entry in ListToolsRequestHandler: defines name, description, and input schema.{ name: 'get_documents', description: 'Retrieve documents', inputSchema: { type: 'object', properties: { limit: { type: 'number' }, offset: { type: 'number' }, }, }, },
- TypeScript interface defining the structure of SimplicateDocument objects returned by getDocuments.export interface SimplicateDocument { id: string; title: string; description?: string; document_type: string; created_at: string; url?: string; }