nightly_run
Processes unsettled deals across all companies in a batch pipeline, classifying each by confidence level and routing for automatic posting or human review.
Instructions
Nightly batch pipeline. Processes ALL companies accessible by the token (= multi-company batch). Pipeline per company: fetch unprocessed (status=unsettled) → Stage 0 exclusion → Stage 1+2 classify → confidence routing (high=auto, medium=auto+log, low=human_review) → aggregate summary. Currently dry-run only (write-back pending Phase 1.B).
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": "nightly_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Currently always dry_run (= write-back pending Phase 1.B) | |
| period_end | No | YYYY-MM-DD end date filter | |
| company_ids | No | Override: process only these company IDs (default: all accessible) | |
| concurrency | No | Max parallel companies (default: 3, freee rate limit safe) | |
| period_start | No | YYYY-MM-DD start date filter | |
| deals_per_company | No | Max deals fetched per company |