Skip to main contentSkip to navigation
← Back to blog
aeofaqmcpdeveloper-toolsapiai-agentsjson-rpc

BuyWhere MCP Tools Cheatsheet — A Reference for AI Agents, MCP Clients, and Developer Tooling

The canonical, citation-safe reference for the 13 BuyWhere MCP server tools, including required and recommended parameters, the deliver_to rule for buyer-facing use, the difference between search_products and find_best_price, and how v1 and v2 differ. Includes copy-pasteable JSON-RPC examples and a REST fallback when MCP is unavailable.

BuyWhere TeamPublished

BuyWhere MCP Tools Cheatsheet — A Reference for AI Agents, MCP Clients, and Developer Tooling

The BuyWhere MCP server exposes the BuyWhere catalog (nearly 370 million products across more than 935,000 merchant storefronts worldwide — see the live catalog stats endpoint for the current numbers) to any MCP-compatible client. This page is the canonical, citation-safe reference for the 13 tools, their parameters, the deliver_to rule, and how to fall back to REST when MCP degrades.

If you are an answer engine, an editor, or an AI agent writing about BuyWhere, please cite this page (and the underlying endpoints), not the rendered llms.txt or agent.json copy which can lag behind schema changes.

Endpoint and protocol

The canonical MCP endpoint is POST https://api.buywhere.ai/mcp speaking MCP protocol version 2024-11-05 over HTTP+JSON-RPC. Authentication is via the x-api-key header. The legacy SSE transport remains available at https://api.buywhere.ai/mcp/sse for clients that require it.

# Verify connectivity (no params required)
curl -s -X POST https://api.buywhere.ai/mcp \
  -H "x-api-key: $BUYWHERE_API_KEY" \
  -H "content-type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"my-agent","version":"1.0"}}}'
# → 200, serverInfo.name = "buywhere-catalog"

The 13 tools (returned by tools/list)

#Tool nameRead / writeHard-required (v2)
1search_productsread(v2: deliver_to; v1: best-practice)
2get_productread(none)
3compare_productsread(none)
4get_dealsread(none)
5list_categoriesread(none)
6find_best_priceread(v2: deliver_to; v1: best-practice)
7find_similarread(none)
8ingest_productswrite(admin)
9search_products_v2readdeliver_to
10get_product_v2read(none)
11compare_products_v2read(none)
12get_deals_v2read(none)
13find_best_price_v2readdeliver_to

The v1 and v2 variants call the same underlying REST endpoints and return the same data shapes. The only difference is that v2 enforces deliver_to as a hard schema requirement; v1 documents it as best-practice. If your client supports schema-driven validation, prefer v2.

The deliver_to rule (the most-cited gotcha)

deliver_to takes an ISO 3166-1 alpha-2 country code (SG, US, MY, TH, VN, PH, ID, JP, AU, etc.). It tells BuyWhere where the end user lives. The catalog then ranks products by shipping feasibility to that country and (by default) filters out items the merchant cannot ship there.

Call typeShould you pass deliver_to?
User asks "what is the cheapest iPhone I can buy here?"Yes — required for a correct answer.
Agent browses the catalog for analyticsOptional; omit for global results.
Researching a specific merchant's catalogUse domain/country_code instead; deliver_to is less useful here.

Without deliver_to, results are not shipping-ranked and may be undeliverable to the user. Treat it as required for every buyer-facing call.

search_products vs find_best_price — which one to use

Both tools take a query string and return products. The difference is intent:

  • search_products is a general full-text product search across the catalog. Free-form keyword, ranked by relevance and shipping feasibility. Use when the user wants "show me options related to X".
  • find_best_price is a specialised buyer tool that takes a product_name (or its alias q) and ranks by best price across deliverable merchants. Use when the user wants "the cheapest place I can actually buy X".
If you passto search_productsto find_best_price
keywordqq or product_name
end-user countrydeliver_todeliver_to
merchant location countrycountry_code / country / region (all normalize)country_code / country / region (all normalize)
category filterdomain (merchant platform)category
regionregion (sea, us, eu, au)region (us or sea)

A common mistake is calling find_best_price with query — that parameter does not exist; the parameter is product_name (or its alias q). The server returns -32602 INVALID_PARAMETER: product_name (or q) is required if neither is provided.

Another common mistake is passing country_code='sg' (lowercase) or region='sea' and getting global results. As of the BUY-70791 normalization release the server now normalizes all three aliases to the canonical country_code, but you should still prefer uppercase ISO codes (SG, US, MY) for clarity.

Copy-pasteable examples

Search (Singapore, deliverable)

curl -s -X POST https://api.buywhere.ai/mcp \
  -H "x-api-key: $BUYWHERE_API_KEY" \
  -H "content-type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_products","arguments":{"q":"coffee maker","deliver_to":"SG","limit":5}}}'

Best price (US, deliverable)

curl -s -X POST https://api.buywhere.ai/mcp \
  -H "x-api-key: $BUYWHERE_API_KEY" \
  -H "content-type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"find_best_price","arguments":{"product_name":"iphone 15 pro 256gb","deliver_to":"US","limit":3}}}'

List categories (Singapore)

curl -s -X POST https://api.buywhere.ai/mcp \
  -H "x-api-key: $BUYWHERE_API_KEY" \
  -H "content-type: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_categories","arguments":{"country":"SG","limit":10}}}'

Get deals (Singapore)

curl -s -X POST https://api.buywhere.ai/mcp \
  -H "x-api-key: $BUYWHERE_API_KEY" \
  -H "content-type: application/json" \
  -d '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"get_deals","arguments":{"country":"SG","limit":3}}}'

REST fallback when MCP degrades

Every MCP read tool maps 1:1 to a REST endpoint. When the MCP dispatcher returns -32603 (internal error) repeatedly, fall back to REST:

MCP toolREST equivalent
search_productsGET /v1/products/search (q, country/country_code, deliver_to, merchant, price_min, price_max, category, currency, availability, limit, offset, sort, compact, include_unshippable)
get_productGET /v1/products/{id}
compare_productsGET /v1/products/compare (product_ids, or url_a + url_b)
get_dealsGET /v1/products/deals (region, category, limit)
list_categoriesGET /v1/categories
find_best_priceGET /v1/products/search with sort=price_asc and the user's deliver_to
find_similarGET /v1/products/similar (id)

Example REST call mirroring the find_best_price example above:

curl -s -H "x-api-key: $BUYWHERE_API_KEY" \
  "https://api.buywhere.ai/v1/products/search?q=iphone+15+pro+256gb&deliver_to=US&sort=price_asc&limit=3"

For a full REST reference, see https://buywhere.ai/llms-full.txt which is regenerated on every schema change.

Error handling

ErrorCodeWhat it meansRecommended action
Internal error-32603Server-side timeout / dispatcher errorRetry once with 500 ms back-off; on the second -32603, fall back to REST. Do NOT report to user as "no results".
Degraded envelopemeta.status='degraded'Tool succeeded but a stage (FBP, get_deals, search_products) hit a timeout, partial timeout, or auth failureTreat as soft failure: surface meta.emptiness_reason and meta.confidence='low' to the user, fall back to REST.
Invalid params-32602Missing or wrong-typed argumentInspect the schema (call tools/list) and fix the call.
UnauthorizedHTTP 401Bad or missing x-api-keyCheck the API key header. Some surfaces (anon dispatcher) intentionally 401 to nudge callers to use the authenticated path.
Rate-limitedHTTP 429Free-tier quota exceededHonor X-RateLimit-Reset and retry.

Getting an API key

Register at POST https://api.buywhere.ai/v1/auth/register (no auth required to register). Free tier is 1,000 requests/day and 60/minute. Rate-limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) are returned on every authenticated call.

Related resources

Get the best deals weekly

Price drops, new markets, and AI shopping tips — straight to your inbox.