Commerce API & MCP › Agent recipes

Commerce Agent Recipes

Practical recipes built from the tools exposed by https://mcp.nesika.ai/commerce. Every recipe uses only search_products, resolve_product, find_offers, and deep_search. The fifth tool, get_commerce_job, collects any of those calls that return a pending result. No other tools exist on this endpoint.

Give Claude live product prices

An MCP-connected assistant that answers pricing questions with live Commerce data instead of guessing from training data.

Tools used

search_productsfind_offers

Setup

  1. Create a Commerce MCP credential (credential_kind=commerce_mcp) in a Developer Project.
  2. Add the Commerce endpoint and credential to your MCP client configuration.
  3. Restart the client and confirm search_products and find_offers are listed as available tools.
  4. Ask a pricing question in plain language and let the client call the tools.

Example

{
  "tool": "search_products",
  "arguments": { "market": "AU", "query": "iPhone 16 128GB" }
}

Expected result shape

  • status and market echo the request
  • candidates[] with title, merchant_name, and url
  • candidates[].representative_offer.price.value and .currency
Start building

Find the cheapest current offer

An agent flow that resolves a product, pulls every current offer for it, and reports the lowest price found.

Tools used

resolve_productfind_offers

Setup

  1. Call resolve_product with whatever description of the product you have.
  2. Pass the returned identity into find_offers to collect current offers.
  3. Sort the offers[] array by price.value in your own client code -- Commerce returns offers, it does not rank them for you.

Example

{
  "tool": "find_offers",
  "arguments": {
    "market": "AU",
    "identity": { "title": "Apple iPhone 16 128GB" }
  }
}

Expected result shape

  • offers[] with merchant_id, merchant_name, and product_url
  • offers[].price.value and .currency per offer
  • offers[].stock.value when availability was found
Start building

Resolve messy product names

A cleanup step that checks inconsistent product text (from a spreadsheet, a scraped feed, or free-form user input) against Commerce's deterministic exact-identifier matching -- not a semantic or AI-driven match.

Tools used

resolve_product

Setup

  1. Call resolve_product with whichever fields you have -- title, url, description, model, sku, barcode, or gtin.
  2. A confident identity requires an exact GTIN match or an exact merchant-scoped product ID match; a plausible-looking title alone is not enough.
  3. When no exact identifier is available, expect alternatives[] and ambiguity_notes[] instead of an invented identity -- handle that case in your own client code.

Example

{
  "tool": "resolve_product",
  "arguments": { "market": "AU", "title": "appl iphone16 128gb blk" }
}

Expected result shape

  • ambiguity_notes[] explaining why an abbreviated title alone did not produce a confident match
  • alternatives[] with any plausible candidates found
  • identity only when an exact GTIN or merchant-scoped product ID was confirmed
Start building

Build a shopping research agent

An agent that researches a purchase decision across retailers, calling deep_search with a stated reason when search_products has not surfaced a specific missing fact.

Tools used

search_productsdeep_search

Setup

  1. Start with search_products for a broad shortlist of candidates.
  2. If a specific fact is still missing (price, availability, shipping, identity, or retailer discovery), call deep_search with a query and a reason describing that missing fact -- deep_search runs the same default work budget as find_offers, not a bigger or more automated one.
  3. Summarise results[] and discovered_retailers[] for the user.

Example

{
  "tool": "deep_search",
  "arguments": {
    "market": "AU",
    "query": "quiet 12000 BTU portable air conditioner under 60db",
    "reason": "Standard search returned no noise-level data to compare candidates."
  }
}

Expected result shape

  • results[] (same candidate shape as search_products)
  • discovered_retailers[] found during research
  • ambiguity_notes[] when the research was inconclusive
Start building

Build a competitor-price watcher

A repeated agent run -- triggered by your own scheduler or cron job, not a Nesika feature -- that re-checks offers for a fixed set of products and flags price changes.

Tools used

search_productsfind_offers

Setup

  1. Resolve each tracked product once and store its identity.
  2. On each run of your own scheduled job, call find_offers for every stored identity.
  3. Diff offers[].price.value against the previous run in your own storage -- Commerce has no built-in price-change tool.

Example

{
  "tool": "find_offers",
  "arguments": {
    "market": "AU",
    "identity": { "gtin": "0194253404790" },
    "merchant_ids": ["BigW", "Kmart"]
  }
}

Expected result shape

  • offers[] scoped to the requested merchant_ids
  • offers[].price.value to compare against your stored history
  • failures[] for any merchant Commerce could not check this run
Start building

Connect Commerce MCP first

From the selected Developer Project, create a Commerce MCP credential with credential_kind=commerce_mcp and commerce:read scope. Configure the Commerce endpoint with that credential, then run any recipe above from your AI client. Do not use a REST API key.

Open Commerce MCP setup
Logos provided by Logo.dev