← Receivers

products:list

products family

mcp

List a workspace's storefront products with their prices (public). To buy as an agent: open an ACP session with POST /api/checkout_sessions, or pay the item's x402 link.

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
public
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
Idempotent
yes
Safe to retry as-is.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/products:list \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "slug": <string>, "collection": <string>, "includeDrafts": <boolean>, "sort": <string> }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • slug string optional
  • collection string optional Narrow the catalogue to one collection, matched TRIMMED on both sides (the facet label is derived as `(collection ?? '').trim()`, so an untrimmed predicate would match zero rows and filter everything). Empty or unknown returns the whole catalogue, never an error. Public: it can only narrow rows an anonymous caller could already see — unlike includeDrafts, which is honoured only for the attested owner (ctx.ownerSlug), never a body claim.
  • includeDrafts boolean optional Owner-only: true returns draft products and every active price row. Honoured only when the attested caller owns slug (ctx.ownerSlug === slug); for anyone else it is ignored, never an error.
  • sort string optional featured | newest | price-asc | price-desc, trimmed and lower-cased by the resolver; anything else orders as featured (updated_at desc).

Response

What comes back from the call.

  • products object[]
  • error string

Traffic

Every call to products:list, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names products:list, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

UI 2
  • one.ie/web/src/components/storefront/ProductCard.tsx:47
  • one.ie/web/src/pages/u/[slug]/shop/index.astro:121
API route 6
  • one.ie/web/src/lib/catalog-store.ts:216
  • one.ie/web/src/lib/data-bindings.ts:60
  • one.ie/web/src/lib/puck/ecommerce-discover-blocks.tsx:21
  • one.ie/web/src/lib/puck/resolve-bindings.ts:483
  • one.ie/web/src/lib/puck/route-bindings.ts:40
  • one.ie/web/src/lib/receiver-index.generated.ts:279
Agent runtime 1
  • channels/src/tools/commerce.ts:64
→

Answered by

products:list one.ie/web/src/lib/resolvers/commerce.ts:840 Dispatched through POST /api/ask/products:list, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string"
    },
    "collection": {
      "description": "Narrow the catalogue to one collection, matched TRIMMED on both sides (the facet label is derived as `(collection ?? '').trim()`, so an untrimmed predicate would match zero rows and filter everything). Empty or unknown returns the whole catalogue, never an error. Public: it can only narrow rows an anonymous caller could already see — unlike includeDrafts, which is honoured only for the attested owner (ctx.ownerSlug), never a body claim.",
      "type": "string"
    },
    "includeDrafts": {
      "description": "Owner-only: true returns draft products and every active price row. Honoured only when the attested caller owns slug (ctx.ownerSlug === slug); for anyone else it is ignored, never an error.",
      "type": "boolean"
    },
    "sort": {
      "description": "featured | newest | price-asc | price-desc, trimmed and lower-cased by the resolver; anything else orders as featured (updated_at desc).",
      "type": "string"
    }
  }
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "products": {
      "type": "array",
      "items": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {}
      }
    },
    "error": {
      "type": "string"
    }
  }
}