{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search query for receipts/invoices (merchants, items, categories, etc.)"
},
"limit": {
"type": "number",
"default": 5,
"description": "Number of results to return"
},
"docType": {
"type": "string",
"enum": [
"invoice",
"receipt"
],
"description": "Filter by document type"
},
"sortBy": {
"type": "string",
"default": "docDate",
"description": "Field to sort by (docDate, amount, merchant, etc.)"
},
"sortOrder": {
"type": "number",
"default": -1,
"description": "Sort order: 1 for ascending, -1 for descending"
},
"dateFrom": {
"type": "string",
"description": "Start date filter (ISO format)"
},
"dateTo": {
"type": "string",
"description": "End date filter (ISO format)"
},
"useSearch": {
"type": "boolean",
"default": true,
"description": "Whether to use text/semantic search"
},
"searchType": {
"type": "string",
"enum": [
"similarity",
"mmr"
],
"default": "mmr",
"description": "Search strategy: 'similarity' for specific merchants/exact matches, 'mmr' for diverse/exploratory results"
},
"exportStatus": {
"type": "string",
"enum": [
"all",
"exported",
"not-exported"
],
"description": "Filter by integration export status: 'exported' for documents sent to integrations, 'not-exported' for documents not yet sent, 'all' or omit for no filter"
},
"outputMode": {
"type": "string",
"enum": [
"compact",
"complete"
],
"default": "compact",
"description": "Output format: 'compact' returns essential fields (merchant, amount, date, category), 'complete' returns all available fields"
},
"requiredFields": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Additional fields to include regardless of output mode (e.g., ['exportRecords', 'currency'] to always show these)"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}