Skip to main content
Glama

list_contracts

Read-only

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

NameRequiredDescriptionDefault
qNoFree-text search term
limitNoMaximum number of entries to return
offsetNoNumber of entries to skip (for paging)
statusNoOnly entries with this status
compactNoReturn only key fields in paged form, for walking a large register
our_roleNoOnly contracts where we have this role
referenceNoExact reference match, for idempotent imports
account_idNoID of the account (company)
intra_groupNotrue = counterparty is one of our own companies, false = all others
counterpartyNoSubstring filter on the counterparty name
contract_typeNoOnly contracts of this type
our_account_idNoID of the own company (account)
expiring_within_daysNoOnly contracts whose term ends within this many days

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changed
    • addedInput schema / properties / account_id / description
      Added value: +"ID of the account (company)"
    • addedInput schema / properties / compact / description
      Added value: +"Return only key fields in paged form, for walking a large register"
    • addedInput schema / properties / contract_type / description
      Added value: +"Only contracts of this type"
    • addedInput schema / properties / counterparty / description
      Added value: +"Substring filter on the counterparty name"
    • addedInput schema / properties / expiring_within_days / description
      Added value: +"Only contracts whose term ends within this many days"
    • addedInput schema / properties / intra_group / description
      Added value: +"true = counterparty is one of our own companies, false = all others"
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of entries to return"
    • addedInput schema / properties / offset / description
      Added value: +"Number of entries to skip (for paging)"
    • addedInput schema / properties / our_account_id / description
      Added value: +"ID of the own company (account)"
    • addedInput schema / properties / our_role / description
      Added value: +"Only contracts where we have this role"
    • addedInput schema / properties / q / description
      Added value: +"Free-text search term"
    • addedInput schema / properties / reference / description
      Added value: +"Exact reference match, for idempotent imports"
    • addedInput schema / properties / status / description
      Added value: +"Only entries with this status"
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only supply readOnlyHint and openWorldHint, but the description goes far beyond: it discloses the alternate return shape ({ total, offset, next_offset, contracts }), that next_offset is null on the last page, that rows carry next_deadline and source_root_id/source_file_id, and that compact implies the paged form. These are operational facts an agent cannot get from the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded and the trailing sentence on row fields is well placed, but the middle is a single very long run-on enumeration of eleven parameters separated by commas and semicolons. Dense and information-rich, though harder to scan than a short bulleted structure would be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 13 optional parameters and no output schema, the description carries the full burden and does: it explains paging, the paged vs. bare-list response difference, compact field projection, and the extra row fields. An agent can call this correctly and parse the result without opening anything else.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, yet the description still adds meaning the schema lacks: the status enum values and default 'active', limit default 50 / max 100, that q also matches path fragments and UUIDs or 'source:uuid' against reference, and the precise intra_group semantics via accounts.is_own_company. The one gap is that our_role and contract_type get no added semantics beyond the schema's one-liner.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a concrete scope definition — 'The contract register: leases, service agreements, maintenance, insurance — anything with a term and a notice period' — which tells an agent exactly what resource is listed and what qualifies. It also implicitly separates itself from get_contract ('needs no per-contract get_contract') and from a plain register walk via the compact/paged forms.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Guidance is embedded per-parameter and purposeful: 'for idempotent imports' on reference, 'for walking a large register' on compact, 'so you can see what is about to lapse without a second call'. What is missing is a top-level statement of when to prefer this over get_contract or export_contracts_excel, and any explicit when-not conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.