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 with no total and a quote with no currency are not ranked (rank_exclusion). 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

TableJSON 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

TableJSON 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. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources