=== Bharti Store Tools for WooCommerce ===
Contributors: aiguru
Tags: woocommerce, ai, ai agent, webmcp, agentic commerce
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
WC requires at least: 7.0
WC tested up to: 10.9
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Make your WooCommerce store usable by browser AI agents. Auto-generates WebMCP tools from your real products — no coding.

== Description ==

AI agents are starting to shop on behalf of customers. Today they do it by guessing — reading your page like a screenshot and clicking blindly. They pick the wrong size, miss your filters, and abandon the cart.

**Bharti Store Tools for WooCommerce** fixes that. It uses the browser's WebMCP API (`document.modelContext`) to hand agents a clear, structured list of what your store can do — built automatically from your own products, attributes, categories and cart.

No configuration. Activate it and your store is agent-ready.

= What agents can do =

* **search_products** — search your catalog by keyword, category, price and your own product options
* **get_product_details** — read one product's full details and stock
* **add_to_cart** — add items, with correct variation matching for size/colour
* **view_cart** / **remove_from_cart** — manage the real WooCommerce cart
* **get_store_policy** — answer returns, shipping and warranty questions
* **start_checkout** — hand the customer a checkout link

= Built from YOUR store =

The plugin does not assume you sell shoes. It reads the product attributes you actually created — "Size" and "Colour" for apparel, "RAM" and "Storage" for electronics — and builds the agent's options from those. One plugin, every kind of shop.

= The customer stays in control =

Agents can fill the cart, but **they cannot place an order or pay**. Checkout always ends with a human clicking through your normal WooCommerce checkout. Your payment flow, your rules, unchanged.

= Works in every browser =

WebMCP is new and not yet in every browser. The bundled polyfill means your tools are exposed correctly today, and switch to the native browser API automatically once it ships.

== Installation ==

1. Install and activate WooCommerce.
2. Upload this plugin and activate it.
3. Done. Visit your shop page — tools are registered automatically.

To verify, install the [Model Context Tool Inspector](https://github.com/beaufortfrancois/model-context-tool-inspector) Chrome extension and open your shop page.

== Frequently Asked Questions ==

= Do I need to change my theme or my products? =

No. The plugin reads what you already have.

= Can an AI agent place an order without my customer knowing? =

No. Agents can only fill the cart. Payment requires a human at your normal checkout.

= Does this slow down my site? =

The catalog is cached for one hour and refreshed automatically when you edit a product. One small JavaScript file is loaded on shop pages only.

= My store has 5,000 products. Will it work? =

Yes, but agents will only see your 200 most recent products. The plugin keeps that list cached so large stores stay fast. Support for searching the full catalog directly is planned.

== Screenshots ==

1. The settings screen: write your returns, shipping and warranty answers once, and agents use them. The status table confirms how many products and tools are live.
2. The owner-only agent preview on the shop page. Run any tool by hand to check the answer an AI agent would receive.
3. An AI agent filling a real cart from a plain sentence, using the tools this plugin generates.

== Third-party code ==

This plugin bundles one file written by others. The copyright notice stays inside the file itself.

* `assets/webmcp-compat.js` — WebMCP compatibility layer, from https://github.com/GoogleChromeLabs/webmcp-tools
  Copyright 2026 Google LLC, licensed under the Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0).
  Unmodified. Apache-2.0 is compatible with GPLv3, which the "GPLv2 or later" licence of this plugin covers.

== Changelog ==

= 1.0.1 =
* Search now matches each word separately, across tags and product options.
* Product details are returned in the same readable shape as search results.
* Declared WooCommerce as a required plugin.

= 1.0.0 =
* First release. Seven auto-generated tools, variation matching, cart and checkout support.
