Skip to main content
Glama

Compare supplier quotes

well_compare_quotes
Read-only

Compare the supplier quotes of one comparison group, read from the quote documents the workspace received. It writes nothing.

A comparison group is set by a person, never guessed: well_group_quotes puts quotes in one. Call this with quote_request_id to compare that group, or with no argument to list the groups (requests, each with its quote_count, the 20 newest) and the quotes no group holds yet (ungrouped_quotes).

With a group, each quote carries its supplier, its source document_id, valid_until, currency, items_total, tax_total, grand_total (decimal strings in major units of that currency) and its lines in printed order (label, quantity, unit price, line total), every amount as the quote prints it. expired is true when valid_until is before today.

Ranking is per currency only (currency_groups): rank_in_currency 1 is the lowest total among the quotes of that currency still on offer. Equal totals share a rank, and lowest_supplier_quote_id is null when several quotes share the lowest total: name each of them. An expired quote, a quote whose end date Well could not read (validity_unreadable), a quote with no total, a quote with no currency, a quote whose items_total disagrees with the sum of its lines, or whose grand_total disagrees with items_total plus tax_total (total_mismatch), a quote with a line whose quantity times unit price disagrees with its line total (line_mismatch) and a quote whose amounts cannot prove its arithmetic (arithmetic_unknown) are not ranked (rank_exclusion). arithmetic on the quote and on each line says what its printed amounts prove: a line marked mismatch or unknown is to check with the supplier, and its figures stay as printed. When mixed_currencies is true, never add, convert or rank totals across currencies: say the quotes are in different currencies and show each in its own. Quote every figure as returned, with its supplier; never compute a total or a unit price the quote does not state.

The comparison is computed on each call from the stored quotes, as of as_of. url is the link to share it: a signed-in page that only the workspace's members (never a guest) can open, and that recomputes the comparison each time it opens. The link carries no data and no session of its own, so it is not a snapshot: give it as the way to see the comparison stay current, and never call it public.

refusal_reason: "request_not_found" (no such group in this workspace), "no_workspace", "read_failed".

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
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.
quote_request_idNoThe comparison group to compare. Omit it to list the groups and the quotes no group holds yet.

Output Schema

NameRequiredDescriptionDefault
urlNoThe link to the signed-in page that shows this comparison live to the workspace's members. Null when this deployment has no web app address.
as_ofNo
errorNo
quotesNo
requestNo
successYes
requestsNo
refusal_reasonNo
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
currency_groupsNo
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.
mixed_currenciesNo
ungrouped_quotesNo
resolved_workspaceNoThe workspace that answered, when the caller named none and the token authorizes several.
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. Changed80 schema fields changed
    • removedOutput schema / properties / currency_groups / items / properties / currency / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / currency_groups / items / properties / currency / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / currency_groups / items / properties / lowest_grand_total / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / currency_groups / items / properties / lowest_grand_total / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / currency_groups / items / properties / lowest_supplier_quote_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / currency_groups / items / properties / lowest_supplier_quote_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / quotes / items / properties / arithmetic
      Added value: +{
      +  "enum": [
      +    "consistent",
      +    "total_mismatch",
      +    "line_mismatch",
      +    "unknown"
      +  ],
      +  "type": "string"
      +}
    • removedOutput schema / properties / quotes / items / properties / currency / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / currency / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / quotes / items / properties / document_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / document_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / quotes / items / properties / grand_total / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / grand_total / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / quotes / items / properties / issue_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / issue_date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / quotes / items / properties / items_total / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / items_total / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / quotes / items / properties / lines / items / properties / arithmetic
      Added value: +{
      +  "enum": [
      +    "consistent",
      +    "mismatch",
      +    "unknown"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / quotes / items / properties / lines / items / properties / currency
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / quotes / items / properties / lines / items / properties / label / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / lines / items / properties / label / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / quotes / items / properties / lines / items / properties / line_total / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / lines / items / properties / line_total / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / quotes / items / properties / lines / items / properties / quantity / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / lines / items / properties / quantity / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / quotes / items / properties / lines / items / properties / unit_price / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / lines / items / properties / unit_price / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / quotes / items / properties / lines / items / required
      Previous value: -[
      -  "position",
      -  "label",
      -  "quantity",
      -  "unit_price",
      -  "line_total"
      -]New value: +[
      +  "position",
      +  "label",
      +  "quantity",
      +  "unit_price",
      +  "line_total",
      +  "currency",
      +  "arithmetic"
      +]
    • changedOutput schema / properties / quotes / items / properties / rank_exclusion / anyOf
      Previous value: -[
      -  {
      -    "enum": [
      -      "expired",
      -      "no_total",
      -      "no_currency"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "expired",
      +      "validity_unreadable",
      +      "no_total",
      +      "no_currency",
      +      "total_mismatch",
      +      "line_mismatch",
      +      "arithmetic_unknown"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / quotes / items / properties / rank_in_currency / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / rank_in_currency / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / quotes / items / properties / reference_number / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / reference_number / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / quotes / items / properties / supplier_company_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / supplier_company_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / quotes / items / properties / supplier_name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / supplier_name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / quotes / items / properties / tax_total / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / tax_total / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / quotes / items / properties / valid_until / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / quotes / items / properties / valid_until / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / quotes / items / required
      Previous value: -[
      -  "supplier_quote_id",
      -  "supplier_company_id",
      -  "supplier_name",
      -  "document_id",
      -  "reference_number",
      -  "issue_date",
      -  "valid_until",
      -  "currency",
      -  "items_total",
      -  "tax_total",
      -  "grand_total",
      -  "lines",
      -  "expired",
      -  "rank_in_currency",
      -  "rank_exclusion"
      -]New value: +[
      +  "supplier_quote_id",
      +  "supplier_company_id",
      +  "supplier_name",
      +  "document_id",
      +  "reference_number",
      +  "issue_date",
      +  "valid_until",
      +  "currency",
      +  "items_total",
      +  "tax_total",
      +  "grand_total",
      +  "lines",
      +  "expired",
      +  "rank_in_currency",
      +  "rank_exclusion",
      +  "arithmetic"
      +]
    • removedOutput schema / properties / request / properties / description / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / request / properties / description / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / requests / items / properties / description / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / requests / items / properties / description / 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"
      +]
    • removedOutput schema / properties / ungrouped_quotes / items / properties / currency / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / currency / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ungrouped_quotes / items / properties / document_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / document_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ungrouped_quotes / items / properties / grand_total / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / grand_total / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ungrouped_quotes / items / properties / issue_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / issue_date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ungrouped_quotes / items / properties / items_total / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / items_total / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / lines / items / properties / currency
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / ungrouped_quotes / items / properties / lines / items / properties / label / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / lines / items / properties / label / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ungrouped_quotes / items / properties / lines / items / properties / line_total / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / lines / items / properties / line_total / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ungrouped_quotes / items / properties / lines / items / properties / quantity / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / lines / items / properties / quantity / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ungrouped_quotes / items / properties / lines / items / properties / unit_price / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / lines / items / properties / unit_price / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / ungrouped_quotes / items / properties / lines / items / required
      Previous value: -[
      -  "position",
      -  "label",
      -  "quantity",
      -  "unit_price",
      -  "line_total"
      -]New value: +[
      +  "position",
      +  "label",
      +  "quantity",
      +  "unit_price",
      +  "line_total",
      +  "currency"
      +]
    • removedOutput schema / properties / ungrouped_quotes / items / properties / reference_number / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / reference_number / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ungrouped_quotes / items / properties / supplier_company_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / supplier_company_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ungrouped_quotes / items / properties / supplier_name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / supplier_name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ungrouped_quotes / items / properties / tax_total / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / tax_total / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ungrouped_quotes / items / properties / valid_until / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ungrouped_quotes / items / properties / valid_until / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / url / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / url / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description adds substantial context: ranking rules, exclusion reasons (expired, unreadable validity, mismatches), mixed-currency handling, refusal reasons, and the non-snapshot, member-only nature of the share url. It does not contradict 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?

The description is front-loaded and structured, with purpose and usage before detailed ranking and exclusion rules. However, it is long and includes an enumeration of output fields that the output schema already defines, which reduces conciseness.

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?

Given the complex ranking and exclusion logic, the description covers purpose, usage, behavioral rules, refusal reasons, and workspace selection. With an output schema and rich annotations already present, nothing material is missing for an agent to call it correctly.

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%, so the baseline is 3. The description adds meaningful semantics for quote_request_id (omit to list groups) and workspace_id (required only when multiple workspaces are authorized), though it does not explain conversation_id or workspace_scope beyond what the schema already provides.

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?

The opening sentence states a specific verb and resource: compare supplier quotes of one comparison group, read from quote documents, and explicitly says it writes nothing. It also distinguishes the read from well_group_quotes, which creates groups, so an agent can identify the tool without opening the 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?

The description explicitly instructs to call with quote_request_id to compare a group or with no argument to list groups and ungrouped quotes, and names well_group_quotes as the tool that sets groups. It also covers workspace_id usage (direct when one workspace, pass workspace_id when several) and warns never to call the share url public.

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