{"$schema":"https://www.mpbxchange.com/agent-commerce/spec.schema.json","name":"MPBxChange Agent Commerce Spec","version":"1","generated_at":"2026-07-06T14:38:05.389Z","issuer":{"legal_name":"The Northeastern Consultants Company Limited","registration":"Thai DBD 0105562014156","did":"did:web:www.mpbxchange.com","issuer_document":"https://www.mpbxchange.com/agent-commerce/issuer.json"},"transport":{"protocol":"mcp","protocol_version":"2025-03-26","type":"http","endpoint":"https://www.mpbxchange.com/api/mcp","method":"POST","content_type":"application/json","encoding":"jsonrpc-2.0","discovery":"https://www.mpbxchange.com/.well-known/mcp.json"},"auth":{"type":"bearer","token_issuer":"supabase-jwt","anonymous_allowed":true,"anonymous_scopes":["discovery","public_reads"],"scopes":["guest","buyer","supplier","agent","admin"]},"rate_limits":{"anonymous":{"req_per_min":20,"key":"ip"},"user":{"req_per_min":120,"key":"user_id"},"admin":{"req_per_min":600,"key":"user_id"},"batch_max":25},"tools":[{"name":"tariff_optimize","description":"Rank alternative country-of-origin options for a shipment by total landed cost. Reads the platform tariff_schedules table for the given HS-6 code and destination, applies MFN + preferential + additional-duty rates per origin, and returns the cheapest legal route. Use when an agent needs to advise on supplier diversification or CBAM-aware sourcing. Persistence is OFF for MCP calls; use the REST endpoint at POST /api/arbitrage/tariff-optimize when persisting a scenario to a contract.","input_schema":{"type":"object","properties":{"hs_code_6":{"type":"string","pattern":"^\\d{6}$","description":"HS-6 product classification code (6 digits)."},"destination_country":{"type":"string","minLength":2,"maxLength":2,"description":"ISO-3166 alpha-2 country code of the importing country."},"current_origin_country":{"type":"string","minLength":2,"maxLength":2,"description":"ISO-3166 alpha-2 country code of the current origin."},"total_value_usd":{"type":"number","exclusiveMinimum":0,"description":"Total shipment value in USD."},"candidate_origins":{"type":"array","items":{"type":"string","minLength":2,"maxLength":2},"maxItems":20,"description":"Optional list of ISO-3166 alpha-2 codes to consider as alternatives. Defaults to the corridor 8: CN, TH, VN, TW, JP, KR, MY, IN."}},"required":["hs_code_6","destination_country","current_origin_country","total_value_usd"],"additionalProperties":false},"auth_required":true,"invoke":{"method":"tools/call","params":{"name":"tariff_optimize","arguments":"<see input_schema>"}}},{"name":"counsel_bilingual_review","description":"Run the MPBxChange Counsel bilingual divergence detector on a contract PDF. Extracts EN ↔ foreign clause pairs (ZH/TH/JA/KO and 8 additional languages), compares each pair for commercial / legal / translation-style divergence, and flags missing governing-language clauses as first-class high-severity issues. Use when an agent is reviewing a cross-border B2B contract draft. Inputs: either contract_id (caller must be a party or admin) or pdf_base64 (any authenticated caller).","input_schema":{"type":"object","properties":{"contract_id":{"type":"string","description":"UUID of an uploaded contract in the platform. Caller must be buyer, supplier, or admin."},"pdf_base64":{"type":"string","description":"Base64-encoded PDF body. Use when reviewing a draft outside the platform."},"max_pairs":{"type":"integer","minimum":1,"maximum":80,"description":"Cap on clause pairs to compare. Defaults to 40."},"skip_cache":{"type":"boolean","description":"Bypass the per-spec_hash cache. Use for re-tests."}},"additionalProperties":false},"auth_required":true,"invoke":{"method":"tools/call","params":{"name":"counsel_bilingual_review","arguments":"<see input_schema>"}}},{"name":"matchmaker_run","description":"Run the MPBxChange supplier matchmaker on an existing listing the caller owns. Returns the top-N suppliers ranked by composite score (spec fit, cert stack, CBAM readiness, lead time, capacity, risk band). Persistence is OFF for MCP calls; use POST /api/matchmaker/run to persist the run to rfq_matchmaker_runs for audit/undo.","input_schema":{"type":"object","properties":{"listing_id":{"type":"string","description":"UUID of the listing owned by the caller (or admin override)."},"top_n":{"type":"integer","minimum":1,"maximum":50,"description":"Number of top matches to return. Default 10."}},"required":["listing_id"],"additionalProperties":false},"auth_required":true,"invoke":{"method":"tools/call","params":{"name":"matchmaker_run","arguments":"<see input_schema>"}}},{"name":"escrow_status","description":"Read-only escrow + milestone progress snapshot for a contract the caller is a party to (or admin). Returns contract status, escrow account state (funded/released/refunded/held), and the full milestone timeline with per-milestone release status. Use when an agent needs to answer \"where is the money now?\" without triggering any state change.","input_schema":{"type":"object","properties":{"contract_id":{"type":"string","description":"UUID of the trade contract. Caller must be buyer, supplier, or admin."}},"required":["contract_id"],"additionalProperties":false},"auth_required":true,"invoke":{"method":"tools/call","params":{"name":"escrow_status","arguments":"<see input_schema>"}}},{"name":"kyc_check","description":"Return KYC tier and document status for a user. With no arguments, returns the caller’s own status. Admins may pass user_id to look up another user. Read-only · no documents are submitted or modified. Use when an agent needs to know whether the user is allowed to perform a tier-gated action (e.g., fund escrow above ฿350k requires Enhanced tier).","input_schema":{"type":"object","properties":{"user_id":{"type":"string","description":"Optional · UUID of the user whose KYC status to check. Admins only when set. Defaults to the caller."}},"additionalProperties":false},"auth_required":true,"invoke":{"method":"tools/call","params":{"name":"kyc_check","arguments":"<see input_schema>"}}},{"name":"list_contracts","description":"List trade contracts visible to the caller (party-of or admin). Returns id, contract_code, role, counterparty, amount, currency, status, updated_at. Cursor-paginated. Use this to enumerate before fetching a specific contract with get_contract.","input_schema":{"type":"object","properties":{"status":{"type":"string","description":"Optional · filter to one canonical trade-contract status, e.g. draft / pending_signatures / escrow_funded / in_production / quality_inspection_done / in_transit / delivered / settlement / completed / dispute_raised / cancelled."},"role":{"type":"string","enum":["buyer","supplier"],"description":"Optional · restrict to contracts where caller is buyer-only or supplier-only."},"limit":{"type":"number","description":"Max items per page (1-50, default 20)."},"cursor":{"type":"string","description":"Pagination cursor · pass the `next_cursor` from a previous call."}},"additionalProperties":false},"auth_required":true,"invoke":{"method":"tools/call","params":{"name":"list_contracts","arguments":"<see input_schema>"}}},{"name":"get_contract","description":"Fetch one trade contract by id. Caller must be buyer, supplier, or admin. Returns commercial terms, milestone schedule, signature state, and escrow funding state. Read-only · no mutation.","input_schema":{"type":"object","properties":{"contract_id":{"type":"string","description":"UUID of the contract to fetch."}},"required":["contract_id"],"additionalProperties":false},"auth_required":true,"invoke":{"method":"tools/call","params":{"name":"get_contract","arguments":"<see input_schema>"}}},{"name":"supplier_verification","description":"Return a supplier's public verification posture: KYC tier, organization KYC status, DBD number when available, and (when issued) the active W3C Verifiable Credential JWT. Public read · no auth required · safe for a buyer's agent to call before negotiation. The returned VC JWT can be verified against the MPBxChange issuer DID published at /agent-commerce/issuer.json.","input_schema":{"type":"object","properties":{"supplier_id":{"type":"string","description":"UUID of the supplier profile."}},"required":["supplier_id"],"additionalProperties":false},"auth_required":false,"invoke":{"method":"tools/call","params":{"name":"supplier_verification","arguments":"<see input_schema>"}}},{"name":"list_rfqs","description":"List RFQ broadcasts the caller is party to · either as the issuing buyer or as a registered fab recipient. Returns id, synthetic broadcast_code, status, total quotes received, deadline, created_at. Cursor-paginated. Read-only · backed by pcb_broadcast_rfqs (the live RFQ-broadcast table). Auth required.","input_schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","closed","expired","cancelled"],"description":"Optional · filter to one broadcast status."},"role":{"type":"string","enum":["issuer","recipient"],"description":"Optional · restrict to broadcasts the caller issued or only those sent to one of their fab rows."},"limit":{"type":"number","description":"Max items per page (1-50, default 20)."},"cursor":{"type":"string","description":"Pagination cursor · pass the `next_cursor` from a previous call."}},"additionalProperties":false},"auth_required":true,"invoke":{"method":"tools/call","params":{"name":"list_rfqs","arguments":"<see input_schema>"}}},{"name":"list_disputes","description":"List dispute cases the caller is party to (via the underlying contract). Returns id, case_code, contract_id, status, opened_by, opened_at, resolution_summary. Status filter accepts open / in_review / resolved (the in_review alias covers the canonical mediation + escalated states). Read-only · cursor-paginated · auth required.","input_schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","in_review","resolved"],"description":"Optional · filter by simplified status. in_review covers mediation + escalated."},"limit":{"type":"number","description":"Max items per page (1-50, default 20)."},"cursor":{"type":"string","description":"Pagination cursor · pass the `next_cursor` from a previous call."}},"additionalProperties":false},"auth_required":true,"invoke":{"method":"tools/call","params":{"name":"list_disputes","arguments":"<see input_schema>"}}},{"name":"get_supplier_capacity","description":"Return a 30-day forward capacity snapshot for a supplier · slots[] with date + am/pm + status (open/partial/full). Resolves the supplier's primary organization, sums published capacity blocks, subtracts active commitments, and renders a day-by-day calendar. Public read · no auth required · safe for a buyer's agent. If the supplier has not published a capacity calendar yet, returns an empty slots array with a friendly message.","input_schema":{"type":"object","properties":{"supplier_id":{"type":"string","description":"UUID of the supplier profile."}},"required":["supplier_id"],"additionalProperties":false},"auth_required":false,"invoke":{"method":"tools/call","params":{"name":"get_supplier_capacity","arguments":"<see input_schema>"}}},{"name":"list_my_credentials","description":"List W3C Verifiable Credential JWTs issued to the caller. Returns issued_at, expires_at, revoked_at, claims, and the JWT itself. Caller may only see their own credentials. Read-only · backed by supplier_credentials (migration v136). Use this when an agent needs to attach a buyer-verifiable credential to an outgoing message or to inspect what attestations the caller currently holds. Auth required.","input_schema":{"type":"object","properties":{"include_revoked":{"type":"boolean","description":"Optional · default false. When true, includes revoked credentials in the response (useful for audit)."}},"additionalProperties":false},"auth_required":true,"invoke":{"method":"tools/call","params":{"name":"list_my_credentials","arguments":"<see input_schema>"}}},{"name":"spec_translate","description":"Detect cross-border industrial concepts in arbitrary spec text + translate to a target country code system. Use to resolve \"what's the China code for ISO 26262\" or \"what HS code is this lithium cell.\" Backed by a 60+ concept registry mapped to 31 code systems (HS, CN, ISIC, NACE, TSIC, JSIC, KSIC, GBT, JIS, KS, IPC, SAE, AEC, JEDEC, ANSI, EN, IEC, ISO, etc.).","input_schema":{"type":"object","properties":{"text":{"type":"string","minLength":2,"maxLength":4000},"target_system":{"type":"string"},"vertical":{"type":"string"},"min_confidence":{"type":"number","minimum":0,"maximum":1}},"required":["text"],"additionalProperties":false},"auth_required":true,"invoke":{"method":"tools/call","params":{"name":"spec_translate","arguments":"<see input_schema>"}}},{"name":"sanctions_screen","description":"Screen a party name (+ aliases + country) against the consolidated sanctions database (BIS + OFAC + EU FSF + UK + UN · 30,696 entities). Returns matches with similarity score. Default threshold 0.88 · use 0.80 for stricter screening. Always run before signing a contract with a new counterparty.","input_schema":{"type":"object","properties":{"party_name":{"type":"string","minLength":1,"maxLength":300},"party_country":{"type":"string","minLength":2,"maxLength":2},"aliases":{"type":"array","items":{"type":"string"},"maxItems":20},"threshold":{"type":"number","minimum":0.5,"maximum":1}},"required":["party_name"],"additionalProperties":false},"auth_required":true,"invoke":{"method":"tools/call","params":{"name":"sanctions_screen","arguments":"<see input_schema>"}}}],"pillars":[{"id":"rfq","name":"RFQ + Quotes","status":"live"},{"id":"contracts","name":"Contracts","status":"live"},{"id":"escrow","name":"Escrow (Thai bank)","status":"live"},{"id":"counsel","name":"Counsel (review)","status":"live"},{"id":"float","name":"MPBx Float (finance)","status":"live"},{"id":"supplier","name":"Supplier directory + KYC","status":"live"},{"id":"spec","name":"Spec (industrial verticals)","status":"live"},{"id":"disputes","name":"Disputes","status":"live"},{"id":"compliance","name":"CBAM + Battery Passport","status":"in-flight"},{"id":"agent","name":"Agent layer (MCP)","status":"live"}],"contact":"agents@mpbxchange.com","spec_human_url":"https://www.mpbxchange.com/agent-commerce"}