attach_suppliers_to_request
ChatGPTSet the recipient list of a DRAFT RFQ. Rejects non-drafts. The list REPLACES the draft's current recipients, so it is the complete set every time; the current set is in get_request(request_id, detail="draft"), and supplier emails come from recommend_suppliers / get_supplier (contacts are inlined). Nothing is sent — recipients become supplier threads that a later send emails. Returns the updated draft view.
create_request_draft
ChatGPTCreate an RFQ as a draft (status='draft'). Nothing is sent; returns the created RFQ with its id. - subject: required. - raw_content: markdown / HTML body of the RFQ. Format line items however fits the RFQ — a markdown table, a bulleted list, or plain prose. RFQs come in many shapes; the input is free-form, the same shape email intake produces. - deadline: optional ISO datetime; suppliers will see this as the response deadline. - recipients: optional list of email addresses to pre-populate as recipients (e.g. ["sales@vendor.com"]); editable later in the app and via attach_suppliers_to_request. - external_references: optional list of provenance refs to stamp on the new draft, each {system, type, external_id, metadata?}, e.g.: [{"system": "quickbooks", "type": "bill", "external_id": "4567"}] The server stamps synced_at and synced_by; never include them in the input. Pass refs when this RFQ is being mirrored from an external system so a re-run on the same source record is detectable as a duplicate (the polling filter missing_external_ref excludes already-referenced RFQs). - task_id: the id of the Buyer24 task this RFQ belongs to, if any. The RFQ is then listed among the task's results in Buyer24, and its id may be used on the task's order sheet (status rfq).
create_supplier
ChatGPTCreate a new supplier. Duplicates are detected by name + domain against list_suppliers; a match on either is the same supplier. Every field comes from a tool result or a user-provided source; an unknown fact is omitted. notes carries a one-line source breadcrumb (URL + date) for a web-sourced supplier so the record is auditable. Defaults to visibility="private" (org-scoped). A shared pool takes visibility="pool" AND pool_id; the backend rejects with 403 unless the calling user's org is in the pool's admin_org_ids. description, capabilities, and service_regions drive supplier-recommendation matching; year_founded / employee_count / annual_revenue populate the supplier card's Business Info panel (dedicated fields, not description prose). Address is split into discrete components so the supplier card's location panel can render them. A supplier receives RFQs only through a contact email (create_supplier_contact).
create_supplier_contact
ChatGPTAdd a contact to a supplier. - email is required and must be reachable — callers should not create contacts on speculative emails. - name may be empty for role-aliases (sales@, info@, rfq@). - role: free-text title ("Sales Manager", "Export desk"). - phone: the number listed for this person or desk, as written. - channels: messaging IDs the source lists — [{"type": "whatsapp" | "wechat" | "skype" | "telegram" | "other", "handle": "..."}]. A number shown with a WhatsApp logo is a WhatsApp channel as well as a phone. - preferred_language: the BCP 47 code of the language the source says this person or the sales team works in, whatever the language; omit when it only says English or says nothing. - First contact for a supplier should be is_primary=true. If you create multiple contacts in one run, prefer marking the named individual primary over a role-alias. Create one contact per sales address the source lists (cap 5 per supplier) — suppliers often answer from the second address, and a thread emails every contact of the supplier in one message. Pool-supplier contacts are shared across orgs; only pool admins or system_admin may add them. Private-supplier contacts are scoped to the calling user's org.
fetch
ChatGPTOpen one Buyer24 record by the id search returned. REQ-… / RFQ-… opens the RFQ (the trimmed view get_request returns: status, summary, line items, supplier threads, quotes without bodies); SUP-… opens the supplier (the get_supplier view); SOL-… opens a public solicitation from the shared cache. Returns {id, title, text, url, metadata} — text is a readable rendering of the record and metadata the structured fields. An id the caller may not open comes back as the backend's own not-found envelope (the same answer an id that never existed gets), and an id with an unknown prefix is refused with unknown_id_prefix.
find_new_suppliers
ChatGPTSearch the public web for companies that can supply something — candidates the organization does not have yet (its own suppliers and pools are ranked by recommend_suppliers). Saves nothing: a candidate becomes a supplier through create_supplier. - need: what to source, worded the way a local buyer would search — the product or service with its key specs, a brand and "distributor" or "stockist", and a city, port or industrial zone. - country: a lowercase English country name ("turkey", "united states"); results from that country rank higher. - language: the language need is written in (an ISO 639-1 code such as "tr", or a name such as "turkish"); pages in that language rank higher. - max_results: 1–15. How the results behave: ranking follows the query's language and place, so a query written in a country's own language and naming a place there surfaces that country's local suppliers, which an English query rarely ranks; one query covers one country. Both boosts rank, they do not filter. Exporters from elsewhere publish auto-translated pages in every language, so a translated page or a local subdomain does not show where a company is based — its physical address, national phone prefix or registered legal-entity suffix in results[].content does. A brand's authorised distributors often do not list part numbers, so a brand plus "authorised distributor" query finds them where a part-number query does not. Returns {query, results: [{title, url, content, score}], remaining, limit}; each result carries that company's own page text. remaining is the organization's search allowance left. Errors: 409 the organization is set to Private Suppliers Only; 422 an unknown country name; 429 the allowance is spent; 502 the search backend failed (the call still counted).
get_quote
ChatGPTGet one specific quote by id. detail="summary" (default) returns id, thread_id, supplier{id,name}, total_amount, currency, status + trimmed line_items[] (line_number, description, quantity, unit, unit_price, total). detail="full" returns the verbatim quote including quote_markdown, comparison_history, and extraction_metadata. Quote IDs are QUOTE-<timestamp> strings — find them via list_quotes(request_id) or as quotes[].id on the parent request from get_request(request_id).
get_request
ChatGPTGet one RFQ. Trimmed by default to the task-scoped fields an agent needs; the full backend doc (megabytes of email HTML + quote markdown) is available via detail="full". detail="draft" is the draft view: keeps raw_content (the editable body), the recipient list, deadline, attachments (names only), and any staged pending_approval — drops the message/quote payloads a draft doesn't meaningfully have. detail="summary" (default) returns: { "id", "subject", "status", "priority", "assignee", "ai_summary", use instead of raw_content "metadata": {deadline, requires_action, quotes_received, completed_at, is_starred}, "supplier_threads": [{id, supplier{id,name}, status, quote_amount, last_message_at}], "quotes": [{id, thread_id, supplier{id,name}, total_amount, currency, status, line_items:[{line_number, description, quantity, unit, unit_price, total}]}], "messages": [{id, thread_id, direction, from{name}, created_at, delivery{status}, metadata{message_classification}}], NO bodies "external_references": [...], "auto_process_draft" } supplier_threads[] is the per-supplier state — entries with status='selected' are the winning suppliers on a completed RFQ. quotes[] carries the parsed pricing (totals + line items). detail="full" returns the verbatim backend document (large): message bodies, the full quote markdown, raw_content. external_references is present in both modes, which is how an existing ref is detected before another one is written.
get_supplier
ChatGPTGet a single supplier by id, with its contacts inlined. detail="summary" (default) drops audit fields and the documents blob list and pares each inlined contact to {id, name, email, is_primary, supplier_id}; all substantive catalog fields (description, capabilities, service_regions, certifications, headquarters, business info, external_references, contact_count) are kept. Use detail="full" for the verbatim record (e.g. before a patch, to see every field you might preserve).
get_supplier_contacts
ChatGPTReturn the contacts attached to a supplier. Thin convenience over get_supplier — the backend already returns contacts inline. This tool exists so callers asking "what contacts does X have?" don't have to know about the inlining trick.
get_template
ChatGPTGet one RFQ template, including its body_prompt — the structural skeleton to draft from. Fill its placeholders from the brief; leave [to be confirmed by user] for missing fields and flag them.
list_quotes
ChatGPTList all quotes for one RFQ. - latest_only: if True (default), returns only the latest quote per supplier thread (suppliers sometimes send revised quotes). Set to False to include the full history. Returns {"quotes": [<trimmed quote>, ...]}. Each quote carries id, thread_id, supplier{id,name}, total_amount, currency, status and trimmed line_items[] — the bulky quote_markdown, comparison_history, and extraction_metadata are dropped. For one quote's full record use get_quote(request_id, quote_id, detail="full").
list_requests
ChatGPTList RFQs visible to the calling user (org-scoped). Returns a paginated, trimmed list: { "requests": [ { "id", "subject", "status", "priority", "assignee", "ai_summary", use instead of raw_content "metadata": {deadline, requires_action, quotes_received, completed_at, is_starred}, "supplier_threads": [{id, supplier{id,name}, status, quote_amount, last_message_at}], "external_references": [...], "auto_process_draft" }, ... ], "pagination": {page, page_size, total_count, total_pages, has_next, has_prev} } Heavy display-only fields (raw_content, participants, history) are dropped; ai_summary carries the gist. The full message + quote payload of a single RFQ comes from get_request(request_id) (or get_request(request_id, detail="full") for everything). Polling for "completed RFQs not yet pushed to some external system": list_requests( status="completed", missing_external_ref_system="<system>", missing_external_ref_type="<type>", ) e.g. (system="quickbooks", type="purchase_order") to find completed RFQs that have not yet been pushed to QB as a PO. - status: one of "draft", "bid", "active", "completed", "archive", "deleted" ("bid": a public bid priced from the org's own quote, never sent). Omit to see everything visible to the caller. - completed_after: ISO datetime — only RFQs completed at or after this instant (uses metadata.completed_at). Used together with status="completed" to walk newly-finished RFQs incrementally. - missing_external_ref_system + missing_external_ref_type: BOTH must be supplied together (or both omitted). Returns only RFQs that do NOT have an external_references[] entry with the given (system, type). After an RFQ is pushed to an external system and its external reference is recorded, the RFQ falls out of this poll — that's how the wrapper dedupes against re-pushing. - page (1-indexed) and page_size (max 100) for pagination.
list_suppliers
ChatGPTList suppliers visible to the calling user. Returns the calling org's private suppliers plus suppliers in any pool the org can see. Optional search filters by name or primary email (case-insensitive substring). Optional pool_id narrows to a single pool (still gated by visibility — unknown pool returns empty). create_supplier dedupes against these entries by name + domain. Response shape (paginated): { "items": [ {<supplier>}, ... ], this page only, trimmed "total": int, full filtered count across all pages "limit": int, "offset": int, "has_more": bool } Each item is trimmed for list context (audit fields + the documents blob list dropped; inlined contacts pared). For a single supplier's full record use get_supplier(id, detail="full"). - limit: page size, 1–100 (default 50). - offset: rows to skip for paging. To walk the whole catalog, start at 0 and increase by limit while has_more is true.
list_templates
ChatGPTList the org's RFQ templates (organization-authored + system). Returns {"templates": [{id, name, description, source}]} — source is "organization" or "system". A template's body comes from get_template(template_id).
patch_request_draft
ChatGPTUpdate the subject and/or body of a DRAFT RFQ. Rejects non-drafts. Only pass the fields you're changing. raw_content replaces the whole body (markdown / HTML — same loose shape as create_request_draft), so read the current body first (get_request(request_id, detail="draft")), apply the edit in-place, and pass the full rewritten body. Deadline and recipients are NOT edited here — deadline is set at creation (create_request_draft); recipients go through attach_suppliers_to_request. Returns the updated draft view (subject, body, recipients, deadline) so you can confirm the edit landed.
preview_rfq
ChatGPTRender the RFQ as the supplier-facing email — subject, sender, recipient chips (the suppliers picked so far), the body exactly as ensure_email_html will ship it, and the attachment list with redaction dispositions (included / redacted copy / will NOT be sent). On clients that support MCP Apps the rendering displays inline as an email preview panel; other clients receive the text fallback. Read-only — renders the current draft state, changes nothing.
process_existing_draft
ChatGPTActivate a draft RFQ and queue the supplier emails — this SENDS. Requires the requests:read, requests:write and requests:send scopes. Refused with 409 approval_required when the organization reviews sends before they go out (nothing is sent or changed); the refusal's message says how that send goes ahead. The server validates authoritatively before sending (including enforced redaction): - validation_blocked (required mode): the issues are returned and nothing is sent; fixable via patch_request_draft. No override exists. - validation_needs_confirmation (optional mode): the issues are returned and nothing is sent; a retry with accept_validation_issues=true records the user's acceptance of them and sends (validation still runs and redaction still applies). - recipient_emails: optional — REPLACES the draft's recipients before sending; omit to send to the recipients already attached. - from_email + email_provider ('gmail'/'outlook'): send from the user's connected mailbox. Omit both to send from the RFQ's built-in relay address.
recommend_suppliers
ChatGPTRank the caller's visible suppliers by fit to an RFQ, using semantic (vector) similarity over the catalog — not a keyword search. Use this to resolve recipients for create_request_draft when the user names a category ("my steel suppliers", "shops that can do CNC titanium") rather than specific vendors. For an exact known-name lookup, list_suppliers(search=...) is more direct. - rfq_subject: short title of what's being sourced. - rfq_content: the RFQ body / item description — richer content produces better matches. - limit: max suppliers to return (1–20, default 5).
search
ChatGPTSearch the caller's Buyer24 data by text. Covers the organization's RFQs (id, subject, body, supplier names, customer name/email, message bodies), its suppliers (name, email) and the open public solicitations its lists follow (by meaning and by the words). An email address or an RFQ id works verbatim. Returns {"results": [{id, title, url, snippet, kind}]} — kind is request, supplier or solicitation; id is the Buyer24 id that fetch opens. Sources the token's scopes do not cover are skipped (RFQs need requests:read, suppliers suppliers:read); an empty results list means nothing matched. limit caps each source (1-25, default 10).