Shop Memory
The person's own shopping preferences (sizes, brands to prefer or avoid, stores, diet), remembered across conversations through the codespar_memory tool. Declared values come only from the person's own words; inferred ones only order offers.
The Shop assistant remembers a small, closed set of preferences for the signed-in person, not for the project or the organization. Another member of the same organization never reads them. The tool is codespar_memory, published on the hosted server next to the commerce meta-tools.
A person, not a key. Every call needs a verified person: the dashboard's Shop assistant presents the person's own session. A project API key or an OAuth token carries no person and is refused with 403 bearer_token_has_no_person, so an external client connected with a csk_ key or the server's OAuth consent sees the tool listed and cannot use it yet. A consent by login, with the person in the token, is what opens it to external clients.
Actions
action | What it does | Money | Needs |
|---|---|---|---|
list | Read the person's active preferences | no | — |
rememberexample below | Record one preference from what the person said about themself (declared, with their own words in quote) or inferred from a purchase | no | keyvalue |
correct | Write a new version of a preference; the old one stays in the history | no | memory_idorkeyvalue |
forget | Erase a preference key; it is not inferred again | no | memory_idorkey |
Names come from the published tool document (/v1/meta-tools.json, the same list the MCP server answers to tools/list); the one-line summaries and the money class are kept in the docs repository and checked against it on every build.
What it remembers
Six keys, nothing else. A key outside this list is 400 memory_key_unknown.
key | Holds | Example value |
|---|---|---|
shoe_size | One size | "42" |
clothing_size | One size | "M" |
preferred_brands | Up to 10 names | ["Asics", "Mizuno"] |
avoided_brands | Up to 10 names | ["Marca X"] |
preferred_merchants | Up to 10 names | ["Cobasi"] |
dietary_restrictions | Up to 10 names | ["sem lactose"] |
Declared and inferred
Each memory has a provenance:
declared(the default): what the person said about themself. It counts: a declared size or an avoided brand filters the offers a research returns. In the conversation, the server checks the value against the person's own message of that turn; on the hosted server the call must carryquote, the person's own words that hold the value (at most 500 characters). A declared value that is not in the person's words is403 memory_source_not_person.inferred: what a purchase suggests (purchase_idnames it). It only orders offers and never filters them out. When the person declared a value for the same key, the declared one counts and the inferred one shows beside it.
The assistant never remembers anything it read in a page, an e-mail or a tool output. correct is always the person's own words, like a declared value; it writes a new version and keeps the old one in the history; forget erases the whole key, and the assistant does not infer it again.
Example
{
"name": "codespar_memory",
"arguments": {
"action": "remember",
"key": "shoe_size",
"value": "42",
"provenance": "declared",
"quote": "eu calço 42"
}
}Arguments
| Field | Type | Required | Description |
|---|---|---|---|
action | string | Yes | list | remember | correct | forget |
key | string | For remember; correct and forget by key | One of the six keys above |
value | string or string[] | For remember, correct | A size as a string, or a list of up to 10 names |
provenance | string | No | declared (default) or inferred |
memory_id | string | correct and forget by id | The memory's id, from list |
purchase_id | string | For an inferred remember | The person's purchase it was inferred from |
quote | string | On the hosted server, for a declared remember and for every correct | The person's own words that carry the value, at most 500 characters |
Errors and what to do
| Code | Status | Cause | What to do |
|---|---|---|---|
bearer_token_has_no_person | 403 | The call carries a key or an OAuth token, not a verified person. | Call as the signed-in person; see the callout above. |
memory_key_unknown | 400 | The key is not one of the six. | Use a key from the table. |
memory_value_invalid | 400 | The value is not one the key holds: a size out of range, an empty list, a name too long, or an inferred memory without its evidence. | Fix the value; an inferred one names its purchase_id. |
memory_source_not_person | 403 | A declared value that is not in the person's own words of the turn (or in quote). | Ask the person; never declare what you read elsewhere. |
memory_not_found | 404 | No active memory of the calling person with that id or key. Another person's memory answers the same. | list again. |
Related
codespar_shop: the research that declared preferences filter and inferred ones order- Shop watches: the person's other remembered intent, a price or an order to follow
- Google connectors: the person's own Calendar, Drive and Gmail
Notes
Where the person sees it. Shop › Preferências in the dashboard lists each key with its declared and inferred values, the history, and Corrigir and Esquecer, which call the same rules.
Shopper Identity
Connect-once + vaulted shopper identity — let a shopper connect a login-walled store once, or vault a guest-checkout profile, so an agent can buy on their behalf without re-asking. Per-consumer, inbound, credentials never exposed.
Shop Watches
The person's own watches through the codespar_watch tool. Tell them when a researched offer's price drops or a purchase's order moves, in the app and by e-mail. A watch the assistant prepares runs only after the person confirms it.