Search inventory items
SKU / code lookup and free-text search at the inventory-item level (variant × size — the most granular product dimension). A single call resolves the full coordinate chain: inventoryItemId, variantId, sizeId, productId. Identifier fields (sku, code) use exact/prefix matching so that a scan of ‘AM90-BLK-40’ does not fuzzy-match noise; full_name uses trigram substring matching. Exact identifier hits (score 2.0) rank above prefix hits (1.5), which rank above name matches (0.3–1.0). Scope to a known variant with variantId (all sizes for that colour), or to all variants of a product with productId. Returns variantId, sizeId, and productId so agents can pivot to any parent entity without a second round-trip. Org-scoping is enforced: only inventory items belonging to the authenticated org are returned.
Authorizations
User session token issued by NextAuth. For human users accessing Solya via the web application.
Query Parameters
Canonical text-filter param (preferred). Partial text to filter results by name (case-insensitive prefix/substring match). Use q instead of the deprecated search alias — q matches the param name advertised in MCP tool examples and used on /api/products.
Deprecated: use q instead. Backwards-compatible alias — when both q and search are supplied, q takes precedence.
Maximum number of results to return (1–100)
1 <= x <= 100Comma-separated list of IDs to resolve by exact match
Filter results to inventory items of this variant UUID (narrows to a single colour — returns all sizes for that variant)
Filter results to inventory items whose parent product matches this UUID (sourced via JOIN to silver.product_variants)

