list_contracts
The contract register: leases, service agreements, maintenance, insurance — anything with a term and a notice period. Optional: status (draft|active|terminated|expired|archived|all, default active), contract_type, our_role, counterparty (substring), account_id, expiring_within_days (contracts whose term ends inside that window), q (title/reference search, also path fragments like 'Ordner\Unterordner'; a UUID or 'source:uuid' is matched exactly against reference), reference (exact reference match, for idempotent imports), limit (default 50, max 100), offset (paging: with offset you get { total, offset, next_offset, contracts } instead of a bare list; next_offset is null on the last page), compact (true = only id, title, contract_type, status, our_role, account_id, contact_id, our_account_id, reference — for walking a large register; implies the paged form), our_account_id (contracts of one of OUR group companies), intra_group (true = counterparty is also an own company (accounts.is_own_company), false = everything else: no linked organisation or one that is not own). Each row carries next_deadline so you can see what is about to lapse without a second call, and source_root_id + source_file_id (the connected-drive origin of a folder-imported contract) so an idempotency check needs no per-contract get_contract.
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": "list_contracts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Free-text search term | |
| limit | No | Maximum number of entries to return | |
| offset | No | Number of entries to skip (for paging) | |
| status | No | Only entries with this status | |
| compact | No | Return only key fields in paged form, for walking a large register | |
| our_role | No | Only contracts where we have this role | |
| reference | No | Exact reference match, for idempotent imports | |
| account_id | No | ID of the account (company) | |
| intra_group | No | true = counterparty is one of our own companies, false = all others | |
| counterparty | No | Substring filter on the counterparty name | |
| contract_type | No | Only contracts of this type | |
| our_account_id | No | ID of the own company (account) | |
| expiring_within_days | No | Only contracts whose term ends within this many days |