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.

  • 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

TableJSON 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

TableJSON 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. 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."
  2. 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"
      +}
  3. 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"
      +}
  4. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources