Skip to main content
Glama

List contract and insurance terms

well_list_contract_terms
Read-only

List the contracts and insurance policies Well read from the workspace's documents, each contract with the notice date its own terms give and the supplier it is with. It draws no card. It answers when a contract renews or ends, when notice is due (the notice period, in French the préavis), and what an insurance policy covers and costs. A contract's notice period, notice deadline, end date and renewal date are read here, never from the workspace's notes search.

Each reading is the newest stored extraction of one document, never a register. The server applies the date arithmetic and the supplier match, and as_of is the day every *_passed flag was computed against. Pass company_ids (supplier company_id values) to match each reading to at most one of them.

Each contract carries notice.status:

  • notice_deadline: the contract renews automatically and notice.deadline (the end date minus the notice period) is the last day to give notice. notice.deadline_passed says whether that day is past. notice.deadline_soon is true when that day is still ahead and at most 30 days after as_of: the notice must be given soon. The server counts those days.

  • renews_automatically_next_unknown: the contract renews automatically and its end date is past. The next end date is not on file.

  • ends_on: the reading states that the contract does not renew, so it ends on end_date and has no notice deadline. notice.end_date_passed says whether that day is past.

  • renewal_unknown: the reading does not state whether the contract renews. notice.deadline is null; end_date and notice_period_days are as stored.

  • notice_period_unknown: the contract renews automatically and ends today or later, but the reading holds no usable notice period.

  • end_date_unknown: the reading holds no usable end date.

supplier.status: "matched" means the contract's other party is the one supplier, among the company_ids passed, named by supplier.company_id; the match uses tax ids and email or website domains, never names. unmatched means no passed supplier was matched, and supplier.reason says why: no_supplier_named (no company_ids passed), no_party_key (the other party carries no tax id, email or website), no_candidate (no passed supplier shares a key with it) or several_candidates (more than one does, so none is chosen). other_party_names holds the names the reading prints for the parties that are not the workspace's own, for display only. readable: false means the stored reading did not parse: every term is null or unknown.

insurance_policies lists the insurance readings with the insurer, the policy type, the cover dates, the premium and its frequency, the sum insured and the deductible, each null when not read.

At most 50 readings, newest first; readings_truncated: true means older readings were not read. partial: true means the read was cut short and nothing was read. unreadable_readings counts the readings that did not parse. unknown_company_ids lists passed ids this workspace cannot read, so no contract was checked for them. unkeyed_company_ids lists readable suppliers that carry no tax id and no domain, so no contract can be tied to them. Non-disclosure agreements are never listed.

When the token authorizes one workspace, call this directly — no workspace call is needed first. When it authorizes several, this read will not guess which one you mean: pass workspace_id on the call.

Input Schema

NameRequiredDescriptionDefault
company_idsNoThe supplier company ids to match each reading against, at most 50. Omit to list the readings with no match.
workspace_idNoTarget workspace. Omit when the token authorizes one workspace. Required when it authorizes several: this read reports one workspace's own figures and will not choose which.
conversation_idNoThe conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation.
workspace_scopeNoRestrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.

Output Schema

NameRequiredDescriptionDefault
as_ofYes
errorNo
partialYes
successYes
contractsYes
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
newly_connectedNoTools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.
insurance_policiesYes
readings_truncatedYes
resolved_workspaceNoThe workspace that answered, when the caller named none and the token authorizes several.
unkeyed_company_idsYes
unknown_company_idsYes
unreadable_readingsYes
conversation_id_noteNoPresent only when the server opened a fresh lane, stating that no choice recorded earlier was read.
conversation_id_sourceNoWhere the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed48 schema fields changed
    • removedOutput schema / properties / contracts / items / properties / auto_renewal / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / contracts / items / properties / auto_renewal / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / contracts / items / properties / contract_title / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / contracts / items / properties / contract_title / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / contracts / items / properties / contract_type / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / contracts / items / properties / contract_type / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / contracts / items / properties / effective_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / contracts / items / properties / effective_date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / contracts / items / properties / end_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / contracts / items / properties / end_date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / contracts / items / properties / notice / properties / deadline / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / contracts / items / properties / notice / properties / deadline / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / contracts / items / properties / notice / properties / deadline_passed / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / contracts / items / properties / notice / properties / deadline_passed / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / contracts / items / properties / notice / properties / deadline_soon / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / contracts / items / properties / notice / properties / deadline_soon / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / contracts / items / properties / notice / properties / end_date_passed / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / contracts / items / properties / notice / properties / end_date_passed / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / contracts / items / properties / supplier / properties / company_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / contracts / items / properties / supplier / properties / company_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / insurance_policies / items / properties / coverage_end / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / insurance_policies / items / properties / coverage_end / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / insurance_policies / items / properties / coverage_end_passed / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / insurance_policies / items / properties / coverage_end_passed / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / insurance_policies / items / properties / coverage_start / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / insurance_policies / items / properties / coverage_start / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / insurance_policies / items / properties / currency / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / insurance_policies / items / properties / currency / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / insurance_policies / items / properties / deductible / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / insurance_policies / items / properties / deductible / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / insurance_policies / items / properties / insured_name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / insurance_policies / items / properties / insured_name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / insurance_policies / items / properties / insurer_name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / insurance_policies / items / properties / insurer_name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / insurance_policies / items / properties / payment_frequency / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / insurance_policies / items / properties / payment_frequency / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / insurance_policies / items / properties / policy_number / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / insurance_policies / items / properties / policy_number / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / insurance_policies / items / properties / policy_type / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / insurance_policies / items / properties / policy_type / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / insurance_policies / items / properties / premium_amount / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / insurance_policies / items / properties / premium_amount / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / insurance_policies / items / properties / sum_insured / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / insurance_policies / items / properties / sum_insured / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / insurance_policies / items / properties / supplier / properties / company_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / insurance_policies / items / properties / supplier / properties / company_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / resolved_workspace / properties / name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / resolved_workspace / properties / name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed2 schema fields changed
    • addedOutput schema / properties / contracts / items / properties / notice / properties / deadline_soon
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / contracts / items / properties / notice / required
      Previous value: -[
      -  "status",
      -  "deadline",
      -  "deadline_passed",
      -  "end_date_passed"
      -]New value: +[
      +  "status",
      +  "deadline",
      +  "deadline_passed",
      +  "deadline_soon",
      +  "end_date_passed"
      +]
  3. Changed1 schema field changed
    • changedOutput schema / properties / newly_connected / description
      Previous value: -"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."New value: +"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."
  4. Changed1 schema field changed
    • addedInput schema / properties / workspace_scope
      Added value: +{
      +  "description": "Restrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.",
      +  "enum": [
      +    "family"
      +  ],
      +  "type": "string"
      +}
  5. Changed1 schema field changed
    • addedOutput schema / properties / newly_connected
      Added value: +{
      +  "description": "Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "name": {
      +        "type": "string"
      +      },
      +      "service_id": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "service_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  6. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare read-only/non-destructive/closed-world, yet the description adds substantial behaviour beyond them: provenance (newest stored extraction per document, never a register), server-side date arithmetic with `as_of` as the reference day, the 30-day `deadline_soon` window, supplier matching by tax id and email/website domain and never by name, a 50-reading cap with `readings_truncated`, and the `partial`/`unreadable_readings`/`unknown_company_ids`/`unkeyed_company_ids` degradation signals. No contradiction with 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.

Conciseness3/5

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

It is front-loaded correctly — the first sentence says what the tool is — and the bulleted enumeration is well organised. But the bulk of the text decodes output fields (`notice.status` states, supplier reasons, insurance policy fields) even though an output schema exists, so a large share of the length duplicates structured data rather than earning its place.

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?

For a tool with zero required params, four optional params, an output schema and a nontrivial domain (contract notice arithmetic, fuzzy supplier matching), the description covers everything an agent needs to call and interpret it: provenance, truncation, partial reads, unreadable readings, unknown/unkeyed company ids, and the workspace-selection rule.

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 description coverage is 100%, so the baseline is 3, but the description adds real semantics the schema lacks: `company_ids` matches each reading to at most one supplier, and the supplier status/reason vocabulary explains what a match or miss means. It does not elaborate `workspace_scope` or `conversation_id` beyond the schema, and it references an `as_of` value that is not a declared input parameter, which is a small source of ambiguity.

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?

States a specific verb and resource ('List the contracts and insurance policies Well read from the workspace's documents') and immediately scopes it: each contract with its own notice date and supplier, drawing no card. It also carves out the negative boundary against a sibling behaviour ('never from the workspace's notes search'), so an agent can tell it apart from search-based tools without opening a schema.

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

Usage Guidelines5/5

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

Gives explicit use cases ('answers when a contract renews or ends, when notice is due... and what an insurance policy covers and costs') and explicit exclusions ('Non-disclosure agreements are never listed'; terms are read here, never from notes search). It also gives the routing rule for workspace selection: call directly with a single-workspace token, pass `workspace_id` when several are authorized.

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.

Resources