{"contractVersion":"12.4.0","instructions":"On first use, briefly introduce MattaNutra, its science-informed approach and the understanding-to-products journey, then invite their story, adapting to goals already given. Keep introduction state host-side; returning users get a brief welcome and changed-context acknowledgment. For a new personalised consultation, retrieve info(view:\"client_guide\") for the v15.5 web-questionnaire reference. Required order: understand goals -> gather relevant facts -> explore their meaning -> reflect understanding -> obtain actual user confirmation -> formulate internally -> search products. Lead every topic with an open question; the questionnaire is hidden coverage, not a client checklist. Choices or numbers are only targeted clarification after an open answer or when the user prefers them. Briefly explain why a topic matters scientifically, distinguishing general evidence from personal hypotheses; do not diagnose or invent study claims. Deduce only directly supported facts; confirm material uncertain inferences, never invent negative health answers, life stage, deficiency or cause. Explore motivation, priorities, symptom duration/pattern/impact, previous attempts and constraints; ask one or two connected questions at a time, counting every independent answer request (including subquestions, not question marks). Never append a separate topic with “also”; ask at most two food frequencies per turn. Reflect and explore a meaningful concern before changing topic; reuse concrete narrative without demanding labels or ratings. Pair only naturally related topics. Missing barriers or timing stay pending; clarify old versus changed context, never invent connections. Cover life stage, sleep, diet/food frequencies, digestion, activity, stress/habits, conditions/medications, current supplements/reactions, allergies, family history, available labs and shopping preferences. When the customer identifies as a woman, cover menopause status and relevant hair loss/cycle changes: reuse clear existing answers; ask only for missing context, allowing not sure/not applicable. Never silently skip or force disclosure. Address every applicable source baseline topic before completion; a topic not yet covered by the conversation remains pending, not unknown or declined. Keep coverage, unresolved follow-ups and confirmation separately host-side; unknown/declined requires the user to express uncertainty/refusal and is not a negative answer. Before summarising, establish attempts and results, then ask barriers separately if missing; do not infer “nothing tried” or invent a barrier. Summarise the person specifically and ask whether you understood correctly or missed anything. Wait for actual confirmation before formulation; silence is not confirmation. Corrections require an updated summary and confirmation; basket-only refinements reuse confirmed context. Keep all personal/health details host-only. Use opaque random idempotency keys; never encode age, goals, symptoms or narrative in IDs or permitted text fields. No nutrient/amount list or dose-approval step. Show the actual returned basket around goals, using product names; explain only supported known extra-ingredient benefits, technical details on request. Set matchingReady:true on plan mutations only after this checkpoint; missing/false returns invalid_request with nextAction=gather_context. Reads/polls need none. Only an explicit request to match already supplied exact targets without consultation permits that limited path; do not invent personal needs. Host attestation cannot verify unseen conversation or establish medical clearance.\nMattaNutra matches explicit nutrient amounts and shopping preferences to available supplement products in Thailand. Results concern newly selected products only. It supports unpaid merchant checkout and order support, without selecting personal nutrient needs or assessing health.\nMattaNutra matches explicit nutrient amounts and shopping preferences to available products in Thailand (THB). Targets describe contributions from newly selected products only. The service does not assess health, choose personal nutrient needs or account for diet, medicines, conditions or existing supplements. All six tools work without sign-in. Keep returned planHandle and orderHandle values private; they provide access to guest plans and orders. Existing account-owned records remain inaccessible through guest tools.\nA plan returns one recommendation per round. Creation accepts explicit targets, shopping requirements and ranking weights. On first use, introduce MattaNutra and explain the process. For personalised consultations use open questions, explain their relevance, track questionnaire coverage privately and obtain actual customer confirmation of the personal summary before formulation and product search. Create, refine and answer mutations require matchingReady:true after that checkpoint; reads and polls do not. Reuse confirmed context for shopping-only changes. This generic attestation does not verify conversation content or provide medical clearance. Refinement uses the current planHandle, expectedRevision and a new idempotencyKey. Targets identify an ingredient, amount and unit; they do not represent estimated personal needs. Supplied amounts and gaps concern newly selected products only. Unknown quantities remain unknown.\nscoring.profile selects a ranking preset; scoring.weights adjusts its terms. Ranking weights compare nutrient fit, goods price and practical product quantities. Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Cost weight: scoring.weights.price (0 to 2) controls first-order goods cost in THB, delivery excluded. 0 ignores the cost penalty; 1 is normal; 2 doubles it. With requirements.maxPriceMinor, it weights budget-overrun penalties instead. Omission preserves; null resets to the preset. They are not health scores or safety limits. Product exclusions and physical administration constraints still apply. A finite catalogue can leave requested ingredients unavailable or only partly supplied.\nSSE plan calls wait up to 15 seconds for committed matching results; JSON-only calls return immediately. A plan call can return committed matching results or processing. A processing result includes a planHandle and pollAfterSeconds for a later read. Handle-only calls read existing work; no matching occurs in polls. Handle-bound mutation retries use the same idempotencyKey and input. A guest create key cannot recover a lost handle: poll with the returned planHandle, or create with a fresh key if no handle was received. Disconnecting does not cancel admitted work.\nReady means technically selectable for checkout. It does not establish complete target coverage, total daily exposure or medical suitability.\nexecute creates or recovers an unpaid checkout for the agreed current revision. It does not charge, rematch or confirm payment. The customer reviews delivery and the final amount on the merchant checkout. order reports verified payment and fulfilment state. support handles an existing order. feedback records optional service feedback with customer consent and without personal or health details.","tools":[{"title":"Discover MattaNutra","description":"Read the factual service overview or request the inline client_guide for a benefit-focused shopping conversation. Use overview for factual capabilities, supported markets, languages and guest access. At the start of a new personalised consultation, request view: client_guide for the current questionnaire coverage map, first-use introduction and open conversational guidance. Explain the purpose of questions and reuse supported narrative answers. Keep all answers in the host conversation.","inputSchema":{"additionalProperties":false,"type":"object","properties":{"locale":{"minLength":2,"maxLength":35,"type":"string","description":"BCP 47 language tag for the response; supported locales come from info and unsupported locales fall back to English."},"view":{"type":"string","enum":["overview","client_guide"],"default":"overview","description":"overview returns service capabilities and supported destinations; request client_guide for a new personalised consultation. It adds the first-use introduction, current questionnaire coverage map, open questions, contextual explanations, optional clarification choices and customer confirmation before formulation and product matching. Neither view accepts personal or health information."}},"description":"Read public service information, supported markets, languages, guest access and shopping limitations."},"outputSchema":{"type":"object","anyOf":[{"additionalProperties":false,"type":"object","properties":{"ok":{"const":true,"type":"boolean"},"serviceName":{"type":"string"},"contractVersion":{"type":"string"},"schemaChecksum":{"type":"string"},"buildId":{"type":"string"},"supportedCountries":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"countryCode":{"type":"string"},"countryName":{"type":"string"},"currency":{"type":"string"}},"required":["countryCode","countryName","currency"]}},"supportedLocales":{"type":"array","items":{"type":"string"}},"userAccountRequired":{"type":"boolean"},"continuation":{"const":"polling_only","type":"string"},"pollAfterSeconds":{"type":"number"},"supportAvailable":{"type":"boolean"},"description":{"type":"string"},"howToUse":{"type":"string"},"clientGuideText":{"type":"string"},"valuePropositionId":{"type":"string"},"wellnessBoundary":{"type":"string"}},"required":["ok","serviceName","contractVersion","schemaChecksum","buildId","supportedCountries","supportedLocales","userAccountRequired","continuation","pollAfterSeconds","supportAvailable","description","howToUse","valuePropositionId","wellnessBoundary"]},{"additionalProperties":false,"type":"object","properties":{"ok":{"const":false,"type":"boolean"},"error":{"additionalProperties":false,"type":"object","properties":{"category":{"type":"string","enum":["INVALID_ARGUMENT","FAILED_PRECONDITION","NOT_FOUND","ABORTED","RESOURCE_EXHAUSTED","UNAVAILABLE"]},"correlationId":{"type":"string"},"currentRevision":{"type":"integer"},"errorCode":{"type":"string"},"error_code":{"type":"string"},"fieldPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"issues":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"fieldPath":{"type":"string"},"messageKey":{"type":"string"},"reasonCode":{"type":"string"},"message":{"type":"string"},"permittedLimit":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}]}}]},"actual":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["fieldPath","messageKey","reasonCode"]}},"message":{"type":"string"},"messageKey":{"type":"string"},"nextAction":{"type":"string"},"nextActions":{"type":"array","items":{"type":"string"}},"reasonCode":{"type":"string","enum":["positive_number_required","duplicate_supplement","unsupported_unit","legacy_id","unknown_supplement","required","unsupported_country","unsupported_currency","unreferenced_claim","unexpected_property","wrong_purpose","revision_conflict","idempotency_conflict","not_found","open_query","plan_not_ready","availability_changed","checkout_expired","rate_limited","temporarily_unavailable","SERVICE_DEADLINE_EXCEEDED","consent_required","stale_safety_acknowledgement","stale_revision","invalid_request","contract_refresh_required","incompatible_identity","request_too_broad","too_short","unsafe_content"]},"requestedRevision":{"type":"integer"},"retryable":{"type":"boolean"}},"required":["category","errorCode","error_code","fieldPath","message","messageKey","reasonCode","retryable"]}},"required":["ok","error"]}]},"securitySchemes":[{"type":"noauth"}],"_meta":{"securitySchemes":[{"type":"noauth"}]},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"name":"info","responsibilityVersion":"responsibility-4.0.0"},{"title":"Build or refine a supplement basket","description":"On first use, briefly introduce MattaNutra, its science-informed approach and the understanding-to-products journey, then invite their story, adapting to goals already given. Keep introduction state host-side; returning users get a brief welcome and changed-context acknowledgment. For a new personalised consultation, retrieve info(view:\"client_guide\") for the v15.5 web-questionnaire reference. Required order: understand goals -> gather relevant facts -> explore their meaning -> reflect understanding -> obtain actual user confirmation -> formulate internally -> search products. Lead every topic with an open question; the questionnaire is hidden coverage, not a client checklist. Choices or numbers are only targeted clarification after an open answer or when the user prefers them. Briefly explain why a topic matters scientifically, distinguishing general evidence from personal hypotheses; do not diagnose or invent study claims. Deduce only directly supported facts; confirm material uncertain inferences, never invent negative health answers, life stage, deficiency or cause. Explore motivation, priorities, symptom duration/pattern/impact, previous attempts and constraints; ask one or two connected questions at a time, counting every independent answer request (including subquestions, not question marks). Never append a separate topic with “also”; ask at most two food frequencies per turn. Reflect and explore a meaningful concern before changing topic; reuse concrete narrative without demanding labels or ratings. Pair only naturally related topics. Missing barriers or timing stay pending; clarify old versus changed context, never invent connections. Cover life stage, sleep, diet/food frequencies, digestion, activity, stress/habits, conditions/medications, current supplements/reactions, allergies, family history, available labs and shopping preferences. When the customer identifies as a woman, cover menopause status and relevant hair loss/cycle changes: reuse clear existing answers; ask only for missing context, allowing not sure/not applicable. Never silently skip or force disclosure. Address every applicable source baseline topic before completion; a topic not yet covered by the conversation remains pending, not unknown or declined. Keep coverage, unresolved follow-ups and confirmation separately host-side; unknown/declined requires the user to express uncertainty/refusal and is not a negative answer. Before summarising, establish attempts and results, then ask barriers separately if missing; do not infer “nothing tried” or invent a barrier. Summarise the person specifically and ask whether you understood correctly or missed anything. Wait for actual confirmation before formulation; silence is not confirmation. Corrections require an updated summary and confirmation; basket-only refinements reuse confirmed context. Keep all personal/health details host-only. Use opaque random idempotency keys; never encode age, goals, symptoms or narrative in IDs or permitted text fields. No nutrient/amount list or dose-approval step. Show the actual returned basket around goals, using product names; explain only supported known extra-ingredient benefits, technical details on request. Set matchingReady:true on plan mutations only after this checkpoint; missing/false returns invalid_request with nextAction=gather_context. Reads/polls need none. Only an explicit request to match already supplied exact targets without consultation permits that limited path; do not invent personal needs. Host attestation cannot verify unseen conversation or establish medical clearance. Match or refine one product basket for explicit nutrient amounts and shopping preferences; read existing matching work. Create with locale, destinationCountry, targets (name or ingredientId, amount, unit), matchingReady:true and a fresh idempotencyKey. Targets concern newly matched products only. The advanced matching algorithm returns one actual product basket. Read or poll with planHandle, respecting pollAfterSeconds. Refine or answer with planHandle, current expectedRevision, matchingReady:true, a fresh key and the changed fields. Keep shopping preferences within the published schema. Retry handle-bound changes with the same key and identical input. If an initial create response is lost, poll with its returned planHandle; if none was received, create with a fresh key. A reused guest create key cannot recover a handle. After customer agreement to buy, call execute for unpaid checkout using planHandle, expectedRevision and a fresh key.","inputSchema":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"locale":{"minLength":2,"maxLength":35,"description":"BCP 47 locale; supported locales are advertised by info. Unsupported locales fall back to English.","type":"string"},"destinationCountry":{"pattern":"^[A-Z]{2}$","description":"Deliverable ISO country from info.supportedCountries.","type":"string"},"requirements":{"additionalProperties":false,"description":"Product-matching constraints and preferences only. Numerical values are advisory preferences for ranking, never purchase limits. Omission preserves; null clears. Zero remains advisory. Unknown product quantities remain unknown.","type":"object","properties":{"allowedForms":{"uniqueItems":true,"maxItems":8,"type":"array","items":{"type":"string","enum":["capsule","softgel","tablet","powder","liquid","gummy","sachet","other"],"description":"Acceptable product dosage forms. Select only forms the customer has agreed to use."},"description":"Acceptable product dosage forms. Select only forms the customer has agreed to use."},"dietaryPreference":{"type":"string","enum":["any","plant_based","vegan"],"description":"Requested dietary eligibility: any, plant-based or vegan products."},"excludeProductIds":{"maxItems":100,"uniqueItems":true,"type":"array","items":{"pattern":"^prd_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Exclude only these products. Does not remove requested nutrients. [] clears this exclusion."},"description":"Exclude only these products. Does not remove requested nutrients. [] clears this exclusion."},"excludeSupplementIds":{"maxItems":100,"uniqueItems":true,"type":"array","items":{"pattern":"^sup_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Exclude products containing these nutrient concepts, not particular product IDs. [] clears this exclusion."},"description":"Exclude products containing these nutrient concepts, not particular product IDs. [] clears this exclusion."},"maxDailyPills":{"anyOf":[{"minimum":0,"maximum":1000,"description":"Preferred daily pill count; unknown counts remain unknown.","type":"number"},{"type":"null","description":"Explicit null value. Preferred daily pill count, used for ranking rather than as a purchase limit. Omission preserves on refinement and null clears the preference."}],"description":"Preferred daily pill count, used for ranking rather than as a purchase limit. Omission preserves on refinement and null clears the preference."},"maxPriceMinor":{"anyOf":[{"minimum":0,"maximum":1000000000000,"description":"Preferred first-order goods price in destination currency minor units; delivery quoted separately.","type":"integer"},{"type":"null","description":"Explicit null value. Preferred first-order goods price in destination currency minor units, with delivery separate; null clears this advisory preference."}],"description":"Preferred first-order goods price in destination currency minor units, with delivery separate; null clears this advisory preference."},"maxProductCount":{"anyOf":[{"minimum":0,"maximum":9007199254740991,"type":"integer","description":"Preferred distinct new products; there is no system minimum or maximum basket count."},{"type":"null","description":"Explicit null value. Preferred distinct new products; there is no system minimum or maximum basket count."}],"default":null,"description":"Preferred distinct new products; there is no system minimum or maximum basket count."},"productDoses":{"maxItems":100,"uniqueItems":true,"description":"Fix returned products at these daily labelled servings; other products remain optimisable. Administration metadata identifies measurable quantities. [] clears proposals. Revision evaluates without purchasing. Exclusion and physical conflicts return field errors; numerical shopping preferences remain ranking terms.","type":"array","items":{"additionalProperties":false,"type":"object","properties":{"productId":{"pattern":"^prd_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Published product identifier returned by MattaNutra; do not substitute a product name or invent an ID."},"servingsPerDay":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"}},"required":["productId","servingsPerDay"],"description":"Fix returned products at these daily labelled servings; other products remain optimisable. Administration metadata identifies measurable quantities. [] clears proposals. Revision evaluates without purchasing. Exclusion and physical conflicts return field errors; numerical shopping preferences remain ranking terms."}},"omega3SourcePreference":{"type":"string","enum":["any","algae_only","fish_allowed"],"description":"Explicit requested omega-3 source; algae_only excludes fish sources and fish_allowed permits them. Do not infer algae-only from a nutrient name."},"retainProductIds":{"maxItems":100,"uniqueItems":true,"type":"array","items":{"pattern":"^prd_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Catalogue product IDs that must be included among newly selected products."},"description":"Catalogue product IDs that must be included among newly selected products."},"retainSupplementIds":{"maxItems":100,"uniqueItems":true,"type":"array","items":{"pattern":"^sup_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Nutrient-concept IDs that must receive a positive contribution from newly selected products."},"description":"Nutrient-concept IDs that must receive a positive contribution from newly selected products."}}},"scoring":{"additionalProperties":false,"description":"Start with best_match by default and refine weights conversationally; each round returns one recommendation. balanced is an accepted alias for best_match. profile is a scoring preset, not customer demographics. Omitted effective terms default to one. Changing preset resets old overrides, then applies supplied overrides. weights:null clears overrides; {} preserves them. Individual null resets. An empty scoring refinement can retry failed/stale work; otherwise unchanged input is a no-op.","type":"object","properties":{"profile":{"type":"string","enum":["best_match","balanced","best_coverage","fewest_pills","lowest_cost"],"default":"best_match","description":"Scoring preset for dose, price and routine trade-offs. best_match is the default; balanced is its accepted alias."},"weights":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"pills":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Importance of the daily pill-count term; zero ignores this term and null restores its preset value."}],"description":"Importance of the daily pill-count term; zero ignores this term and null restores its preset value."},"products":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Importance of the distinct-product-count term; zero ignores this term and null restores its preset value."}],"description":"Importance of the distinct-product-count term; zero ignores this term and null restores its preset value."},"price":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Cost weight: scoring.weights.price (0 to 2) controls first-order goods cost in THB, delivery excluded. 0 ignores the cost penalty; 1 is normal; 2 doubles it. With requirements.maxPriceMinor, it weights budget-overrun penalties instead. Omission preserves; null resets to the preset."}],"description":"Cost weight: scoring.weights.price (0 to 2) controls first-order goods cost in THB, delivery excluded. 0 ignores the cost penalty; 1 is normal; 2 doubles it. With requirements.maxPriceMinor, it weights budget-overrun penalties instead. Omission preserves; null resets to the preset."},"servings":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Importance of the daily servings term; zero ignores this term and null restores its preset value."}],"description":"Importance of the daily servings term; zero ignores this term and null restores its preset value."},"nutrients":{"description":"Returned or published ingredient IDs only. Omission preserves; individual null resets to the preset.","type":"object","patternProperties":{"^[A-Za-z][A-Za-z0-9_-]{0,127}$":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Returned or published ingredient IDs only. Omission preserves; individual null resets to the preset."}],"description":"Returned or published ingredient IDs only. Omission preserves; individual null resets to the preset."}}}},"description":"Partial scoring-weight overrides. Omission preserves saved values, null clears all overrides, and an individual null resets that term to its preset."},{"type":"null","description":"Explicit null value. Partial scoring-weight overrides. Omission preserves saved values, null clears all overrides, and an individual null resets that term to its preset."}],"description":"Partial scoring-weight overrides. Omission preserves saved values, null clears all overrides, and an individual null resets that term to its preset."}}},"searchEffort":{"type":"string","enum":["standard","expanded"],"default":"standard","description":"Deterministic search budget: standard 8000 expansion attempts; expanded 64000. Expanded includes the standard incumbent. A revise omission preserves prior effort. Repeating identical inputs reuses work; after expanded exhaustion refine the request."},"clientCapabilities":{"additionalProperties":false,"type":"object","properties":{"productCards":{"type":"boolean","description":"The host can render the returned products as product cards in the customer conversation."},"inlineImages":{"type":"boolean","description":"The host can render product images inline in the customer conversation."},"mcpImageBlocks":{"type":"boolean","description":"The host can render native MCP image content blocks in the customer conversation."}},"description":"Presentation capabilities supported for this call; these do not change matching or save customer preferences."},"matchingReady":{"description":"Host attestation required to create, refine or answer a plan. For a personalised consultation, true only after open conversation covering the applicable questionnaire topics, meaningful goal/symptom follow-ups and the customer's actual confirmation of a personal summary, before formulation and product search. Silence is not confirmation. Resolve material corrections and confirm the updated summary; reuse confirmed context for shopping-only refinements. Include applicable life-stage questions (for women, menopause status and related notes). Respect unknown/declined answers; they are not negative answers or clearance. All answers, coverage and confirmation stay host-side. This flag cannot verify an unseen conversation or establish medical clearance. Omitted/false returns nextAction=gather_context without matching work. Reads/polls need no attestation. Explicit matching-only requests use the customer's supplied targets without a personal-need claim, as explained in client_guide.","type":"boolean"},"targets":{"minItems":1,"maxItems":30,"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"ingredientId":{"minLength":1,"maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_-]*$","type":"string","description":"Ingredient identifier returned by the plan or published catalogue, used to identify the target being added or refined."},"name":{"minLength":1,"maxLength":240,"type":"string","description":"Reported nutrient or supplement name; preserve the customer's intended ingredient and form."},"amount":{"minimum":0,"maximum":1000000000000000,"description":"Daily amount required from NEW products only, in the accompanying unit; excludes diet and continued supplements. Zero softly minimises new-product exposure where a comparison scale exists; it is not a categorical exclusion.","type":"number"},"unit":{"type":"string","enum":["mcg","mg","g","IU","CFU","ml","serving"],"description":"Unit of the accompanying nutrient amount or range. Use a supported unit compatible with that ingredient."},"acceptableRange":{"additionalProperties":false,"type":"object","properties":{"maximum":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"},"minimum":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"},"unit":{"type":"string","enum":["mcg","mg","g","IU","CFU","ml","serving"],"description":"Unit of the accompanying nutrient amount or range. Use a supported unit compatible with that ingredient."}},"required":["maximum","minimum","unit"],"description":"Optional acceptable daily quantity range for this target, expressed in its own accompanying unit."}},"required":["amount","unit"],"anyOf":[{"required":["ingredientId"],"description":"This alternative requires ingredientId."},{"required":["name"],"description":"This alternative requires name."}],"description":"Explicit nutrient amounts to match from newly selected products only. Creation needs an amount, unit and name or ingredientId; refinement upserts by ingredientId and preserves omitted values."},"description":"Explicit nutrient amounts to match from newly selected products only. Creation needs an amount, unit and name or ingredientId; refinement upserts by ingredientId and preserves omitted values."},"idempotencyKey":{"minLength":16,"maxLength":128,"type":"string","description":"Caller-generated opaque random key for one mutation. For handle-bound retries use the same key and input. A guest create key cannot recover a lost handle: use the returned planHandle to poll, or create with a fresh key if no handle was received."}},"required":["locale","destinationCountry","targets","idempotencyKey"],"description":"Create a new plan with locale, destination, agreed targets and a new idempotency key."},{"additionalProperties":false,"type":"object","properties":{"planHandle":{"minLength":32,"maxLength":4096,"type":"string","description":"Opaque plan capability returned by plan. Pass it unchanged for this guest plan; keep the handle private."},"clientCapabilities":{"additionalProperties":false,"type":"object","properties":{"productCards":{"type":"boolean","description":"The host can render the returned products as product cards in the customer conversation."},"inlineImages":{"type":"boolean","description":"The host can render product images inline in the customer conversation."},"mcpImageBlocks":{"type":"boolean","description":"The host can render native MCP image content blocks in the customer conversation."}},"description":"Presentation capabilities supported for this call; these do not change matching or save customer preferences."}},"required":["planHandle"],"description":"Read or poll an existing plan by handle; optional presentation settings do not mutate it."},{"additionalProperties":false,"type":"object","properties":{"locale":{"minLength":2,"maxLength":35,"description":"BCP 47 locale; supported locales are advertised by info. Unsupported locales fall back to English.","type":"string"},"destinationCountry":{"pattern":"^[A-Z]{2}$","description":"Deliverable ISO country from info.supportedCountries.","type":"string"},"requirements":{"additionalProperties":false,"description":"Product-matching constraints and preferences only. Numerical values are advisory preferences for ranking, never purchase limits. Omission preserves; null clears. Zero remains advisory. Unknown product quantities remain unknown.","type":"object","properties":{"allowedForms":{"uniqueItems":true,"maxItems":8,"type":"array","items":{"type":"string","enum":["capsule","softgel","tablet","powder","liquid","gummy","sachet","other"],"description":"Acceptable product dosage forms. Select only forms the customer has agreed to use."},"description":"Acceptable product dosage forms. Select only forms the customer has agreed to use."},"dietaryPreference":{"type":"string","enum":["any","plant_based","vegan"],"description":"Requested dietary eligibility: any, plant-based or vegan products."},"excludeProductIds":{"maxItems":100,"uniqueItems":true,"type":"array","items":{"pattern":"^prd_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Exclude only these products. Does not remove requested nutrients. [] clears this exclusion."},"description":"Exclude only these products. Does not remove requested nutrients. [] clears this exclusion."},"excludeSupplementIds":{"maxItems":100,"uniqueItems":true,"type":"array","items":{"pattern":"^sup_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Exclude products containing these nutrient concepts, not particular product IDs. [] clears this exclusion."},"description":"Exclude products containing these nutrient concepts, not particular product IDs. [] clears this exclusion."},"maxDailyPills":{"anyOf":[{"minimum":0,"maximum":1000,"description":"Preferred daily pill count; unknown counts remain unknown.","type":"number"},{"type":"null","description":"Explicit null value. Preferred daily pill count, used for ranking rather than as a purchase limit. Omission preserves on refinement and null clears the preference."}],"description":"Preferred daily pill count, used for ranking rather than as a purchase limit. Omission preserves on refinement and null clears the preference."},"maxPriceMinor":{"anyOf":[{"minimum":0,"maximum":1000000000000,"description":"Preferred first-order goods price in destination currency minor units; delivery quoted separately.","type":"integer"},{"type":"null","description":"Explicit null value. Preferred first-order goods price in destination currency minor units, with delivery separate; null clears this advisory preference."}],"description":"Preferred first-order goods price in destination currency minor units, with delivery separate; null clears this advisory preference."},"maxProductCount":{"anyOf":[{"minimum":0,"maximum":9007199254740991,"type":"integer","description":"Preferred distinct new products; there is no system minimum or maximum basket count."},{"type":"null","description":"Explicit null value. Preferred distinct new products; there is no system minimum or maximum basket count."}],"default":null,"description":"Preferred distinct new products; there is no system minimum or maximum basket count."},"productDoses":{"maxItems":100,"uniqueItems":true,"description":"Fix returned products at these daily labelled servings; other products remain optimisable. Administration metadata identifies measurable quantities. [] clears proposals. Revision evaluates without purchasing. Exclusion and physical conflicts return field errors; numerical shopping preferences remain ranking terms.","type":"array","items":{"additionalProperties":false,"type":"object","properties":{"productId":{"pattern":"^prd_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Published product identifier returned by MattaNutra; do not substitute a product name or invent an ID."},"servingsPerDay":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"}},"required":["productId","servingsPerDay"],"description":"Fix returned products at these daily labelled servings; other products remain optimisable. Administration metadata identifies measurable quantities. [] clears proposals. Revision evaluates without purchasing. Exclusion and physical conflicts return field errors; numerical shopping preferences remain ranking terms."}},"omega3SourcePreference":{"type":"string","enum":["any","algae_only","fish_allowed"],"description":"Explicit requested omega-3 source; algae_only excludes fish sources and fish_allowed permits them. Do not infer algae-only from a nutrient name."},"retainProductIds":{"maxItems":100,"uniqueItems":true,"type":"array","items":{"pattern":"^prd_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Catalogue product IDs that must be included among newly selected products."},"description":"Catalogue product IDs that must be included among newly selected products."},"retainSupplementIds":{"maxItems":100,"uniqueItems":true,"type":"array","items":{"pattern":"^sup_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Nutrient-concept IDs that must receive a positive contribution from newly selected products."},"description":"Nutrient-concept IDs that must receive a positive contribution from newly selected products."}}},"scoring":{"additionalProperties":false,"description":"Start with best_match by default and refine weights conversationally; each round returns one recommendation. balanced is an accepted alias for best_match. profile is a scoring preset, not customer demographics. Omitted effective terms default to one. Changing preset resets old overrides, then applies supplied overrides. weights:null clears overrides; {} preserves them. Individual null resets. An empty scoring refinement can retry failed/stale work; otherwise unchanged input is a no-op.","type":"object","properties":{"profile":{"type":"string","enum":["best_match","balanced","best_coverage","fewest_pills","lowest_cost"],"default":"best_match","description":"Scoring preset for dose, price and routine trade-offs. best_match is the default; balanced is its accepted alias."},"weights":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"pills":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Importance of the daily pill-count term; zero ignores this term and null restores its preset value."}],"description":"Importance of the daily pill-count term; zero ignores this term and null restores its preset value."},"products":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Importance of the distinct-product-count term; zero ignores this term and null restores its preset value."}],"description":"Importance of the distinct-product-count term; zero ignores this term and null restores its preset value."},"price":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Cost weight: scoring.weights.price (0 to 2) controls first-order goods cost in THB, delivery excluded. 0 ignores the cost penalty; 1 is normal; 2 doubles it. With requirements.maxPriceMinor, it weights budget-overrun penalties instead. Omission preserves; null resets to the preset."}],"description":"Cost weight: scoring.weights.price (0 to 2) controls first-order goods cost in THB, delivery excluded. 0 ignores the cost penalty; 1 is normal; 2 doubles it. With requirements.maxPriceMinor, it weights budget-overrun penalties instead. Omission preserves; null resets to the preset."},"servings":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Importance of the daily servings term; zero ignores this term and null restores its preset value."}],"description":"Importance of the daily servings term; zero ignores this term and null restores its preset value."},"nutrients":{"description":"Returned or published ingredient IDs only. Omission preserves; individual null resets to the preset.","type":"object","patternProperties":{"^[A-Za-z][A-Za-z0-9_-]{0,127}$":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Returned or published ingredient IDs only. Omission preserves; individual null resets to the preset."}],"description":"Returned or published ingredient IDs only. Omission preserves; individual null resets to the preset."}}}},"description":"Partial scoring-weight overrides. Omission preserves saved values, null clears all overrides, and an individual null resets that term to its preset."},{"type":"null","description":"Explicit null value. Partial scoring-weight overrides. Omission preserves saved values, null clears all overrides, and an individual null resets that term to its preset."}],"description":"Partial scoring-weight overrides. Omission preserves saved values, null clears all overrides, and an individual null resets that term to its preset."}}},"searchEffort":{"type":"string","enum":["standard","expanded"],"default":"standard","description":"Deterministic search budget: standard 8000 expansion attempts; expanded 64000. Expanded includes the standard incumbent. A revise omission preserves prior effort. Repeating identical inputs reuses work; after expanded exhaustion refine the request."},"targets":{"maxItems":100,"type":"array","items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"ingredientId":{"minLength":1,"maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_-]*$","type":"string","description":"Ingredient identifier returned by the plan or published catalogue, used to identify the target being added or refined."},"amount":{"anyOf":[{"minimum":0,"maximum":1000000000000000,"description":"Daily amount required from NEW products only, in the accompanying unit; excludes diet and continued supplements. Zero softly minimises new-product exposure where a comparison scale exists; it is not a categorical exclusion.","type":"number"},{"type":"null","description":"Explicit null value. Explicit daily amount from newly selected products, in the accompanying unit. Zero softly minimises exposure only for ingredients with a reviewed comparison scale; null removes an existing target on refinement."}],"description":"Explicit daily amount from newly selected products, in the accompanying unit. Zero softly minimises exposure only for ingredients with a reviewed comparison scale; null removes an existing target on refinement."},"unit":{"type":"string","enum":["mcg","mg","g","IU","CFU","ml","serving"],"description":"Unit of the accompanying nutrient amount or range. Use a supported unit compatible with that ingredient."},"acceptableRange":{"additionalProperties":false,"type":"object","properties":{"maximum":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"},"minimum":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"},"unit":{"type":"string","enum":["mcg","mg","g","IU","CFU","ml","serving"],"description":"Unit of the accompanying nutrient amount or range. Use a supported unit compatible with that ingredient."}},"required":["maximum","minimum","unit"],"description":"Optional acceptable daily quantity range for this target, expressed in its own accompanying unit."}},"required":["ingredientId"],"description":"Explicit nutrient amounts to match from newly selected products only. Creation needs an amount, unit and name or ingredientId; refinement upserts by ingredientId and preserves omitted values."},{"additionalProperties":false,"type":"object","properties":{"ingredientId":{"minLength":1,"maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_-]*$","type":"string","description":"Ingredient identifier returned by the plan or published catalogue, used to identify the target being added or refined."},"name":{"minLength":1,"maxLength":240,"type":"string","description":"Reported nutrient or supplement name; preserve the customer's intended ingredient and form."},"amount":{"minimum":0,"maximum":1000000000000000,"description":"Daily amount required from NEW products only, in the accompanying unit; excludes diet and continued supplements. Zero softly minimises new-product exposure where a comparison scale exists; it is not a categorical exclusion.","type":"number"},"unit":{"type":"string","enum":["mcg","mg","g","IU","CFU","ml","serving"],"description":"Unit of the accompanying nutrient amount or range. Use a supported unit compatible with that ingredient."},"acceptableRange":{"additionalProperties":false,"type":"object","properties":{"maximum":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"},"minimum":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"},"unit":{"type":"string","enum":["mcg","mg","g","IU","CFU","ml","serving"],"description":"Unit of the accompanying nutrient amount or range. Use a supported unit compatible with that ingredient."}},"required":["maximum","minimum","unit"],"description":"Optional acceptable daily quantity range for this target, expressed in its own accompanying unit."}},"required":["amount","unit"],"anyOf":[{"required":["ingredientId"],"description":"This alternative requires ingredientId."},{"required":["name"],"description":"This alternative requires name."}],"description":"Explicit nutrient amounts to match from newly selected products only. Creation needs an amount, unit and name or ingredientId; refinement upserts by ingredientId and preserves omitted values."}],"description":"Explicit nutrient amounts to match from newly selected products only. Creation needs an amount, unit and name or ingredientId; refinement upserts by ingredientId and preserves omitted values."},"description":"Explicit nutrient amounts to match from newly selected products only. Creation needs an amount, unit and name or ingredientId; refinement upserts by ingredientId and preserves omitted values."},"planHandle":{"minLength":32,"maxLength":4096,"type":"string","description":"Opaque plan capability returned by plan. Pass it unchanged for this guest plan; keep the handle private."},"expectedRevision":{"minimum":1,"type":"integer","description":"Current plan revision returned by plan. A stale revision is rejected; read the plan before making a new change."},"idempotencyKey":{"minLength":16,"maxLength":128,"type":"string","description":"Caller-generated opaque random key for one mutation. For handle-bound retries use the same key and input. A guest create key cannot recover a lost handle: use the returned planHandle to poll, or create with a fresh key if no handle was received."},"clientCapabilities":{"additionalProperties":false,"type":"object","properties":{"productCards":{"type":"boolean","description":"The host can render the returned products as product cards in the customer conversation."},"inlineImages":{"type":"boolean","description":"The host can render product images inline in the customer conversation."},"mcpImageBlocks":{"type":"boolean","description":"The host can render native MCP image content blocks in the customer conversation."}},"description":"Presentation capabilities supported for this call; these do not change matching or save customer preferences."},"matchingReady":{"description":"Host attestation required to create, refine or answer a plan. For a personalised consultation, true only after open conversation covering the applicable questionnaire topics, meaningful goal/symptom follow-ups and the customer's actual confirmation of a personal summary, before formulation and product search. Silence is not confirmation. Resolve material corrections and confirm the updated summary; reuse confirmed context for shopping-only refinements. Include applicable life-stage questions (for women, menopause status and related notes). Respect unknown/declined answers; they are not negative answers or clearance. All answers, coverage and confirmation stay host-side. This flag cannot verify an unseen conversation or establish medical clearance. Omitted/false returns nextAction=gather_context without matching work. Reads/polls need no attestation. Explicit matching-only requests use the customer's supplied targets without a personal-need claim, as explained in client_guide.","type":"boolean"}},"required":["planHandle","expectedRevision","idempotencyKey"],"anyOf":[{"required":["locale"],"description":"This alternative requires locale."},{"required":["destinationCountry"],"description":"This alternative requires destinationCountry."},{"required":["requirements"],"description":"This alternative requires requirements."},{"required":["scoring"],"description":"This alternative requires scoring."},{"required":["searchEffort"],"description":"This alternative requires searchEffort."},{"required":["targets"],"description":"This alternative requires targets."}],"description":"Refine an existing plan with its current revision, a new idempotency key and at least one refinement field."},{"additionalProperties":false,"type":"object","properties":{"planHandle":{"minLength":32,"maxLength":4096,"type":"string","description":"Opaque plan capability returned by plan. Pass it unchanged for this guest plan; keep the handle private."},"expectedRevision":{"minimum":1,"type":"integer","description":"Current plan revision returned by plan. A stale revision is rejected; read the plan before making a new change."},"idempotencyKey":{"minLength":16,"maxLength":128,"type":"string","description":"Caller-generated opaque random key for one mutation. For handle-bound retries use the same key and input. A guest create key cannot recover a lost handle: use the returned planHandle to poll, or create with a fresh key if no handle was received."},"clientCapabilities":{"additionalProperties":false,"type":"object","properties":{"productCards":{"type":"boolean","description":"The host can render the returned products as product cards in the customer conversation."},"inlineImages":{"type":"boolean","description":"The host can render product images inline in the customer conversation."},"mcpImageBlocks":{"type":"boolean","description":"The host can render native MCP image content blocks in the customer conversation."}},"description":"Presentation capabilities supported for this call; these do not change matching or save customer preferences."},"matchingReady":{"description":"Host attestation required to create, refine or answer a plan. For a personalised consultation, true only after open conversation covering the applicable questionnaire topics, meaningful goal/symptom follow-ups and the customer's actual confirmation of a personal summary, before formulation and product search. Silence is not confirmation. Resolve material corrections and confirm the updated summary; reuse confirmed context for shopping-only refinements. Include applicable life-stage questions (for women, menopause status and related notes). Respect unknown/declined answers; they are not negative answers or clearance. All answers, coverage and confirmation stay host-side. This flag cannot verify an unseen conversation or establish medical clearance. Omitted/false returns nextAction=gather_context without matching work. Reads/polls need no attestation. Explicit matching-only requests use the customer's supplied targets without a personal-need claim, as explained in client_guide.","type":"boolean"},"answers":{"maxItems":50,"uniqueItems":true,"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"choice":{"minLength":1,"maxLength":240,"type":"string","description":"Answer value corresponding to the customer's choice for the returned plan question."},"questionId":{"minLength":1,"maxLength":128,"type":"string","description":"Identifier of a catalogue or shopping clarification actually returned by plan."}},"required":["choice","questionId"],"description":"Answers to current plan questions. Submit answers separately from target or scoring refinements."},"minItems":1,"description":"Answers to current plan questions. Submit answers separately from target or scoring refinements."}},"required":["planHandle","expectedRevision","idempotencyKey","answers"],"description":"Answer questions returned by an existing plan using its current revision and a new idempotency key."}],"type":"object","properties":{"locale":{"minLength":2,"maxLength":35,"description":"BCP 47 locale; supported locales are advertised by info. Unsupported locales fall back to English.","type":"string"},"destinationCountry":{"pattern":"^[A-Z]{2}$","description":"Deliverable ISO country from info.supportedCountries.","type":"string"},"requirements":{"additionalProperties":false,"description":"Product-matching constraints and preferences only. Numerical values are advisory preferences for ranking, never purchase limits. Omission preserves; null clears. Zero remains advisory. Unknown product quantities remain unknown.","type":"object","properties":{"allowedForms":{"uniqueItems":true,"maxItems":8,"type":"array","items":{"type":"string","enum":["capsule","softgel","tablet","powder","liquid","gummy","sachet","other"],"description":"Acceptable product dosage forms. Select only forms the customer has agreed to use."},"description":"Acceptable product dosage forms. Select only forms the customer has agreed to use."},"dietaryPreference":{"type":"string","enum":["any","plant_based","vegan"],"description":"Requested dietary eligibility: any, plant-based or vegan products."},"excludeProductIds":{"maxItems":100,"uniqueItems":true,"type":"array","items":{"pattern":"^prd_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Exclude only these products. Does not remove requested nutrients. [] clears this exclusion."},"description":"Exclude only these products. Does not remove requested nutrients. [] clears this exclusion."},"excludeSupplementIds":{"maxItems":100,"uniqueItems":true,"type":"array","items":{"pattern":"^sup_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Exclude products containing these nutrient concepts, not particular product IDs. [] clears this exclusion."},"description":"Exclude products containing these nutrient concepts, not particular product IDs. [] clears this exclusion."},"maxDailyPills":{"anyOf":[{"minimum":0,"maximum":1000,"description":"Preferred daily pill count; unknown counts remain unknown.","type":"number"},{"type":"null","description":"Explicit null value. Preferred daily pill count, used for ranking rather than as a purchase limit. Omission preserves on refinement and null clears the preference."}],"description":"Preferred daily pill count, used for ranking rather than as a purchase limit. Omission preserves on refinement and null clears the preference."},"maxPriceMinor":{"anyOf":[{"minimum":0,"maximum":1000000000000,"description":"Preferred first-order goods price in destination currency minor units; delivery quoted separately.","type":"integer"},{"type":"null","description":"Explicit null value. Preferred first-order goods price in destination currency minor units, with delivery separate; null clears this advisory preference."}],"description":"Preferred first-order goods price in destination currency minor units, with delivery separate; null clears this advisory preference."},"maxProductCount":{"anyOf":[{"minimum":0,"maximum":9007199254740991,"type":"integer","description":"Preferred distinct new products; there is no system minimum or maximum basket count."},{"type":"null","description":"Explicit null value. Preferred distinct new products; there is no system minimum or maximum basket count."}],"default":null,"description":"Preferred distinct new products; there is no system minimum or maximum basket count."},"productDoses":{"maxItems":100,"uniqueItems":true,"description":"Fix returned products at these daily labelled servings; other products remain optimisable. Administration metadata identifies measurable quantities. [] clears proposals. Revision evaluates without purchasing. Exclusion and physical conflicts return field errors; numerical shopping preferences remain ranking terms.","type":"array","items":{"additionalProperties":false,"type":"object","properties":{"productId":{"pattern":"^prd_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Published product identifier returned by MattaNutra; do not substitute a product name or invent an ID."},"servingsPerDay":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"}},"required":["productId","servingsPerDay"],"description":"Fix returned products at these daily labelled servings; other products remain optimisable. Administration metadata identifies measurable quantities. [] clears proposals. Revision evaluates without purchasing. Exclusion and physical conflicts return field errors; numerical shopping preferences remain ranking terms."}},"omega3SourcePreference":{"type":"string","enum":["any","algae_only","fish_allowed"],"description":"Explicit requested omega-3 source; algae_only excludes fish sources and fish_allowed permits them. Do not infer algae-only from a nutrient name."},"retainProductIds":{"maxItems":100,"uniqueItems":true,"type":"array","items":{"pattern":"^prd_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Catalogue product IDs that must be included among newly selected products."},"description":"Catalogue product IDs that must be included among newly selected products."},"retainSupplementIds":{"maxItems":100,"uniqueItems":true,"type":"array","items":{"pattern":"^sup_[A-Za-z0-9_-]+$","maxLength":128,"type":"string","description":"Nutrient-concept IDs that must receive a positive contribution from newly selected products."},"description":"Nutrient-concept IDs that must receive a positive contribution from newly selected products."}}},"scoring":{"additionalProperties":false,"description":"Start with best_match by default and refine weights conversationally; each round returns one recommendation. balanced is an accepted alias for best_match. profile is a scoring preset, not customer demographics. Omitted effective terms default to one. Changing preset resets old overrides, then applies supplied overrides. weights:null clears overrides; {} preserves them. Individual null resets. An empty scoring refinement can retry failed/stale work; otherwise unchanged input is a no-op.","type":"object","properties":{"profile":{"type":"string","enum":["best_match","balanced","best_coverage","fewest_pills","lowest_cost"],"default":"best_match","description":"Scoring preset for dose, price and routine trade-offs. best_match is the default; balanced is its accepted alias."},"weights":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"pills":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Importance of the daily pill-count term; zero ignores this term and null restores its preset value."}],"description":"Importance of the daily pill-count term; zero ignores this term and null restores its preset value."},"products":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Importance of the distinct-product-count term; zero ignores this term and null restores its preset value."}],"description":"Importance of the distinct-product-count term; zero ignores this term and null restores its preset value."},"price":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Cost weight: scoring.weights.price (0 to 2) controls first-order goods cost in THB, delivery excluded. 0 ignores the cost penalty; 1 is normal; 2 doubles it. With requirements.maxPriceMinor, it weights budget-overrun penalties instead. Omission preserves; null resets to the preset."}],"description":"Cost weight: scoring.weights.price (0 to 2) controls first-order goods cost in THB, delivery excluded. 0 ignores the cost penalty; 1 is normal; 2 doubles it. With requirements.maxPriceMinor, it weights budget-overrun penalties instead. Omission preserves; null resets to the preset."},"servings":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Importance of the daily servings term; zero ignores this term and null restores its preset value."}],"description":"Importance of the daily servings term; zero ignores this term and null restores its preset value."},"nutrients":{"description":"Returned or published ingredient IDs only. Omission preserves; individual null resets to the preset.","type":"object","patternProperties":{"^[A-Za-z][A-Za-z0-9_-]{0,127}$":{"anyOf":[{"minimum":0,"maximum":2,"multipleOf":0.000001,"description":"Targets and preferences describe the desired outcome. Weights describe its importance when comparing possible routines. Weights accept decimals from 0 to 2: zero removes that ranking component, one applies the normal penalty, and two doubles it. Changing a weight never changes the agreed target amount. Numerical preferences remain advisory. Weights do not establish medical suitability or total daily exposure. Up to six decimal places.","type":"number"},{"type":"null","description":"Explicit null value. Returned or published ingredient IDs only. Omission preserves; individual null resets to the preset."}],"description":"Returned or published ingredient IDs only. Omission preserves; individual null resets to the preset."}}}},"description":"Partial scoring-weight overrides. Omission preserves saved values, null clears all overrides, and an individual null resets that term to its preset."},{"type":"null","description":"Explicit null value. Partial scoring-weight overrides. Omission preserves saved values, null clears all overrides, and an individual null resets that term to its preset."}],"description":"Partial scoring-weight overrides. Omission preserves saved values, null clears all overrides, and an individual null resets that term to its preset."}}},"searchEffort":{"type":"string","enum":["standard","expanded"],"default":"standard","description":"Deterministic search budget: standard 8000 expansion attempts; expanded 64000. Expanded includes the standard incumbent. A revise omission preserves prior effort. Repeating identical inputs reuses work; after expanded exhaustion refine the request."},"clientCapabilities":{"additionalProperties":false,"type":"object","properties":{"productCards":{"type":"boolean","description":"The host can render the returned products as product cards in the customer conversation."},"inlineImages":{"type":"boolean","description":"The host can render product images inline in the customer conversation."},"mcpImageBlocks":{"type":"boolean","description":"The host can render native MCP image content blocks in the customer conversation."}},"description":"Presentation capabilities supported for this call; these do not change matching or save customer preferences."},"matchingReady":{"description":"Host attestation required to create, refine or answer a plan. For a personalised consultation, true only after open conversation covering the applicable questionnaire topics, meaningful goal/symptom follow-ups and the customer's actual confirmation of a personal summary, before formulation and product search. Silence is not confirmation. Resolve material corrections and confirm the updated summary; reuse confirmed context for shopping-only refinements. Include applicable life-stage questions (for women, menopause status and related notes). Respect unknown/declined answers; they are not negative answers or clearance. All answers, coverage and confirmation stay host-side. This flag cannot verify an unseen conversation or establish medical clearance. Omitted/false returns nextAction=gather_context without matching work. Reads/polls need no attestation. Explicit matching-only requests use the customer's supplied targets without a personal-need claim, as explained in client_guide.","type":"boolean"},"targets":{"anyOf":[{"minItems":1,"maxItems":30,"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"ingredientId":{"minLength":1,"maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_-]*$","type":"string","description":"Ingredient identifier returned by the plan or published catalogue, used to identify the target being added or refined."},"name":{"minLength":1,"maxLength":240,"type":"string","description":"Reported nutrient or supplement name; preserve the customer's intended ingredient and form."},"amount":{"minimum":0,"maximum":1000000000000000,"description":"Daily amount required from NEW products only, in the accompanying unit; excludes diet and continued supplements. Zero softly minimises new-product exposure where a comparison scale exists; it is not a categorical exclusion.","type":"number"},"unit":{"type":"string","enum":["mcg","mg","g","IU","CFU","ml","serving"],"description":"Unit of the accompanying nutrient amount or range. Use a supported unit compatible with that ingredient."},"acceptableRange":{"additionalProperties":false,"type":"object","properties":{"maximum":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"},"minimum":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"},"unit":{"type":"string","enum":["mcg","mg","g","IU","CFU","ml","serving"],"description":"Unit of the accompanying nutrient amount or range. Use a supported unit compatible with that ingredient."}},"required":["maximum","minimum","unit"],"description":"Optional acceptable daily quantity range for this target, expressed in its own accompanying unit."}},"required":["amount","unit"],"anyOf":[{"required":["ingredientId"],"description":"This alternative requires ingredientId."},{"required":["name"],"description":"This alternative requires name."}],"description":"Explicit nutrient amounts to match from newly selected products only. Creation needs an amount, unit and name or ingredientId; refinement upserts by ingredientId and preserves omitted values."},"description":"Explicit nutrient amounts to match from newly selected products only. Creation needs an amount, unit and name or ingredientId; refinement upserts by ingredientId and preserves omitted values."},{"maxItems":100,"type":"array","items":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"ingredientId":{"minLength":1,"maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_-]*$","type":"string","description":"Ingredient identifier returned by the plan or published catalogue, used to identify the target being added or refined."},"amount":{"anyOf":[{"minimum":0,"maximum":1000000000000000,"description":"Daily amount required from NEW products only, in the accompanying unit; excludes diet and continued supplements. Zero softly minimises new-product exposure where a comparison scale exists; it is not a categorical exclusion.","type":"number"},{"type":"null","description":"Explicit null value. Explicit daily amount from newly selected products, in the accompanying unit. Zero softly minimises exposure only for ingredients with a reviewed comparison scale; null removes an existing target on refinement."}],"description":"Explicit daily amount from newly selected products, in the accompanying unit. Zero softly minimises exposure only for ingredients with a reviewed comparison scale; null removes an existing target on refinement."},"unit":{"type":"string","enum":["mcg","mg","g","IU","CFU","ml","serving"],"description":"Unit of the accompanying nutrient amount or range. Use a supported unit compatible with that ingredient."},"acceptableRange":{"additionalProperties":false,"type":"object","properties":{"maximum":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"},"minimum":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"},"unit":{"type":"string","enum":["mcg","mg","g","IU","CFU","ml","serving"],"description":"Unit of the accompanying nutrient amount or range. Use a supported unit compatible with that ingredient."}},"required":["maximum","minimum","unit"],"description":"Optional acceptable daily quantity range for this target, expressed in its own accompanying unit."}},"required":["ingredientId"],"description":"Explicit nutrient amounts to match from newly selected products only. Creation needs an amount, unit and name or ingredientId; refinement upserts by ingredientId and preserves omitted values."},{"additionalProperties":false,"type":"object","properties":{"ingredientId":{"minLength":1,"maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_-]*$","type":"string","description":"Ingredient identifier returned by the plan or published catalogue, used to identify the target being added or refined."},"name":{"minLength":1,"maxLength":240,"type":"string","description":"Reported nutrient or supplement name; preserve the customer's intended ingredient and form."},"amount":{"minimum":0,"maximum":1000000000000000,"description":"Daily amount required from NEW products only, in the accompanying unit; excludes diet and continued supplements. Zero softly minimises new-product exposure where a comparison scale exists; it is not a categorical exclusion.","type":"number"},"unit":{"type":"string","enum":["mcg","mg","g","IU","CFU","ml","serving"],"description":"Unit of the accompanying nutrient amount or range. Use a supported unit compatible with that ingredient."},"acceptableRange":{"additionalProperties":false,"type":"object","properties":{"maximum":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"},"minimum":{"exclusiveMinimum":0,"maximum":1000000000000000,"description":"Positive quantity in this field’s stated units. Nutrient quantities also use the documented dose precision.","type":"number"},"unit":{"type":"string","enum":["mcg","mg","g","IU","CFU","ml","serving"],"description":"Unit of the accompanying nutrient amount or range. Use a supported unit compatible with that ingredient."}},"required":["maximum","minimum","unit"],"description":"Optional acceptable daily quantity range for this target, expressed in its own accompanying unit."}},"required":["amount","unit"],"anyOf":[{"required":["ingredientId"],"description":"This alternative requires ingredientId."},{"required":["name"],"description":"This alternative requires name."}],"description":"Explicit nutrient amounts to match from newly selected products only. Creation needs an amount, unit and name or ingredientId; refinement upserts by ingredientId and preserves omitted values."}],"description":"Explicit nutrient amounts to match from newly selected products only. Creation needs an amount, unit and name or ingredientId; refinement upserts by ingredientId and preserves omitted values."},"description":"Explicit nutrient amounts to match from newly selected products only. Creation needs an amount, unit and name or ingredientId; refinement upserts by ingredientId and preserves omitted values."}],"description":"Explicit nutrient amounts to match from newly selected products only. Creation needs an amount, unit and name or ingredientId; refinement upserts by ingredientId and preserves omitted values."},"idempotencyKey":{"minLength":16,"maxLength":128,"type":"string","description":"Caller-generated opaque random key for one mutation. For handle-bound retries use the same key and input. A guest create key cannot recover a lost handle: use the returned planHandle to poll, or create with a fresh key if no handle was received."},"planHandle":{"minLength":32,"maxLength":4096,"type":"string","description":"Opaque plan capability returned by plan. Pass it unchanged for this guest plan; keep the handle private."},"expectedRevision":{"minimum":1,"type":"integer","description":"Current plan revision returned by plan. A stale revision is rejected; read the plan before making a new change."},"answers":{"maxItems":50,"uniqueItems":true,"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"choice":{"minLength":1,"maxLength":240,"type":"string","description":"Answer value corresponding to the customer's choice for the returned plan question."},"questionId":{"minLength":1,"maxLength":128,"type":"string","description":"Identifier of a catalogue or shopping clarification actually returned by plan."}},"required":["choice","questionId"],"description":"Answers to current plan questions. Submit answers separately from target or scoring refinements."},"minItems":1,"description":"Answers to current plan questions. Submit answers separately from target or scoring refinements."}},"required":[],"additionalProperties":false,"description":"Create, read, refine or answer catalogue clarifications for the guest's product-matching plan. These calls never order or charge."},"outputSchema":{"type":"object","anyOf":[{"additionalProperties":false,"type":"object","properties":{"ok":{"const":true,"type":"boolean"},"planHandle":{"minLength":1,"type":"string"},"revision":{"minimum":1,"type":"integer"},"summary":{"type":"string"},"stage":{"const":"matching","type":"string"},"status":{"const":"processing","type":"string"},"nextAction":{"const":"poll_plan","type":"string"},"pollAfterSeconds":{"exclusiveMinimum":0,"type":"number"},"targetBasis":{"$ref":"#/$defs/s1"}},"required":["ok","planHandle","revision","summary","status","nextAction","pollAfterSeconds","targetBasis"]},{"additionalProperties":false,"type":"object","properties":{"ok":{"const":true,"type":"boolean"},"planHandle":{"minLength":1,"type":"string"},"revision":{"minimum":1,"type":"integer"},"summary":{"type":"string"},"stage":{"const":"matching","type":"string"},"status":{"const":"failed","type":"string"},"nextAction":{"const":"change_request","type":"string"},"targetBasis":{"$ref":"#/$defs/s1"}},"required":["ok","planHandle","revision","summary","status","nextAction","targetBasis"]},{"additionalProperties":false,"type":"object","properties":{"ok":{"const":true,"type":"boolean"},"planHandle":{"minLength":1,"type":"string"},"revision":{"minimum":1,"type":"integer"},"summary":{"type":"string"},"stage":{"const":"matching","type":"string"},"status":{"type":"string","enum":["ready","needs_input","no_purchase"]},"currency":{"type":"string"},"scoring":{"additionalProperties":false,"type":"object","properties":{"profile":{"type":"string","enum":["best_match","best_coverage","fewest_pills","lowest_cost"]},"weights":{"additionalProperties":false,"type":"object","properties":{"pills":{"minimum":0,"maximum":2,"type":"number"},"products":{"minimum":0,"maximum":2,"type":"number"},"price":{"minimum":0,"maximum":2,"type":"number"},"servings":{"minimum":0,"maximum":2,"type":"number"},"nutrients":{"type":"object","patternProperties":{"^(.*)$":{"minimum":0,"maximum":2,"type":"number"}}}}}},"required":["profile","weights"]},"requestIssues":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"fieldPath":{"type":"string"},"itemId":{"type":"string"},"code":{"type":"string","enum":["not_selected","unavailable","not_on_list","not_allowed","unknown"]},"message":{"maxLength":240,"type":"string"}},"required":["fieldPath","code","message"]}},"choices":{"maxItems":1,"description":"The current product match with all requested and incidental ingredient facts, quantities and recorded media. Empty only when no targets remain. Refinement returns the next match.","type":"array","items":{"additionalProperties":false,"type":"object","properties":{"roles":{"type":"array","items":{"type":"string"}},"summary":{"additionalProperties":false,"type":"object","properties":{"text":{"type":"string"},"pillCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"pillCountAtLeast":{"type":"number"},"productCount":{"minimum":0,"type":"integer"},"goodsPrice":{"$ref":"#/$defs/s0"},"goodsPriceAtLeast":{"$ref":"#/$defs/s2"},"coveragePercent":{"anyOf":[{"minimum":0,"maximum":100,"type":"number"},{"type":"null"}],"description":"Mean capped fraction of requested daily quantities supplied by new products, weighted equally per requested ingredient. Null if any requested contribution is unknown."},"coverageAtLeastPercent":{"minimum":0,"maximum":100,"description":"Conservative coverage lower bound from verified new-product quantities when exact coverage is unknown.","type":"number"},"ingredientDataComplete":{"type":"boolean"},"deliveryPrice":{"$ref":"#/$defs/s0"}},"required":["text","pillCount","productCount","goodsPrice","coveragePercent","ingredientDataComplete"]},"ingredients":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"ingredientId":{"minLength":1,"type":"string"},"name":{"type":"string"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetBasis":{"$ref":"#/$defs/s1"},"requested":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"description":"Customer-requested daily amount from new products; null identifies an incidental ingredient."},"supplied":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"description":"Verified daily contribution from the returned new products, in unit; null when any relevant contribution is unknown."},"suppliedAtLeast":{"minimum":0,"description":"Verified lower bound from new products when supplied is unknown; not an estimate of total intake.","type":"number"},"gap":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"description":"max(0, requested - supplied), or null for incidental ingredients or unknown supplied quantity."},"excess":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"description":"max(0, supplied - requested), or null for incidental ingredients or unknown supplied quantity. This is arithmetic, not a safety limit."},"availability":{"type":"string","enum":["supplied","not_selected","unavailable","not_on_list","not_allowed","unknown"]},"productIds":{"type":"array","items":{"minLength":1,"type":"string"}}},"required":["ingredientId","name","unit","targetBasis","requested","supplied","gap","excess","productIds"]}},"products":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"productId":{"minLength":1,"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Recorded product image URL (absolute HTTPS), or null when unavailable. Preserve the association with this product; never infer a replacement."},"productUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPrice":{"$ref":"#/$defs/s0"},"lineTotal":{"$ref":"#/$defs/s0"},"servingsPerDay":{"type":"number"},"dailyQuantity":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"amount":{"type":"number"},"unit":{"type":"string"}},"required":["amount","unit"]},{"type":"null"}]},"supplyDays":{"anyOf":[{"type":"number"},{"type":"null"}]},"primaryImage":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"productId":{"minLength":1,"type":"string"},"url":{"description":"Durable public first-party HTTPS asset for this product. Render it in the customer conversation; a link alone does not satisfy image display.","type":"string"},"mimeType":{"anyOf":[{"description":"Decoded original media type; null when not verified. Never inferred from the filename.","type":"string"},{"type":"null"}]},"altText":{"type":"string"},"width":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"height":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"displayOrder":{"minimum":0,"type":"integer"}},"required":["productId","url","mimeType","altText","width","height","displayOrder"]},{"type":"null"}]},"media":{"additionalProperties":false,"type":"object","properties":{"status":{"anyOf":[{"const":"ready","type":"string"},{"const":"unavailable","type":"string"},{"const":"unverified","type":"string"}]},"reason":{"anyOf":[{"const":"missing_image","type":"string"},{"const":"not_durable_first_party","type":"string"},{"const":"not_verified","type":"string"},{"const":"fetch_failed","type":"string"},{"const":"invalid_image","type":"string"},{"const":"response_limit","type":"string"},{"const":"ready","type":"string"}]},"displayVerification":{"description":"The server cannot verify customer-chat rendering. Native image blocks and URLs are delivery, not visual certification.","const":"unverified","type":"string"}},"required":["status","reason","displayVerification"]}},"required":["productId","name","imageUrl","productUrl","quantity","unitPrice","lineTotal","servingsPerDay","dailyQuantity","supplyDays"]}}},"required":["roles","summary","ingredients","products"]}},"mediaPresentation":{"additionalProperties":false,"type":"object","properties":{"required":{"const":true,"type":"boolean"},"status":{"anyOf":[{"const":"media_ready","type":"string"},{"const":"unmet_host","type":"string"},{"const":"unmet_media","type":"string"},{"const":"unverified","type":"string"}]},"displayVerification":{"const":"unverified","type":"string"},"renderUsing":{"anyOf":[{"const":"product_cards","type":"string"},{"const":"inline_images","type":"string"},{"const":"mcp_image_blocks","type":"string"},{"const":"unknown","type":"string"},{"const":"unsupported","type":"string"}]},"productCount":{"minimum":0,"type":"integer"},"readyCount":{"minimum":0,"type":"integer"},"instructions":{"type":"string"}},"required":["required","status","displayVerification","renderUsing","productCount","readyCount","instructions"]},"nextAction":{"type":"string","enum":["execute","answer_questions","change_request","no_purchase"]},"questions":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"questionId":{"minLength":1,"type":"string"},"prompt":{"type":"string"},"choices":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"choice":{"type":"string"},"label":{"type":"string"}},"required":["choice","label"]}}},"required":["questionId","prompt","choices"]}},"refreshRequired":{"type":"boolean"},"checkoutNotice":{"description":"Explain goods subtotal, unknown delivery/other charges and the merchant checkout payment boundary before asking to proceed.","type":"string"},"targetBasis":{"$ref":"#/$defs/s1"},"comparisonNotice":{"description":"States the new-product comparison scope and absence of a personal intake or safety assessment.","type":"string"}},"required":["ok","planHandle","revision","summary","status","scoring","choices","nextAction","targetBasis","comparisonNotice"]},{"additionalProperties":false,"type":"object","properties":{"ok":{"const":false,"type":"boolean"},"error":{"additionalProperties":false,"type":"object","properties":{"category":{"type":"string","enum":["INVALID_ARGUMENT","FAILED_PRECONDITION","NOT_FOUND","ABORTED","RESOURCE_EXHAUSTED","UNAVAILABLE"]},"correlationId":{"type":"string"},"currentRevision":{"type":"integer"},"errorCode":{"type":"string"},"error_code":{"type":"string"},"fieldPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"issues":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"fieldPath":{"type":"string"},"messageKey":{"type":"string"},"reasonCode":{"type":"string"},"message":{"type":"string"},"permittedLimit":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}]}}]},"actual":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["fieldPath","messageKey","reasonCode"]}},"message":{"type":"string"},"messageKey":{"type":"string"},"nextAction":{"type":"string"},"nextActions":{"type":"array","items":{"type":"string"}},"reasonCode":{"type":"string","enum":["positive_number_required","duplicate_supplement","unsupported_unit","legacy_id","unknown_supplement","required","unsupported_country","unsupported_currency","unreferenced_claim","unexpected_property","wrong_purpose","revision_conflict","idempotency_conflict","not_found","open_query","plan_not_ready","availability_changed","checkout_expired","rate_limited","temporarily_unavailable","SERVICE_DEADLINE_EXCEEDED","consent_required","stale_safety_acknowledgement","stale_revision","invalid_request","contract_refresh_required","incompatible_identity","request_too_broad","too_short","unsafe_content"]},"requestedRevision":{"type":"integer"},"retryable":{"type":"boolean"}},"required":["category","errorCode","error_code","fieldPath","message","messageKey","reasonCode","retryable"]}},"required":["ok","error"]}],"$defs":{"s1":{"description":"Requested daily quantities and coverage concern only the newly matched products. No existing intake, total exposure, personal need or safety assessment is included.","const":"new_products","type":"string"},"s2":{"minimum":0,"description":"Major currency units; exact minor-unit money is rounded only for presentation.","type":"number"},"s0":{"anyOf":[{"$ref":"#/$defs/s2"},{"type":"null"}]}}},"securitySchemes":[{"type":"noauth"}],"_meta":{"securitySchemes":[{"type":"noauth"}]},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"name":"plan","responsibilityVersion":"responsibility-4.0.0"},{"title":"Open checkout","description":"Create or recover an unpaid checkout for the agreed current basket. Creates or recovers an unpaid checkout for the customer's agreed current plan revision, using planHandle, expectedRevision and an idempotencyKey. It never charges or rematches. Delivery and the final payable amount are confirmed separately on the merchant checkout. A lost response can be recovered with the same key and identical input.","inputSchema":{"additionalProperties":false,"type":"object","properties":{"planHandle":{"minLength":32,"maxLength":4096,"type":"string","description":"Opaque plan capability returned by plan. Pass it unchanged for this guest plan; keep the handle private."},"expectedRevision":{"minimum":1,"type":"integer","description":"Current plan revision returned by plan. A stale revision is rejected; read the plan before making a new change."},"idempotencyKey":{"minLength":16,"maxLength":128,"type":"string","description":"Caller-generated opaque random key for one mutation. For handle-bound retries use the same key and input. A guest create key cannot recover a lost handle: use the returned planHandle to poll, or create with a fresh key if no handle was received."}},"required":["planHandle","expectedRevision","idempotencyKey"],"description":"Create or recover an unpaid merchant checkout for the current agreed plan revision. The customer confirms payment separately."},"outputSchema":{"type":"object","anyOf":[{"additionalProperties":false,"type":"object","properties":{"ok":{"const":true,"type":"boolean"},"stage":{"const":"checkout","type":"string"},"summary":{"type":"string"},"paymentConfirmation":{"const":"merchant_checkout_final_total","type":"string"},"checkoutExpiresAt":{"type":"string"},"checkoutUrl":{"type":"string"},"feedbackInvitation":{"additionalProperties":false,"type":"object","properties":{"prompt":{"type":"string"},"promptKey":{"type":"string"}},"required":["prompt","promptKey"]},"frozenPlan":{"additionalProperties":false,"type":"object","properties":{"contribution":{"additionalProperties":false,"type":"object","properties":{"acquisitionMinor":{"$ref":"#/$defs/s1"},"attribution":{"type":"string"},"currency":{"type":"string"},"paymentFeeMinor":{"$ref":"#/$defs/s1"},"paymentMinor":{"$ref":"#/$defs/s1"},"productCostMinor":{"$ref":"#/$defs/s1"},"shippingSubsidyMinor":{"$ref":"#/$defs/s1"}},"required":["acquisitionMinor","attribution","currency","paymentFeeMinor","paymentMinor","productCostMinor","shippingSubsidyMinor"]},"catalogueVersion":{"type":"string"},"channel":{"type":"string","enum":["agentic","web"]},"countryCode":{"type":"string"},"currency":{"type":"string"},"dailyPills":{"anyOf":[{"type":"number"},{"type":"null"}]},"items":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"currency":{"type":"string"},"dailyPills":{"anyOf":[{"type":"number"},{"type":"null"}]},"pillCountKnown":{"type":"boolean"},"administration":{"anyOf":[{"additionalProperties":false,"description":"Physical administration evidence: unitsPerServing and packQuantity use physicalUnit; doseIncrement is the smallest measurable quantity in that unit. Null means unknown, never an inferred capsule or pack size. Servings per day multiply these labelled serving quantities; instructions and health reference limits remain advice.","type":"object","properties":{"route":{"type":"string","enum":["oral","topical","other","unknown"]},"physicalUnit":{"type":"string","enum":["capsule","tablet","softgel","gummy","drop","ml","g","scoop","sachet","other","unknown"]},"unitsPerServing":{"anyOf":[{"type":"number"},{"type":"null"}]},"doseIncrement":{"anyOf":[{"type":"number"},{"type":"null"}]},"packQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"provenance":{"additionalProperties":false,"type":"object","properties":{"status":{"type":"string","enum":["verified","unverified","conflicting"]},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceText":{"anyOf":[{"type":"string"},{"type":"null"}]},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","sourceUrl","sourceText","verifiedAt"]}},"required":["route","physicalUnit","unitsPerServing","doseIncrement","packQuantity","provenance"]},{"type":"null"}]},"labelledFacts":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"supplementId":{"type":"string"},"name":{"type":"string"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"confidence":{"type":"string","enum":["high","moderate","low"]},"mappingStatus":{"type":"string","enum":["verified","unverified","conflicting"]},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceText":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","amount","unit","confidence","mappingStatus","sourceUrl","sourceText"]}},"form":{"type":"string"},"lineTotalMinor":{"$ref":"#/$defs/s1"},"pillsPerServing":{"anyOf":[{"type":"number"},{"type":"null"}]},"productId":{"type":"string"},"productName":{"type":"string"},"quantity":{"type":"number"},"servingsPerDay":{"type":"number"},"unitPriceMinor":{"$ref":"#/$defs/s1"},"selectionReason":{"additionalProperties":false,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"messageKey":{"type":"string"},"requestedSupplementIds":{"type":"array","items":{"type":"string"}},"requestedNames":{"type":"array","items":{"type":"string"}}},"required":["code","message","messageKey","requestedSupplementIds"]},"daysOfSupply":{"anyOf":[{"type":"number"},{"type":"null"}]},"servingsPerPack":{"anyOf":[{"type":"number"},{"type":"null"}]},"availableServings":{"anyOf":[{"type":"number"},{"type":"null"}]},"leftoverServings30":{"anyOf":[{"type":"number"},{"type":"null"}]},"leftoverServings90":{"anyOf":[{"type":"number"},{"type":"null"}]},"replenishmentDay":{"anyOf":[{"type":"number"},{"type":"null"}]},"requestedNutrientNames":{"type":"array","items":{"type":"string"}},"requestedNutrients":{"$ref":"#/$defs/s2"},"incidentalNutrientNames":{"type":"array","items":{"type":"string"}},"incidentalNutrients":{"$ref":"#/$defs/s2"},"incidentalOmittedCount":{"type":"integer"},"imageUrl":{"type":"string"},"fixture":{"type":"boolean"},"source":{"type":"string","enum":["fixture","retail"]}},"required":["currency","dailyPills","form","lineTotalMinor","pillsPerServing","productId","productName","quantity","servingsPerDay","unitPriceMinor"]}},"market":{"additionalProperties":false,"type":"object","properties":{"retailerId":{"type":"string"},"retailerName":{"type":"string"},"countryCode":{"type":"string"},"countryName":{"type":"string"},"currency":{"type":"string"},"country":{"type":"string"}}},"planRevision":{"type":"integer"},"shippingMinor":{"$ref":"#/$defs/s1"},"subtotalMinor":{"$ref":"#/$defs/s1"},"taxMinor":{"$ref":"#/$defs/s1"},"totalPriceMinor":{"$ref":"#/$defs/s1"},"snapshotId":{"type":"string"},"targetBasis":{"description":"This checkout contains the newly selected products. Detailed requested-versus-supplied quantities are in the reviewed plan, not the internal checkout coverage score.","const":"new_products","type":"string"}},"required":["items","targetBasis"]},"orderHandle":{"type":"string"},"orderReference":{"type":"string"},"orderStatus":{"type":"string","enum":["cancelled","completed","expired","open"]},"paymentStatus":{"type":"string","enum":["paid","partially_refunded","processing","refunded","unpaid"]},"pollAfterSeconds":{"type":"number"},"responsibility":{"additionalProperties":false,"type":"object","properties":{"version":{"type":"string"},"domains":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"domain":{"type":"string","enum":["guidance","payment","fulfilment","support"]},"semanticId":{"type":"string"},"text":{"type":"string"}},"required":["domain","semanticId","text"]}}},"required":["version","domains"]},"responsibilityVersion":{"type":"string"},"stateVersion":{"type":"integer"},"successUrl":{"type":"string"}},"required":["ok","checkoutExpiresAt","checkoutUrl","feedbackInvitation","frozenPlan","orderHandle","orderReference","orderStatus","paymentStatus","pollAfterSeconds","responsibility","responsibilityVersion","stateVersion"]},{"additionalProperties":false,"type":"object","properties":{"ok":{"const":false,"type":"boolean"},"error":{"additionalProperties":false,"type":"object","properties":{"category":{"type":"string","enum":["INVALID_ARGUMENT","FAILED_PRECONDITION","NOT_FOUND","ABORTED","RESOURCE_EXHAUSTED","UNAVAILABLE"]},"correlationId":{"type":"string"},"currentRevision":{"type":"integer"},"errorCode":{"type":"string"},"error_code":{"type":"string"},"fieldPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"issues":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"fieldPath":{"type":"string"},"messageKey":{"type":"string"},"reasonCode":{"type":"string"},"message":{"type":"string"},"permittedLimit":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}]}}]},"actual":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["fieldPath","messageKey","reasonCode"]}},"message":{"type":"string"},"messageKey":{"type":"string"},"nextAction":{"type":"string"},"nextActions":{"type":"array","items":{"type":"string"}},"reasonCode":{"type":"string","enum":["positive_number_required","duplicate_supplement","unsupported_unit","legacy_id","unknown_supplement","required","unsupported_country","unsupported_currency","unreferenced_claim","unexpected_property","wrong_purpose","revision_conflict","idempotency_conflict","not_found","open_query","plan_not_ready","availability_changed","checkout_expired","rate_limited","temporarily_unavailable","SERVICE_DEADLINE_EXCEEDED","consent_required","stale_safety_acknowledgement","stale_revision","invalid_request","contract_refresh_required","incompatible_identity","request_too_broad","too_short","unsafe_content"]},"requestedRevision":{"type":"integer"},"retryable":{"type":"boolean"}},"required":["category","errorCode","error_code","fieldPath","message","messageKey","reasonCode","retryable"]}},"required":["ok","error"]}],"$defs":{"s1":{"description":"Amount in the stated currency's minor units; unavailable values are null or absent, never fabricated zero.","type":"integer"},"s0":{"additionalProperties":false,"type":"object","properties":{"amount":{"type":"number"},"name":{"type":"string"},"unit":{"type":"string"}},"required":["amount","name","unit"]},"s2":{"type":"array","items":{"$ref":"#/$defs/s0"}}}},"securitySchemes":[{"type":"noauth"}],"_meta":{"securitySchemes":[{"type":"noauth"}]},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"name":"execute","responsibilityVersion":"responsibility-4.0.0"},{"title":"Track payment and delivery","description":"Read verified payment, fulfilment and recovery state for an existing order. Reads verified payment, fulfilment and recovery state for the guest order identified by its private orderHandle. The response includes pollAfterSeconds when another read is appropriate.","inputSchema":{"additionalProperties":false,"type":"object","properties":{"orderHandle":{"minLength":32,"maxLength":4096,"type":"string","description":"Opaque order capability returned by execute or order. Pass it unchanged for this guest order; keep the handle private."},"locale":{"minLength":1,"maxLength":35,"type":"string","description":"BCP 47 language tag for the response; supported locales come from info and unsupported locales fall back to English."}},"required":["orderHandle"],"description":"Read verified payment and fulfilment state for the guest's existing order."},"outputSchema":{"type":"object","anyOf":[{"additionalProperties":false,"type":"object","properties":{"ok":{"const":true,"type":"boolean"},"stage":{"const":"tracking","type":"string"},"orderHandle":{"type":"string"},"orderReference":{"type":"string"},"orderStatus":{"type":"string","enum":["cancelled","completed","expired","open"]},"paymentStatus":{"type":"string","enum":["paid","partially_refunded","processing","refunded","unpaid"]},"fulfilment":{"additionalProperties":false,"type":"object","properties":{"deliveryWindow":{"anyOf":[{"type":"string"},{"type":"null"}]},"reasonCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"tracking":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"number":{"type":"string"},"url":{"type":"string"}},"required":["number","url"]}}},"required":["deliveryWindow","reasonCode","status","tracking"]},"nextAction":{"type":"string","enum":["contact_support","none","open_checkout","poll"]},"pollAfterSeconds":{"type":"number"},"checkoutUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkoutExpiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"receipt":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"currency":{"type":"string"},"paidAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"totalPriceMinor":{"$ref":"#/$defs/s0"}},"required":["currency","paidAt","totalPriceMinor"]},{"type":"null"}]},"summary":{"type":"string"},"currency":{"type":"string"},"totalPriceMinor":{"$ref":"#/$defs/s0"}},"required":["ok","orderHandle","orderReference","orderStatus","paymentStatus","fulfilment","nextAction","pollAfterSeconds","checkoutUrl","checkoutExpiresAt","receipt","summary","currency","totalPriceMinor"]},{"additionalProperties":false,"type":"object","properties":{"ok":{"const":false,"type":"boolean"},"error":{"additionalProperties":false,"type":"object","properties":{"category":{"type":"string","enum":["INVALID_ARGUMENT","FAILED_PRECONDITION","NOT_FOUND","ABORTED","RESOURCE_EXHAUSTED","UNAVAILABLE"]},"correlationId":{"type":"string"},"currentRevision":{"type":"integer"},"errorCode":{"type":"string"},"error_code":{"type":"string"},"fieldPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"issues":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"fieldPath":{"type":"string"},"messageKey":{"type":"string"},"reasonCode":{"type":"string"},"message":{"type":"string"},"permittedLimit":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}]}}]},"actual":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["fieldPath","messageKey","reasonCode"]}},"message":{"type":"string"},"messageKey":{"type":"string"},"nextAction":{"type":"string"},"nextActions":{"type":"array","items":{"type":"string"}},"reasonCode":{"type":"string","enum":["positive_number_required","duplicate_supplement","unsupported_unit","legacy_id","unknown_supplement","required","unsupported_country","unsupported_currency","unreferenced_claim","unexpected_property","wrong_purpose","revision_conflict","idempotency_conflict","not_found","open_query","plan_not_ready","availability_changed","checkout_expired","rate_limited","temporarily_unavailable","SERVICE_DEADLINE_EXCEEDED","consent_required","stale_safety_acknowledgement","stale_revision","invalid_request","contract_refresh_required","incompatible_identity","request_too_broad","too_short","unsafe_content"]},"requestedRevision":{"type":"integer"},"retryable":{"type":"boolean"}},"required":["category","errorCode","error_code","fieldPath","message","messageKey","reasonCode","retryable"]}},"required":["ok","error"]}],"$defs":{"s0":{"description":"Amount in the stated currency's minor units; unavailable values are null or absent, never fabricated zero.","type":"integer"}}},"securitySchemes":[{"type":"noauth"}],"_meta":{"securitySchemes":[{"type":"noauth"}]},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"name":"order","responsibilityVersion":"responsibility-4.0.0"},{"title":"Get order help","description":"Open or continue an order-support case. Creates or continues an order-support case for the guest order identified by its private orderHandle. A returned supportHandle identifies replies to the same case. Messages exclude credentials, payment-card data and unnecessary personal or health details.","inputSchema":{"additionalProperties":false,"type":"object","properties":{"orderHandle":{"minLength":32,"maxLength":4096,"type":"string","description":"Opaque order capability returned by execute or order. Pass it unchanged for this guest order; keep the handle private."},"supportHandle":{"minLength":32,"maxLength":4096,"type":"string","description":"Opaque support-thread capability returned by support; omit to start a thread for the order."},"idempotencyKey":{"minLength":16,"maxLength":128,"type":"string","description":"Caller-generated opaque random key for one mutation. For handle-bound retries use the same key and input. A guest create key cannot recover a lost handle: use the returned planHandle to poll, or create with a fresh key if no handle was received."},"message":{"minLength":1,"maxLength":4000,"type":"string","description":"Customer's order-support message. Include the issue and useful order context; avoid passwords, payment-card details and unnecessary health information."}},"required":["orderHandle","idempotencyKey","message"],"description":"Create or continue a support thread for the guest's existing order."},"outputSchema":{"type":"object","anyOf":[{"additionalProperties":false,"type":"object","properties":{"ok":{"const":true,"type":"boolean"},"caseReference":{"type":"string"},"createdAt":{"type":"string"},"feedbackInvitation":{"additionalProperties":false,"type":"object","properties":{"prompt":{"type":"string"},"promptKey":{"type":"string"}},"required":["prompt","promptKey"]},"messageId":{"type":"string"},"orderContext":{"anyOf":[{"additionalProperties":false,"type":"object","properties":{"fulfilmentStatus":{"type":"string"},"nextAction":{"type":"string"},"orderStatus":{"type":"string"},"paymentStatus":{"type":"string"},"stateVersion":{"type":"integer"},"timeline":{"type":"string"}},"required":["fulfilmentStatus","nextAction","orderStatus","paymentStatus","stateVersion","timeline"]},{"type":"null"}]},"responseExpectation":{"type":"string"},"responseExpectationKey":{"type":"string"},"retailCustomerOrder":{"additionalProperties":false,"type":"object","properties":{"orderId":{"type":"string"},"orderNumber":{"type":"string"},"orderStatus":{"type":"string"},"trackingUrl":{"type":"string"},"contributionMargin":{"additionalProperties":false,"type":"object","properties":{"currency":{"type":"string"},"grossCustomerAmount":{"type":"number"},"mattanutraMarginAmount":{"type":"number"},"retailerPayableAmount":{"type":"number"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["currency","grossCustomerAmount","mattanutraMarginAmount","retailerPayableAmount","status"]}},"required":["orderId","orderNumber","orderStatus","trackingUrl"]},"status":{"const":"open","type":"string"},"supportHandle":{"type":"string"},"thread":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"author":{"type":"string","enum":["client","support"]},"body":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"string"},"sequence":{"type":"integer"}},"required":["author","body","createdAt","id","sequence"]}}},"required":["ok","caseReference","createdAt","feedbackInvitation","messageId","orderContext","responseExpectation","responseExpectationKey","status","supportHandle","thread"]},{"additionalProperties":false,"type":"object","properties":{"ok":{"const":false,"type":"boolean"},"error":{"additionalProperties":false,"type":"object","properties":{"category":{"type":"string","enum":["INVALID_ARGUMENT","FAILED_PRECONDITION","NOT_FOUND","ABORTED","RESOURCE_EXHAUSTED","UNAVAILABLE"]},"correlationId":{"type":"string"},"currentRevision":{"type":"integer"},"errorCode":{"type":"string"},"error_code":{"type":"string"},"fieldPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"issues":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"fieldPath":{"type":"string"},"messageKey":{"type":"string"},"reasonCode":{"type":"string"},"message":{"type":"string"},"permittedLimit":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}]}}]},"actual":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["fieldPath","messageKey","reasonCode"]}},"message":{"type":"string"},"messageKey":{"type":"string"},"nextAction":{"type":"string"},"nextActions":{"type":"array","items":{"type":"string"}},"reasonCode":{"type":"string","enum":["positive_number_required","duplicate_supplement","unsupported_unit","legacy_id","unknown_supplement","required","unsupported_country","unsupported_currency","unreferenced_claim","unexpected_property","wrong_purpose","revision_conflict","idempotency_conflict","not_found","open_query","plan_not_ready","availability_changed","checkout_expired","rate_limited","temporarily_unavailable","SERVICE_DEADLINE_EXCEEDED","consent_required","stale_safety_acknowledgement","stale_revision","invalid_request","contract_refresh_required","incompatible_identity","request_too_broad","too_short","unsafe_content"]},"requestedRevision":{"type":"integer"},"retryable":{"type":"boolean"}},"required":["category","errorCode","error_code","fieldPath","message","messageKey","reasonCode","retryable"]}},"required":["ok","error"]}]},"securitySchemes":[{"type":"noauth"}],"_meta":{"securitySchemes":[{"type":"noauth"}]},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"name":"support","responsibilityVersion":"responsibility-4.0.0"},{"title":"Send service feedback","description":"Record optional service feedback with customer consent, without changing a plan or checkout. Records optional service feedback with consentConfirmed=true after the customer agrees. Feedback concerns usefulness or service failures, excludes personal or health details, and does not change a plan or checkout.","inputSchema":{"additionalProperties":false,"type":"object","properties":{"planHandle":{"minLength":32,"maxLength":4096,"type":"string","description":"Opaque plan capability returned by plan. Pass it unchanged for this guest plan; keep the handle private."},"expectedRevision":{"minimum":1,"type":"integer","description":"Current plan revision returned by plan. A stale revision is rejected; read the plan before making a new change."},"idempotencyKey":{"minLength":16,"maxLength":128,"type":"string","description":"Caller-generated opaque random key for one mutation. For handle-bound retries use the same key and input. A guest create key cannot recover a lost handle: use the returned planHandle to poll, or create with a fresh key if no handle was received."},"consentConfirmed":{"const":true,"type":"boolean","description":"Must be true only after the customer agrees to submit optional service feedback."},"points":{"maxItems":8,"uniqueItems":true,"type":"array","items":{"minLength":1,"maxLength":240,"type":"string","description":"Concise service observations. Distinguish agent observations from customer comments and omit personal or health details."},"description":"Concise service observations. Distinguish agent observations from customer comments and omit personal or health details."},"rating":{"minimum":1,"maximum":5,"type":"integer","description":"Customer-provided service rating from 1 to 5; omit rather than invent a rating."},"summary":{"minLength":1,"maxLength":1000,"type":"string","description":"Optional concise service-feedback summary with no personal or health details."}},"required":["planHandle","expectedRevision","idempotencyKey","consentConfirmed"],"description":"Submit optional service feedback about the guest's plan after receiving consent."},"outputSchema":{"type":"object","anyOf":[{"additionalProperties":false,"type":"object","properties":{"ok":{"const":true,"type":"boolean"},"accepted":{"const":true,"type":"boolean"}},"required":["ok","accepted"]},{"additionalProperties":false,"type":"object","properties":{"ok":{"const":false,"type":"boolean"},"error":{"additionalProperties":false,"type":"object","properties":{"category":{"type":"string","enum":["INVALID_ARGUMENT","FAILED_PRECONDITION","NOT_FOUND","ABORTED","RESOURCE_EXHAUSTED","UNAVAILABLE"]},"correlationId":{"type":"string"},"currentRevision":{"type":"integer"},"errorCode":{"type":"string"},"error_code":{"type":"string"},"fieldPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"issues":{"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"fieldPath":{"type":"string"},"messageKey":{"type":"string"},"reasonCode":{"type":"string"},"message":{"type":"string"},"permittedLimit":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}]}}]},"actual":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["fieldPath","messageKey","reasonCode"]}},"message":{"type":"string"},"messageKey":{"type":"string"},"nextAction":{"type":"string"},"nextActions":{"type":"array","items":{"type":"string"}},"reasonCode":{"type":"string","enum":["positive_number_required","duplicate_supplement","unsupported_unit","legacy_id","unknown_supplement","required","unsupported_country","unsupported_currency","unreferenced_claim","unexpected_property","wrong_purpose","revision_conflict","idempotency_conflict","not_found","open_query","plan_not_ready","availability_changed","checkout_expired","rate_limited","temporarily_unavailable","SERVICE_DEADLINE_EXCEEDED","consent_required","stale_safety_acknowledgement","stale_revision","invalid_request","contract_refresh_required","incompatible_identity","request_too_broad","too_short","unsafe_content"]},"requestedRevision":{"type":"integer"},"retryable":{"type":"boolean"}},"required":["category","errorCode","error_code","fieldPath","message","messageKey","reasonCode","retryable"]}},"required":["ok","error"]}]},"securitySchemes":[{"type":"noauth"}],"_meta":{"securitySchemes":[{"type":"noauth"}]},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"name":"feedback","responsibilityVersion":"responsibility-4.0.0"}],"transport":"streamable-http"}