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
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": "get_documents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No |
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; }