Tembi Intelligence
E-commerce intelligence
- Category
- Data & Analytics
- Primary Subcategory
- Market & Competitive Intelligence Data
Integration details
Description
This MCP server based plugin provides tools for getting insights about e-commerce market across Europe.
- Integration type
- Plugin
- Verification status
- Not applicable
- Platform
- ChatGPT
- Primary Subcategory
- Market & Competitive Intelligence Data
- Secondary Subcategories
- None listed
- Brand
- Tembi
- Access
- Account required
- First tracked
- 2026-09-04
- Tool count
- 17
- Geography
- US
The Primary Subcategory used for this profile’s headline score.
Other Subcategories where the Integration is listed.
ChatGPT Plugin Discovery Score
ChatGPT Plugin discovery is coming soon
ChatGPT can surface a Plugin when it matches a user's request.Your Plugin Discovery Score measures how often yours appears.
No spam. Unsubscribe any time.
What discovery looks like

Competing in ChatGPT Market & Competitive Intelligence Data
View Category17 tools agents can invoke
Assess checkout-health across the caller's webshop base (read-only) Read-only dashboard: *how healthy is our checkout footprint?* for the caller's own provider (from ``UserContext.delivery_providers`` — not overridable). Country scope: ``country_codes`` must sit inside ``UserContext.access_markets``; omit for all accessible markets. Time scope: ``use_latest_snapshot`` defaults **true** — every number is pinned to the latest available scrape date for each source table (the *right-now* view). Set false to roll up over the trailing ``activity_months`` instead (``activity_months`` is ignored when true). Signals scored (each ``include_*`` defaults true; max score = 3): ``include_brand_visibility`` (1 pt if provider is named), ``include_method_clarity`` (1 pt if ``delivery_method`` is a real value), ``include_time_clarity`` (1 pt if ``delivery_time`` is not null). Disabled signals drop from the score, coverage, and their ``checkout_missing_*`` count. Noise-row toggles — TWO separate scopes: (1) Base dashboard: ``include_unknown_providers`` (default true = keep unknown-provider rows and ``'collect_yourself'`` method rows in base counts; false = strip). ``include_unknown_delivery_method`` (default true = keep ``'unknown'`` method rows; false = strip). ``'multiple_providers'`` always kept. (2) Competitor comparison: ``include_unknown_in_competitors`` (default false = strip unknown-provider / ``'collect_yourself'`` rows from ``competitor_leads`` + ``healthier_competitor_examples``, since neither is a real competitor; true keeps them). Independent of the base flags. T&Cs base: ``total_webshops_in_scope`` = every T&Cs mention of the caller's provider in scope, whether or not we've scraped a checkout for the shop. The T&C-only bucket splits into ``tandc_only_with_checkout`` (we HAVE their checkout, caller isn't at it) and ``tandc_only_no_checkout`` (we've never scraped their checkout — status unverifiable). Score distribution scores every shop in the base; no-checkout shops land in the brand-only bucket. Don't ask the user to confirm settings — pick them from the question and invoke. Answer from the returned ``counts``, ``category_coverage``, ``competitor_leads``, examples, and ``summary_for_llm``; quote the numbers and state ``settings_applied`` so the user can reconfigure. For richer segment slicing chain to ``calculate_delivery_market_share`` / ``assess_competitor_copresence``. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "access_denied": true, "category_coverage": [ { "category": "Category", "label": "Label", "webshops_meeting": 1, "webshops_missing": 1 } ], "score_distribution": [ { "score": 1, "webshops": 1 } ], "competitor_leads": [ { "delivery_provider": "Delivery Provider", "webshops": 1, "avg_score_gap": 1.0 } ], "tandc_only_with_checkout_examples": [ { "domain_id": "Domain Id", "domain": "Domain" } ], "tandc_only_no_checkout_examples": [ { "domain_id": "Domain Id", "domain": "Domain" } ], "missing_method_examples": [ { "domain_id": "Domain Id", "domain": "Domain" } ], "missing_time_examples": [ { "domain_id": "Domain Id", "domain": "Domain" } ], "healthier_competitor_examples": [ { "domain_id": "Domain Id", "domain": "Domain" } ], "settings_applied": { "delivery_provider": "Delivery Provider", "country_codes": [ "string" ], "use_latest_snapshot": true, "activity_months": 1, "min_health_gap": 1.0, "top_n_examples": 1, "assessed_categories": [ "string" ], "include_unknown_providers": true, "include_unknown_delivery_method": true, "include_unknown_in_competitors": true }, "summary_for_llm": "Summary For Llm", "timestamp": "2023-01-01T00:00:00Z" } ``` **Output Schema:** ```json { "properties": { "access_denied": { "type": "boolean", "title": "Access Denied", "description": "True when the tool could not run because the caller lacks a delivery provider on their profile, or requested country codes outside their ``UserContext.access_markets``. Fact blocks are omitted; ``summary_for_llm`` explains the denial.", "default": false }, "counts": { "description": "Aggregate dashboard counts. Omitted when ``access_denied=true``." }, "category_coverage": { "items": { "properties": { "category": { "type": "string", "title": "Category", "description": "Signal identifier: 'brand_visibility' | 'method_clarity' | 'time_clarity'." }, "label": { "type": "string", "title": "Label", "description": "Human-readable label for the signal." }, "webshops_meeting": { "type": "integer", "minimum": 0.0, "title": "Webshops Meeting", "description": "Number of caller-provider webshops in the window that satisfy this signal for the caller's provider specifically." }, "webshops_missing": { "type": "integer", "minimum": 0.0, "title": "Webshops Missing", "description": "Number of caller-provider webshops in the window where the signal is absent (e.g. brand shown but method NULL for 'method_clarity')." } }, "type": "object", "required": [ "category", "label", "webshops_meeting", "webshops_missing" ], "title": "HealthCategoryCoverage", "description": "Per-category coverage counts for the caller's provider.\n\nOnly the categories the caller opted into (via the ``include_*`` request\nflags) appear here \u2014 disabled categories are omitted entirely." }, "type": "array", "title": "Category Coverage", "description": "Per-signal coverage counts for the categories the caller opted into. Empty when ``access_denied=true``." }, "score_distribution": { "items": { "properties": { "score": { "type": "integer", "minimum": 1.0, "title": "Score", "description": "Sum of criteria met (1..max_score)." }, "webshops": { "type": "integer", "minimum": 0.0, "title": "Webshops", "description": "Distinct caller-provider shops with this score." } }, "type": "object", "required": [ "score", "webshops" ], "title": "ScoreBucket", "description": "One point of the caller-provider webshop score distribution.\n\n``score`` is the sum of enabled criteria a webshop satisfies (1 up to the\nnumber of enabled ``include_*`` flags \u2014 the zero bucket is dropped since a\n\"provider not observed\" score is not actionable). ``webshops`` is the\ndistinct-domain count of caller-provider shops at checkout with that exact\nscore in the window. Every possible score in ``[1, max_score]`` is present\nso the widget can render a full distribution with zeroed empty buckets." }, "type": "array", "title": "Score Distribution", "description": "Distribution of caller-provider shops at checkout by composite score (sum of enabled criteria met, 1..N \u2014 score 0 is intentionally omitted). Always covers every bucket in ``[1, len(assessed_categories)]`` \u2014 empty buckets carry ``webshops=0`` so the widget can render a stable set of segments." }, "competitor_leads": { "items": { "properties": { "delivery_provider": { "type": "string", "title": "Delivery Provider", "description": "Competitor provider slug (canonical stored form)." }, "webshops": { "type": "integer", "minimum": 0.0, "title": "Webshops", "description": "Webshops where BOTH the caller and this competitor are at checkout, the competitor's checkout-health score is higher than the caller's, and the gap meets ``min_health_gap``." }, "avg_score_gap": { "type": "number", "title": "Avg Score Gap", "description": "Mean (competitor \u2212 caller) score gap across those shops." } }, "type": "object", "required": [ "delivery_provider", "webshops", "avg_score_gap" ], "title": "CompetitorHealthLead", "description": "One competitor slug the caller lags behind, ranked by webshop count." }, "type": "array", "title": "Competitor Leads", "description": "Competitor slugs the caller is losing to, ranked by count of shared webshops where the competitor's checkout-health score is higher than the caller's by at least ``min_health_gap``." }, "tandc_only_with_checkout_examples": { "items": { "properties": { "domain_id": { "type": "string", "title": "Domain Id", "description": "ULID primary key of the webshop." }, "domain": { "type": "string", "title": "Domain", "description": "Canonical host (e.g. 'acme.dk')." }, "country_code": { "title": "Country Code" }, "detail": { "title": "Detail", "description": "Free-form context for the bucket \u2014 e.g. the competitor's slug + score gap for a 'healthier competitor' row." } }, "type": "object", "required": [ "domain_id", "domain" ], "title": "CheckoutHealthExample", "description": "Concrete example of a webshop falling into a specific health bucket." }, "type": "array", "title": "Tandc Only With Checkout Examples", "description": "Concrete webshops mentioning the caller in T&Cs, with a scraped checkout row (any provider) in scope, but where the caller isn't at that checkout. Capped by ``top_n_examples``." }, "tandc_only_no_checkout_examples": { "items": { "properties": { "domain_id": { "type": "string", "title": "Domain Id", "description": "ULID primary key of the webshop." }, "domain": { "type": "string", "title": "Domain", "description": "Canonical host (e.g. 'acme.dk')." }, "country_code": { "title": "Country Code" }, "detail": { "title": "Detail", "description": "Free-form context for the bucket \u2014 e.g. the competitor's slug + score gap for a 'healthier competitor' row." } }, "type": "object", "required": [ "domain_id", "domain" ], "title": "CheckoutHealthExample", "description": "Concrete example of a webshop falling into a specific health bucket." }, "type": "array", "title": "Tandc Only No Checkout Examples", "description": "Concrete webshops mentioning the caller in T&Cs but with no scraped checkout row of any kind in scope \u2014 status at checkout cannot be verified. Capped by ``top_n_examples``." }, "missing_method_examples": { "items": { "properties": { "domain_id": { "type": "string", "title": "Domain Id", "description": "ULID primary key of the webshop." }, "domain": { "type": "string", "title": "Domain", "description": "Canonical host (e.g. 'acme.dk')." }, "country_code": { "title": "Country Code" }, "detail": { "title": "Detail", "description": "Free-form context for the bucket \u2014 e.g. the competitor's slug + score gap for a 'healthier competitor' row." } }, "type": "object", "required": [ "domain_id", "domain" ], "title": "CheckoutHealthExample", "description": "Concrete example of a webshop falling into a specific health bucket." }, "type": "array", "title": "Missing Method Examples", "description": "Concrete webshops showing the caller at checkout with no ``delivery_method`` (capped by ``top_n_examples``). Always empty when ``include_method_clarity`` is disabled on the request." }, "missing_time_examples": { "items": { "properties": { "domain_id": { "type": "string", "title": "Domain Id", "description": "ULID primary key of the webshop." }, "domain": { "type": "string", "title": "Domain", "description": "Canonical host (e.g. 'acme.dk')." }, "country_code": { "title": "Country Code" }, "detail": { "title": "Detail", "description": "Free-form context for the bucket \u2014 e.g. the competitor's slug + score gap for a 'healthier competitor' row." } }, "type": "object", "required": [ "domain_id", "domain" ], "title": "CheckoutHealthExample", "description": "Concrete example of a webshop falling into a specific health bucket." }, "type": "array", "title": "Missing Time Examples", "description": "Concrete webshops showing the caller at checkout with no ``delivery_time`` (capped by ``top_n_examples``). Always empty when ``include_time_clarity`` is disabled on the request." }, "healthier_competitor_examples": { "items": { "properties": { "domain_id": { "type": "string", "title": "Domain Id", "description": "ULID primary key of the webshop." }, "domain": { "type": "string", "title": "Domain", "description": "Canonical host (e.g. 'acme.dk')." }, "country_code": { "title": "Country Code" }, "detail": { "title": "Detail", "description": "Free-form context for the bucket \u2014 e.g. the competitor's slug + score gap for a 'healthier competitor' row." } }, "type": "object", "required": [ "domain_id", "domain" ], "title": "CheckoutHealthExample", "description": "Concrete example of a webshop falling into a specific health bucket." }, "type": "array", "title": "Healthier Competitor Examples", "description": "Concrete webshops where a competitor's checkout-health score exceeds the caller's by ``min_health_gap`` (capped by ``top_n_examples``)." }, "settings_applied": { "description": "Effective settings this response was built with \u2014 echoed for the UI.", "properties": { "delivery_provider": { "type": "string", "title": "Delivery Provider", "description": "Slug of the caller's provider (from ``UserContext.delivery_providers``). This tool never accepts an override for the provider \u2014 the value is always the caller's own." }, "country_codes": { "items": { "type": "string" }, "type": "array", "title": "Country Codes", "description": "Country codes actually used to scope the query \u2014 the intersection of the request and ``UserContext.access_markets``." }, "use_latest_snapshot": { "type": "boolean", "title": "Use Latest Snapshot", "description": "Echo of the request flag \u2014 true means every checkout/T&Cs number was computed as-of the latest scrape date on each source table; false means the trailing ``activity_months`` window was used." }, "activity_months": { "type": "integer", "title": "Activity Months" }, "min_health_gap": { "type": "number", "title": "Min Health Gap" }, "top_n_examples": { "type": "integer", "title": "Top N Examples" }, "assessed_categories": { "items": { "type": "string" }, "type": "array", "title": "Assessed Categories", "description": "Signal identifiers the caller opted into for this run (subset of ``brand_visibility`` / ``method_clarity`` / ``time_clarity``). Drives both the health score and which coverage rows appear in the response." }, "include_unknown_providers": { "type": "boolean", "title": "Include Unknown Providers", "description": "Echo of the request flag (scope: base dashboard). True (default) means unknown-provider rows and ``'collect_yourself'`` method rows were kept in base counts; false strips them." }, "include_unknown_delivery_method": { "type": "boolean", "title": "Include Unknown Delivery Method", "description": "Echo of the request flag (scope: base dashboard). True (default) means ``'unknown'`` method rows were kept in base counts; false strips them." }, "include_unknown_in_competitors": { "type": "boolean", "title": "Include Unknown In Competitors", "description": "Echo of the request flag (scope: competitor comparison only). False (default) means unknown-provider rows and ``'collect_yourself'`` method rows were excluded from ``competitor_leads`` and ``healthier_competitor_examples`` \u2014 leaderboard hygiene, independent of the base setting." } }, "type": "object", "required": [ "delivery_provider", "use_latest_snapshot", "activity_months", "min_health_gap", "top_n_examples", "include_unknown_providers", "include_unknown_delivery_method", "include_unknown_in_competitors" ], "title": "CheckoutHealthSettings" }, "summary_for_llm": { "type": "string", "title": "Summary For Llm", "description": "Pre-rendered narrative the LLM can quote verbatim. Contains the dashboard counts, the top competitor leads, and which criteria were assessed." }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp", "description": "Server-side UTC invocation timestamp." } }, "type": "object", "required": [ "settings_applied", "summary_for_llm", "timestamp" ], "title": "AssessCheckoutHealthResponse", "description": "Full response for the *assess_checkout_health* tool.\n\n``access_denied`` short-circuits every fact block when the caller either has\nno delivery provider on their profile or asked for a country code outside\ntheir ``UserContext.access_markets``." } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
assess_checkout_health
Which carriers share a delivery provider's webshop checkouts Analyses which competing carriers appear at the *same webshop checkouts* as a target provider — the clearest point-of-sale signal of head-to-head competition. Runs on the checkout-observed population (``webshop_checkout_history``), a tighter subset than the market-share tools' provider history. **Co-presence:** ``copresence_pct`` is the share of the target's webshops that also offer a given competitor; ``reverse_copresence_pct`` is the reverse, so you can see dependency asymmetry. ``penetration_pct`` grounds how big each rival is overall. **Contested base:** the response reports how much of the target's base is *exclusive* (it is the only carrier at checkout) versus *contested* (a rival is also present). **Method-aware:** set ``breakdown_by_method`` to require the competitor to share the same delivery method (rows become per (competitor, method)). **Position:** with ``include_position`` (default on) each row reports the average checkout positions and how often the target is listed above the competitor. Segment filters (``cross_border``, size, growth, main-product-category, ``export_markets``, ``uses_delivery_*``) apply as elsewhere. Returns a pre-rendered ``summary_for_llm``. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "entitled_markets": [ "string" ], "unauthorized_markets": [ "string" ], "markets_resolved": true, "country_codes": [ "string" ], "provider_resolved": true, "candidate_providers": [ "string" ], "delivery_provider": "Delivery Provider", "period_months": 1, "data_as_of": "2023-01-01", "breakdown_by_method": true, "include_position": true, "filters_summary": "Filters Summary", "population_shops": 1, "target_shops": 1, "exclusive_shops": 1, "exclusive_pct": 1.0, "contested_shops": 1, "contested_pct": 1.0, "competitors": [ { "rank": 1, "delivery_provider": "Delivery Provider", "competitor_shops": 1, "copresence_shops": 1, "copresence_pct": 1.0, "reverse_copresence_pct": 1.0, "penetration_pct": 1.0 } ], "total_competitors_available": 1, "summary_for_llm": "Summary For Llm" } ``` **Output Schema:** ```json { "properties": { "entitled_markets": { "items": { "type": "string" }, "type": "array", "title": "Entitled Markets", "description": "Markets the caller's account is entitled to query (empty = no restriction)." }, "unauthorized_markets": { "items": { "type": "string" }, "type": "array", "title": "Unauthorized Markets", "description": "Requested markets dropped because they are outside the caller's entitlement." }, "markets_resolved": { "type": "boolean", "title": "Markets Resolved", "description": "False when every explicitly requested market is outside the caller's entitlement. No data was queried in that case; 'entitled_markets' lists the markets to retry with.", "default": true }, "country_codes": { "items": { "type": "string" }, "type": "array", "title": "Country Codes", "description": "Resolved market scope as ISO codes (empty = all markets, no market filter)." }, "provider_resolved": { "type": "boolean", "title": "Provider Resolved", "description": "False when the requested provider has no data in this market. In that case the metric fields are empty/zero and 'candidate_providers' lists real carriers.", "default": true }, "candidate_providers": { "items": { "type": "string" }, "type": "array", "title": "Candidate Providers", "description": "Suggested canonical provider slugs to retry with when provider_resolved is False (closest name matches, else the market's largest carriers)." }, "delivery_provider": { "type": "string", "title": "Delivery Provider", "description": "The target provider analysed." }, "period_months": { "type": "integer", "title": "Period Months" }, "data_as_of": { "type": "string", "format": "date", "title": "Data As Of", "description": "Latest month with checkout data anchoring the window." }, "breakdown_by_method": { "type": "boolean", "title": "Breakdown By Method" }, "include_position": { "type": "boolean", "title": "Include Position" }, "filters_summary": { "type": "string", "title": "Filters Summary", "description": "Human-readable summary of segment filters." }, "population_shops": { "type": "integer", "title": "Population Shops", "description": "Total checkout-observed webshops in the segment (the co-presence universe). Contrast with target_shops to judge coverage; it is also the penetration_pct base." }, "target_shops": { "type": "integer", "title": "Target Shops", "description": "Distinct checkout-observed webshops offering the target provider." }, "exclusive_shops": { "type": "integer", "title": "Exclusive Shops", "description": "Target webshops where it is the ONLY carrier at checkout (uncontested)." }, "exclusive_pct": { "type": "number", "title": "Exclusive Pct", "description": "exclusive_shops as a percentage of target_shops." }, "contested_shops": { "type": "integer", "title": "Contested Shops", "description": "Target webshops that also offer at least one competing carrier." }, "contested_pct": { "type": "number", "title": "Contested Pct", "description": "contested_shops as a percentage of target_shops." }, "competitors": { "items": { "properties": { "rank": { "type": "integer", "title": "Rank", "description": "1-based rank by shared-webshop count with the target." }, "delivery_provider": { "type": "string", "title": "Delivery Provider", "description": "The competing carrier." }, "delivery_method": { "title": "Delivery Method", "description": "The shared delivery method (only when breakdown_by_method is true)." }, "competitor_shops": { "type": "integer", "title": "Competitor Shops", "description": "Distinct checkout-observed webshops offering this competitor." }, "copresence_shops": { "type": "integer", "title": "Copresence Shops", "description": "Webshops offering BOTH the target and this competitor at checkout." }, "copresence_pct": { "type": "number", "title": "Copresence Pct", "description": "Percentage of the target's webshops that ALSO offer this competitor. The headline 'how much of my base does this carrier contest' metric." }, "reverse_copresence_pct": { "type": "number", "title": "Reverse Copresence Pct", "description": "Percentage of THIS competitor's webshops that also offer the target. Contrast with copresence_pct to see dependency asymmetry (who relies on the shared base more)." }, "penetration_pct": { "type": "number", "title": "Penetration Pct", "description": "This competitor's share of all checkout-observed webshops in the segment \u2014 how big the carrier is overall (checkout basis, distinct from the market-share tools)." }, "avg_target_position": { "title": "Avg Target Position", "description": "The target's mean checkout position among the shops it shares with this competitor (lower = nearer the top). Null when include_position is false." }, "avg_competitor_position": { "title": "Avg Competitor Position", "description": "This competitor's mean checkout position on the shared shops." }, "target_ahead_pct": { "title": "Target Ahead Pct", "description": "Percentage of shared shops where the target is listed above this competitor (ties count as half). >50 means the target usually appears first; <50 means it trails." } }, "type": "object", "required": [ "rank", "delivery_provider", "competitor_shops", "copresence_shops", "copresence_pct", "reverse_copresence_pct", "penetration_pct" ], "title": "CompetitorCopresenceRow", "description": "One competitor's checkout co-presence with the target provider." }, "type": "array", "title": "Competitors", "description": "Competitors ranked by shared-webshop count with the target." }, "total_competitors_available": { "type": "integer", "title": "Total Competitors Available", "description": "Co-present entries clearing the min_copresence_shops floor \u2014 distinct competitors, or competitor\u00d7method rows when breakdown_by_method is set (matching the grain of 'competitors'). Counted after the floor; may exceed those returned when > top_n.", "default": 0 }, "summary_for_llm": { "type": "string", "title": "Summary For Llm" } }, "type": "object", "required": [ "delivery_provider", "period_months", "data_as_of", "breakdown_by_method", "include_position", "filters_summary", "population_shops", "target_shops", "exclusive_shops", "exclusive_pct", "contested_shops", "contested_pct", "competitors", "summary_for_llm" ], "title": "CompetitorCopresenceResponse", "description": "Response from the *assess_competitor_copresence* tool." } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
assess_competitor_copresence
Rank delivery providers/methods by market share at a point in time Calculates a point-in-time ranking of delivery providers (or delivery methods) by the share of webshops using each, over a trailing window ending at the latest month with data. The snapshot sibling of ``calculate_delivery_market_share_trend`` — same segment filters and baseline, but a ranked table rather than a time series. **Dimension:** rank by 'delivery_provider' (default) or 'delivery_method'. **Market scope:** ``domestic`` (default) ranks webshops' own-market delivery usage. ``cross_border`` ranks what webshops offer consumers in OTHER markets: ``country_code`` scopes the source webshops' market(s) and ``target_country`` the destination(s) — e.g. carriers dominant on the Italy→Spain lane = market_scope='cross_border', country_code='IT', target_country='ES'. Cross-border data is a single current snapshot (``period_months`` is ignored; the response sets ``snapshot_only``); provider/method classification coverage is lower than domestic. (Two segment filters are related but distinct, and apply in either scope: ``cross_border`` — whether a shop exports at all — and ``export_markets`` — declared export destinations, as country names. Neither selects the lane rows analysed; only ``target_country`` does.) **Subject:** pass ``subject`` (or, for providers, rely on the caller's own provider from their Tembi context) to also get that value's rank and share alongside the table. The true number of distinct providers/methods is always returned as ``total_active_values`` (independent of ``top_n``). **Baseline (denominator):** ``denominator_basis`` works exactly as in the trend tool; the response echoes the resolved basis and a plain-English ``denominator_explanation`` — surface it to the user, since it changes what the percentage means. In cross-border scope 'auto'/'checkout' measure against export-checkout-observed webshops in the lane slice and 'market' against all webshops in the segment ('delivery' is domestic-only). **Filters (segment):** ``cross_border``, size, growth, main-product-category, ``export_markets``, and ``uses_delivery_provider`` / ``uses_delivery_method``. Resolve exact values with ``get_queryable_values``. Returns the ranked table plus a ``summary_for_llm``. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "entitled_markets": [ "string" ], "unauthorized_markets": [ "string" ], "markets_resolved": true, "dimension": "DeliveryShareDimension", "market_scope": "MarketScope", "country_codes": [ "string" ], "target_countries": [ "string" ], "snapshot_only": true, "period_months": 1, "denominator_basis": "DenominatorBasis", "denominator_explanation": "Denominator Explanation", "filters_summary": "Filters Summary", "excluded_values": [ "string" ], "subject_resolved": true, "candidate_values": [ "string" ], "webshop_count": 1, "market_share_pct": 1.0, "rank": 1, "total_active_values": 1, "total_market_webshops": 1, "rankings": [ { "rank": 1, "series_value": "Series Value", "webshop_count": 1, "market_share_pct": 1.0 } ], "summary_for_llm": "Summary For Llm" } ``` **Output Schema:** ```json { "properties": { "entitled_markets": { "items": { "type": "string" }, "type": "array", "title": "Entitled Markets", "description": "Markets the caller's account is entitled to query (empty = no restriction)." }, "unauthorized_markets": { "items": { "type": "string" }, "type": "array", "title": "Unauthorized Markets", "description": "Requested markets dropped because they are outside the caller's entitlement." }, "markets_resolved": { "type": "boolean", "title": "Markets Resolved", "description": "False when every explicitly requested market is outside the caller's entitlement. No data was queried in that case; 'entitled_markets' lists the markets to retry with.", "default": true }, "dimension": { "type": "string", "enum": [ "delivery_provider", "delivery_method" ], "title": "DeliveryShareDimension", "description": "What a delivery-share calculation is split by." }, "market_scope": { "description": "Which delivery dataset a scope-aware tool analyses.\n\n* ``domestic`` \u2013 webshops' own-market delivery data (monthly history).\n* ``cross_border`` \u2013 what webshops offer consumers in *other* markets\n (source webshop \u2192 target market pathways). Currently a single snapshot:\n month/window addressing is not yet supported for this scope.\n\nNot to be confused with the *entitlement* market scope (``MarketScopeEcho``,\nISO country codes) or the ``cross_border`` segment filter (a webshop\nattribute: whether the shop exports at all).", "default": "domestic", "type": "string", "enum": [ "domestic", "cross_border" ], "title": "MarketScope" }, "country_codes": { "items": { "type": "string" }, "type": "array", "title": "Country Codes", "description": "Markets analysed (source markets for cross_border)." }, "target_countries": { "items": { "type": "string" }, "type": "array", "title": "Target Countries", "description": "cross_border: target markets analysed (empty = all)." }, "snapshot_only": { "type": "boolean", "title": "Snapshot Only", "description": "True when the scope's data source is a single undated snapshot (cross_border today): data_as_of is null and window addressing is unavailable.", "default": false }, "period_months": { "type": "integer", "title": "Period Months" }, "data_as_of": { "title": "Data As Of", "description": "Latest month with data anchoring the window (null when the data source is a single undated snapshot)." }, "denominator_basis": { "description": "The population a delivery-share percentage is measured *against* (baseline).\n\n* ``delivery`` \u2013 webshops with a known delivery provider\n (``webshop_delivery_provider_history``; derived from checkout + T&C signals).\n* ``checkout`` \u2013 webshops with a known delivery method at checkout\n (``webshop_checkout_history``).\n* ``market`` \u2013 all webshops in the segment (``webshop_history``), i.e. the\n provider/method's penetration of the whole market.\n* ``auto`` \u2013 pick the fact table that owns the pivot dimension\n (provider \u2192 ``delivery``, method \u2192 ``checkout``). This is the default.", "type": "string", "enum": [ "auto", "delivery", "checkout", "market" ], "title": "DenominatorBasis" }, "denominator_explanation": { "type": "string", "title": "Denominator Explanation", "description": "Plain-English statement of what the percentages are measured against." }, "filters_summary": { "type": "string", "title": "Filters Summary", "description": "Human-readable summary of segment filters." }, "excluded_values": { "items": { "type": "string" }, "type": "array", "title": "Excluded Values", "description": "Dimension values excluded from this calculation (echoed so the % is clear)." }, "subject": { "title": "Subject", "description": "The provider/method that was highlighted, if any." }, "subject_resolved": { "type": "boolean", "title": "Subject Resolved", "description": "False when a subject was requested but has no data in this segment; 'candidate_values' then lists real options to retry with.", "default": true }, "candidate_values": { "items": { "type": "string" }, "type": "array", "title": "Candidate Values", "description": "Largest values in this segment to retry with when subject_resolved is False." }, "webshop_count": { "type": "integer", "title": "Webshop Count", "description": "Webshops using the highlighted subject in the window.", "default": 0 }, "market_share_pct": { "type": "number", "title": "Market Share Pct", "description": "The highlighted subject's share of the baseline.", "default": 0.0 }, "rank": { "type": "integer", "title": "Rank", "description": "The highlighted subject's rank (0 if none).", "default": 0 }, "total_active_values": { "type": "integer", "title": "Total Active Values", "description": "True count of distinct providers/methods in the market (pre-top_n)." }, "total_market_webshops": { "type": "integer", "title": "Total Market Webshops", "description": "Distinct webshops in the baseline population for the window." }, "rankings": { "items": { "properties": { "rank": { "type": "integer", "title": "Rank", "description": "1-based rank by webshop count in this market." }, "series_value": { "type": "string", "title": "Series Value", "description": "The provider/method this row describes." }, "webshop_count": { "type": "integer", "title": "Webshop Count", "description": "Distinct webshops actively using this value." }, "market_share_pct": { "type": "number", "title": "Market Share Pct", "description": "Share of the baseline population." } }, "type": "object", "required": [ "rank", "series_value", "webshop_count", "market_share_pct" ], "title": "DeliveryMarketShareRow", "description": "One row in the full provider/method-ranking table." }, "type": "array", "title": "Rankings", "description": "Ranked table of providers/methods by share (up to top_n)." }, "summary_for_llm": { "type": "string", "title": "Summary For Llm", "description": "Pre-rendered human-readable summary of the market position. Suitable for direct inclusion in an LLM answer." } }, "type": "object", "required": [ "dimension", "period_months", "denominator_basis", "denominator_explanation", "filters_summary", "total_active_values", "total_market_webshops", "rankings", "summary_for_llm" ], "title": "DeliveryMarketShareResponse", "description": "Response from the *calculate_delivery_market_share* tool." } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
calculate_delivery_market_share
Monthly market-share trend by delivery provider or method, with filters Returns a multi-series monthly market-share trend for the top delivery providers (or delivery methods) in a market. The trend sibling of``calculate_delivery_market_share``. Domestic (own-market) data only — for cross-border/export analysis use the snapshot tool with market_scope='cross_border' (that data has no monthly history yet). **Series:** the top ``top_n`` providers/methods by webshop count in the most recent month, plus any explicit ``series_values``. Set ``dimension`` to 'delivery_provider' (default) or 'delivery_method'. ``total_series_available`` reports how many exist so you can tell when the chart is truncated. **Baseline (denominator):** controlled by ``denominator_basis``. 'auto' (default) uses webshops with delivery data for the chosen dimension; 'market' expresses penetration of all webshops in the segment. The response echoes the resolved basis and a plain-English ``denominator_explanation`` — **surface this to the user**, because it changes what the percentage means. When unsure which baseline the user wants, ask. **Filters (segment):** ``cross_border``, ``size_categories`` / ``size_indication_min`` / ``size_indication_max``, ``growth_categories``, ``product_categories``, ``export_markets``, and ``uses_delivery_provider`` / ``uses_delivery_method`` — all narrow both numerator and denominator. Resolve exact filter and series values with ``get_queryable_values``. Returns one series per provider/method (each a monthly point list), plus a pre-rendered ``summary_for_llm``. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "entitled_markets": [ "string" ], "unauthorized_markets": [ "string" ], "markets_resolved": true, "dimension": "DeliveryShareDimension", "country_codes": [ "string" ], "months": 1, "data_as_of": "2023-01-01", "denominator_basis": "DenominatorBasis", "denominator_explanation": "Denominator Explanation", "filters_summary": "Filters Summary", "excluded_values": [ "string" ], "series": [ { "series_value": "Series Value", "points": [ { "month": "Month", "webshop_count": 1, "total_webshops": 1, "market_share_pct": 1.0 } ] } ], "total_series_available": 1, "unresolved_series": [ "string" ], "candidate_values": [ "string" ], "summary_for_llm": "Summary For Llm" } ``` **Output Schema:** ```json { "properties": { "entitled_markets": { "items": { "type": "string" }, "type": "array", "title": "Entitled Markets", "description": "Markets the caller's account is entitled to query (empty = no restriction)." }, "unauthorized_markets": { "items": { "type": "string" }, "type": "array", "title": "Unauthorized Markets", "description": "Requested markets dropped because they are outside the caller's entitlement." }, "markets_resolved": { "type": "boolean", "title": "Markets Resolved", "description": "False when every explicitly requested market is outside the caller's entitlement. No data was queried in that case; 'entitled_markets' lists the markets to retry with.", "default": true }, "dimension": { "type": "string", "enum": [ "delivery_provider", "delivery_method" ], "title": "DeliveryShareDimension", "description": "What a delivery-share calculation is split by." }, "country_codes": { "items": { "type": "string" }, "type": "array", "title": "Country Codes" }, "months": { "type": "integer", "title": "Months" }, "data_as_of": { "type": "string", "format": "date", "title": "Data As Of", "description": "Latest month with data anchoring the window." }, "denominator_basis": { "description": "The population a delivery-share percentage is measured *against* (baseline).\n\n* ``delivery`` \u2013 webshops with a known delivery provider\n (``webshop_delivery_provider_history``; derived from checkout + T&C signals).\n* ``checkout`` \u2013 webshops with a known delivery method at checkout\n (``webshop_checkout_history``).\n* ``market`` \u2013 all webshops in the segment (``webshop_history``), i.e. the\n provider/method's penetration of the whole market.\n* ``auto`` \u2013 pick the fact table that owns the pivot dimension\n (provider \u2192 ``delivery``, method \u2192 ``checkout``). This is the default.", "type": "string", "enum": [ "auto", "delivery", "checkout", "market" ], "title": "DenominatorBasis" }, "denominator_explanation": { "type": "string", "title": "Denominator Explanation", "description": "Plain-English statement of what the percentages are measured against." }, "filters_summary": { "type": "string", "title": "Filters Summary", "description": "Human-readable summary of segment filters." }, "excluded_values": { "items": { "type": "string" }, "type": "array", "title": "Excluded Values", "description": "Dimension values excluded from this calculation (echoed so the % is clear)." }, "series": { "items": { "properties": { "series_value": { "type": "string", "title": "Series Value", "description": "The provider/method/attribute value for this line." }, "points": { "items": { "properties": { "month": { "type": "string", "title": "Month", "description": "Year-month label, e.g. '2026-03'." }, "webshop_count": { "type": "integer", "title": "Webshop Count", "description": "Webshops in this series for the month (numerator)." }, "total_webshops": { "type": "integer", "title": "Total Webshops", "description": "Webshops in the baseline for the month (denominator)." }, "market_share_pct": { "type": "number", "title": "Market Share Pct", "description": "webshop_count / total_webshops \u00d7 100." } }, "type": "object", "required": [ "month", "webshop_count", "total_webshops", "market_share_pct" ], "title": "ShareDataPoint", "description": "One month's figures in a share series (numerator, denominator and percentage)." }, "type": "array", "title": "Points", "description": "Monthly points, oldest first." } }, "type": "object", "required": [ "series_value", "points" ], "title": "ShareSeries", "description": "One series (a single provider/method/attribute value) across the months." }, "type": "array", "title": "Series", "description": "One entry per included provider/method, each a monthly series." }, "total_series_available": { "type": "integer", "title": "Total Series Available", "description": "Distinct providers/methods in the segment (may exceed the returned series).", "default": 0 }, "unresolved_series": { "items": { "type": "string" }, "type": "array", "title": "Unresolved Series", "description": "Requested 'series_values' that had no data in this segment/market." }, "candidate_values": { "items": { "type": "string" }, "type": "array", "title": "Candidate Values", "description": "Largest values in this segment to retry with when some were unresolved." }, "summary_for_llm": { "type": "string", "title": "Summary For Llm" } }, "type": "object", "required": [ "dimension", "months", "data_as_of", "denominator_basis", "denominator_explanation", "filters_summary", "series", "summary_for_llm" ], "title": "DeliveryMarketShareTrendResponse", "description": "Response from the *calculate_delivery_market_share_trend* tool." } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
calculate_delivery_market_share_trend
Share of the webshop population by attribute (e.g. % exporting), trend or snapshot Returns what proportion of the webshop population carries a given attribute, as a monthly trend or a current-composition snapshot — the data behind population charts like "cross-border retailers' market share" (proportion of webshops that export). Unlike the delivery tools, this is a **population** metric: the denominator is always all webshops in the segment (``webshop_history``), not the delivery-tracked subset. **Attribute:** ``cross_border`` (default) tracks the single 'exporting' share; 'webshop_size', 'growth', and 'country' split the population into one series per value; 'product_category' splits by each webshop's single main product category (top ``top_n`` ∪ explicit ``attribute_values``). **Snapshot:** set ``latest_only`` to return just the most recent month (current composition) instead of the full trend. **Break down a provider's base:** combine the ``uses_delivery_provider`` (or ``uses_delivery_method``) segment filter with an attribute — e.g. ``uses_delivery_provider='gls'`` + ``attribute='product_category'`` gives the main-category mix of GLS's webshops. **Filters (segment):** ``cross_border``, size, growth, main-product-category, ``export_markets``, and ``uses_delivery_*``. Resolve exact values with ``get_queryable_values``. Returns a pre-rendered ``summary_for_llm``. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "entitled_markets": [ "string" ], "unauthorized_markets": [ "string" ], "markets_resolved": true, "attribute": "PopulationAttribute", "country_codes": [ "string" ], "months": 1, "latest_only": true, "data_as_of": "2023-01-01", "filters_summary": "Filters Summary", "series": [ { "series_value": "Series Value", "points": [ { "month": "Month", "webshop_count": 1, "total_webshops": 1, "market_share_pct": 1.0 } ] } ], "total_series_available": 1, "summary_for_llm": "Summary For Llm" } ``` **Output Schema:** ```json { "properties": { "entitled_markets": { "items": { "type": "string" }, "type": "array", "title": "Entitled Markets", "description": "Markets the caller's account is entitled to query (empty = no restriction)." }, "unauthorized_markets": { "items": { "type": "string" }, "type": "array", "title": "Unauthorized Markets", "description": "Requested markets dropped because they are outside the caller's entitlement." }, "markets_resolved": { "type": "boolean", "title": "Markets Resolved", "description": "False when every explicitly requested market is outside the caller's entitlement. No data was queried in that case; 'entitled_markets' lists the markets to retry with.", "default": true }, "attribute": { "type": "string", "enum": [ "cross_border", "webshop_size", "growth", "product_category", "country" ], "title": "PopulationAttribute", "description": "The webshop attribute whose share of the total population is tracked.\n\nThese are *population* metrics: the denominator is always all webshops in the\nsegment, and the series measure what proportion carry each attribute value." }, "country_codes": { "items": { "type": "string" }, "type": "array", "title": "Country Codes" }, "months": { "type": "integer", "title": "Months" }, "latest_only": { "type": "boolean", "title": "Latest Only", "description": "True when the response is a single-month snapshot.", "default": false }, "data_as_of": { "type": "string", "format": "date", "title": "Data As Of", "description": "Latest month with data anchoring the window." }, "filters_summary": { "type": "string", "title": "Filters Summary", "description": "Human-readable summary of segment filters." }, "series": { "items": { "properties": { "series_value": { "type": "string", "title": "Series Value", "description": "The provider/method/attribute value for this line." }, "points": { "items": { "properties": { "month": { "type": "string", "title": "Month", "description": "Year-month label, e.g. '2026-03'." }, "webshop_count": { "type": "integer", "title": "Webshop Count", "description": "Webshops in this series for the month (numerator)." }, "total_webshops": { "type": "integer", "title": "Total Webshops", "description": "Webshops in the baseline for the month (denominator)." }, "market_share_pct": { "type": "number", "title": "Market Share Pct", "description": "webshop_count / total_webshops \u00d7 100." } }, "type": "object", "required": [ "month", "webshop_count", "total_webshops", "market_share_pct" ], "title": "ShareDataPoint", "description": "One month's figures in a share series (numerator, denominator and percentage)." }, "type": "array", "title": "Points", "description": "Monthly points, oldest first." } }, "type": "object", "required": [ "series_value", "points" ], "title": "ShareSeries", "description": "One series (a single provider/method/attribute value) across the months." }, "type": "array", "title": "Series", "description": "One entry per attribute value, each a monthly series of its share of all webshops in the segment. For 'cross_border' a single 'exporting' series; with latest_only, each series carries a single point." }, "total_series_available": { "type": "integer", "title": "Total Series Available", "description": "Distinct attribute values in the segment (may exceed the returned series).", "default": 0 }, "summary_for_llm": { "type": "string", "title": "Summary For Llm" } }, "type": "object", "required": [ "attribute", "months", "data_as_of", "filters_summary", "series", "summary_for_llm" ], "title": "WebshopPopulationShareResponse", "description": "Response from the *calculate_webshop_population_share* tool." } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
calculate_webshop_population_share
Checkout positions, breadth and delivery terms (price, time) — snapshot Analyses how delivery providers (or delivery methods) are placed across checkout positions in one monthly snapshot — who holds position 1, how presence spreads across slots, how broad checkouts are, and what delivery terms apply per position: price, free-delivery threshold, and promised delivery time. The snapshot sibling of ``compare_checkout_positions_trend``. **Market scope:** ``domestic`` (default) analyses webshops' own-market checkouts. ``cross_border`` analyses what webshops offer consumers in OTHER markets: ``country_code`` scopes the source webshops' market(s) and ``target_country`` the destination(s) — e.g. Italy→Spain delivery terms = market_scope='cross_border', country_code='IT', target_country='ES', view='delivery_terms_by_position'. Cross-border data is currently a single snapshot (no ``snapshot_month``/``compare_month``); a ``target_country`` stratification is available for pathway cross-tabs. (Two segment filters are related but distinct, and apply in either scope: ``cross_border`` — whether a shop exports at all — and ``export_markets`` — declared export destinations, as country names. Neither selects the lane rows analysed; only ``target_country`` does.) **Views** (pick one per call): ``share_by_position`` – % split of providers/methods within each position (each position sums to 100%); ``position_distribution`` – per provider/method spread across positions plus best-position stats (median/avg, count at #1); ``provider_breadth`` – webshops bucketed by how many distinct real providers their checkout offers (1..5+); ``delivery_terms_by_position`` – delivery price, free-delivery-threshold and delivery-time stats per method × position, each with coverage percentages (delivery time is partially published — quote the coverage). **Time:** ``snapshot_month`` ('YYYY-MM', default latest snapshot) and optional ``compare_month`` add per-row deltas (e.g. '2026-01' for 'since the start of the year'). The response echoes the exact snapshot dates used. **Slicing:** ``positions`` (default 1–6), ``delivery_methods``, provider-count band, ``stratify_by`` (country, webshop_size, growth, product_category) for cross-tabs, plus the shared segment filters. Webshops count once per provider/method at their best position. Resolve exact filter values with ``get_queryable_values``. **Subject grounding:** ``subject`` defaults to the caller's own provider; ``subject_context`` reports its rank among providers above a materiality floor, the leader, and the immediate neighbours with webshop gaps — and those neighbours are always included in the rows regardless of ``top_n``. Returns rows for the chosen view plus a ``summary_for_llm``. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "snapshot_resolved": true, "candidate_months": [ "string" ], "entitled_markets": [ "string" ], "unauthorized_markets": [ "string" ], "markets_resolved": true, "view": "CheckoutPositionsView", "dimension": "CheckoutDimension", "market_scope": "MarketScope", "country_codes": [ "string" ], "target_countries": [ "string" ], "snapshot_only": true, "positions": [ 1 ], "filters_summary": "Filters Summary", "excluded_providers": [ "string" ], "subject_resolved": true, "candidate_values": [ "string" ], "total_values_available": 1, "position_rows": [ { "series_value": "Series Value", "position": 1, "webshop_count": 1, "position_total": 1, "value_total": 1, "share_of_position_pct": 1.0, "share_of_value_pct": 1.0 } ], "value_stats": [ { "series_value": "Series Value", "webshop_count": 1, "first_position_count": 1, "avg_best_position": 1.0, "median_best_position": 1.0, "p25_best_position": 1.0, "p75_best_position": 1.0 } ], "breadth_rows": [ { "providers_in_checkout": 1, "webshop_count": 1, "share_pct": 1.0 } ], "terms_rows": [ { "delivery_method": "Delivery Method", "position": 1, "webshop_count": 1, "price_coverage_pct": 1.0, "delivery_time_coverage_pct": 1.0 } ], "summary_for_llm": "Summary For Llm" } ``` **Output Schema:** ```json { "properties": { "snapshot_date": { "title": "Snapshot Date", "description": "Exact snapshot date the snapshot resolved to (null when unresolved or when the data source is a single undated snapshot)." }, "compare_date": { "title": "Compare Date", "description": "Exact snapshot date the comparison resolved to (null when no comparison)." }, "snapshot_resolved": { "type": "boolean", "title": "Snapshot Resolved", "description": "False when a requested month has no snapshot (or time addressing is unsupported for the scope). No data was queried in that case; 'candidate_months' lists months to retry with.", "default": true }, "candidate_months": { "items": { "type": "string" }, "type": "array", "title": "Candidate Months", "description": "Months ('YYYY-MM') with snapshots, newest first \u2014 retry options." }, "entitled_markets": { "items": { "type": "string" }, "type": "array", "title": "Entitled Markets", "description": "Markets the caller's account is entitled to query (empty = no restriction)." }, "unauthorized_markets": { "items": { "type": "string" }, "type": "array", "title": "Unauthorized Markets", "description": "Requested markets dropped because they are outside the caller's entitlement." }, "markets_resolved": { "type": "boolean", "title": "Markets Resolved", "description": "False when every explicitly requested market is outside the caller's entitlement. No data was queried in that case; 'entitled_markets' lists the markets to retry with.", "default": true }, "view": { "type": "string", "enum": [ "share_by_position", "position_distribution", "provider_breadth", "delivery_terms_by_position" ], "title": "CheckoutPositionsView", "description": "Which calculation the snapshot tool runs.\n\n* ``share_by_position`` \u2013 % split of providers/methods **within each\n position** (each position's shares sum to 100).\n* ``position_distribution`` \u2013 per provider/method: spread **across\n positions** plus best-position stats (median/avg, share at #1).\n* ``provider_breadth`` \u2013 webshops bucketed by how many distinct real\n providers their checkout offers (1..5+).\n* ``delivery_terms_by_position`` \u2013 delivery price, free-delivery-threshold\n and delivery-time stats per method \u00d7 position (per-metric coverage)." }, "dimension": { "type": "string", "enum": [ "delivery_provider", "delivery_method" ], "title": "CheckoutDimension", "description": "What the position analysis is split by." }, "market_scope": { "description": "Which delivery dataset a scope-aware tool analyses.\n\n* ``domestic`` \u2013 webshops' own-market delivery data (monthly history).\n* ``cross_border`` \u2013 what webshops offer consumers in *other* markets\n (source webshop \u2192 target market pathways). Currently a single snapshot:\n month/window addressing is not yet supported for this scope.\n\nNot to be confused with the *entitlement* market scope (``MarketScopeEcho``,\nISO country codes) or the ``cross_border`` segment filter (a webshop\nattribute: whether the shop exports at all).", "default": "domestic", "type": "string", "enum": [ "domestic", "cross_border" ], "title": "MarketScope" }, "country_codes": { "items": { "type": "string" }, "type": "array", "title": "Country Codes", "description": "Markets analysed (source markets for cross_border)." }, "target_countries": { "items": { "type": "string" }, "type": "array", "title": "Target Countries", "description": "cross_border: target markets analysed (empty = all)." }, "snapshot_only": { "type": "boolean", "title": "Snapshot Only", "description": "True when the scope's data source is a single undated snapshot (cross_border today): snapshot_date is null and month addressing is unavailable.", "default": false }, "positions": { "items": { "type": "integer" }, "type": "array", "title": "Positions", "description": "Positions included in the analysis." }, "stratify_by": { "description": "Stratification applied to the rows (echo)." }, "filters_summary": { "type": "string", "title": "Filters Summary", "description": "Human-readable one-liner of the active filters.", "default": "" }, "excluded_providers": { "items": { "type": "string" }, "type": "array", "title": "Excluded Providers", "description": "Non-carrier provider slugs excluded throughout." }, "subject": { "title": "Subject", "description": "Resolved subject (lower-cased): the request's, or the caller's own provider." }, "subject_resolved": { "type": "boolean", "title": "Subject Resolved", "description": "False when the requested subject has no data here; candidate_values lists alternatives.", "default": true }, "subject_context": { "description": "League-table standing of the subject (share/distribution views): rank among material providers/methods, plus the leader and the immediate neighbours with gaps. Ground provider-perspective answers in this." }, "candidate_values": { "items": { "type": "string" }, "type": "array", "title": "Candidate Values", "description": "Largest values in this segment \u2014 retry options when the subject is unresolved." }, "total_values_available": { "type": "integer", "title": "Total Values Available", "description": "Distinct providers/methods in the segment before top_n slicing.", "default": 0 }, "position_rows": { "items": { "properties": { "stratum": { "title": "Stratum", "description": "Stratification bucket (null when not stratified)." }, "series_value": { "type": "string", "title": "Series Value", "description": "Provider or method (canonical stored form)." }, "position": { "type": "integer", "title": "Position" }, "webshop_count": { "type": "integer", "title": "Webshop Count", "description": "Distinct webshops with this value at this position." }, "position_total": { "type": "integer", "title": "Position Total", "description": "All-values webshop total at this position (denominator of share_of_position_pct)." }, "value_total": { "type": "integer", "title": "Value Total", "description": "This value's webshop total across positions (denominator of share_of_value_pct)." }, "share_of_position_pct": { "type": "number", "title": "Share Of Position Pct", "description": "This value's share of position_total (%)." }, "share_of_value_pct": { "type": "number", "title": "Share Of Value Pct", "description": "This position's share of the value's own total (%)." }, "delta_webshop_count": { "title": "Delta Webshop Count", "description": "Change vs compare_month (snapshot minus comparison); null without comparison." }, "delta_share_of_position_pct": { "title": "Delta Share Of Position Pct" } }, "type": "object", "required": [ "series_value", "position", "webshop_count", "position_total", "value_total", "share_of_position_pct", "share_of_value_pct" ], "title": "PositionShareRow", "description": "One (value \u00d7 position) cell of the share/distribution views.\n\n``delta_*`` fields are snapshot minus compare_month (null without a comparison)." }, "type": "array", "title": "Position Rows", "description": "share_by_position and position_distribution views." }, "value_stats": { "items": { "properties": { "stratum": { "title": "Stratum" }, "series_value": { "type": "string", "title": "Series Value" }, "webshop_count": { "type": "integer", "title": "Webshop Count", "description": "Distinct webshops where the value appears at checkout." }, "first_position_count": { "type": "integer", "title": "First Position Count", "description": "Webshops where the value holds position 1." }, "avg_best_position": { "type": "number", "title": "Avg Best Position" }, "median_best_position": { "type": "number", "title": "Median Best Position" }, "p25_best_position": { "type": "number", "title": "P25 Best Position" }, "p75_best_position": { "type": "number", "title": "P75 Best Position" }, "delta_webshop_count": { "title": "Delta Webshop Count" }, "delta_first_position_count": { "title": "Delta First Position Count" }, "delta_avg_best_position": { "title": "Delta Avg Best Position" } }, "type": "object", "required": [ "series_value", "webshop_count", "first_position_count", "avg_best_position", "median_best_position", "p25_best_position", "p75_best_position" ], "title": "PositionStatsRow", "description": "Best-position statistics for one provider/method (position_distribution view).\n\n``delta_*`` fields are snapshot minus compare_month (null without a comparison)." }, "type": "array", "title": "Value Stats", "description": "position_distribution view only." }, "breadth_rows": { "items": { "properties": { "stratum": { "title": "Stratum" }, "providers_in_checkout": { "type": "integer", "title": "Providers In Checkout", "description": "Distinct real providers in the checkout (5 = '5 or more')." }, "webshop_count": { "type": "integer", "title": "Webshop Count" }, "share_pct": { "type": "number", "title": "Share Pct", "description": "Share of the stratum's webshops in this bucket." }, "delta_webshop_count": { "title": "Delta Webshop Count" } }, "type": "object", "required": [ "providers_in_checkout", "webshop_count", "share_pct" ], "title": "ProviderBreadthRow", "description": "One breadth bucket: webshops offering N distinct real providers." }, "type": "array", "title": "Breadth Rows", "description": "provider_breadth view only." }, "terms_rows": { "items": { "properties": { "stratum": { "title": "Stratum" }, "delivery_method": { "type": "string", "title": "Delivery Method" }, "position": { "type": "integer", "title": "Position" }, "webshop_count": { "type": "integer", "title": "Webshop Count", "description": "Distinct webshops with offers in this cell." }, "avg_price_eur": { "title": "Avg Price Eur" }, "median_price_eur": { "title": "Median Price Eur" }, "p25_price_eur": { "title": "P25 Price Eur" }, "p75_price_eur": { "title": "P75 Price Eur" }, "price_coverage_pct": { "type": "number", "title": "Price Coverage Pct", "description": "Share of the cell's offers with a published price." }, "free_delivery_pct": { "title": "Free Delivery Pct", "description": "Share of priced offers at \u20ac0 (null when nothing is priced)." }, "median_free_threshold_eur": { "title": "Median Free Threshold Eur", "description": "Median free-delivery spend threshold where published." }, "median_delivery_time_min_days": { "title": "Median Delivery Time Min Days", "description": "Median of the promised delivery-window start (days)." }, "median_delivery_time_max_days": { "title": "Median Delivery Time Max Days", "description": "Median of the promised delivery-window end (days)." }, "delivery_time_coverage_pct": { "type": "number", "title": "Delivery Time Coverage Pct", "description": "Share of the cell's offers with a published delivery time." }, "delta_median_price_eur": { "title": "Delta Median Price Eur" } }, "type": "object", "required": [ "delivery_method", "position", "webshop_count", "price_coverage_pct", "delivery_time_coverage_pct" ], "title": "DeliveryTermsRow", "description": "Delivery-terms statistics for one method \u00d7 position cell.\n\nTerms columns have partial coverage in the data, so every metric is\ncomputed over its published subset and paired with a coverage percentage \u2014\nquote the coverage when generalising from a metric." }, "type": "array", "title": "Terms Rows", "description": "delivery_terms_by_position view only." }, "summary_for_llm": { "type": "string", "title": "Summary For Llm", "description": "Pre-rendered narrative of the result, with absolute counts \u2014 quote from this.", "default": "" } }, "type": "object", "required": [ "view", "dimension" ], "title": "CompareCheckoutPositionsResponse", "description": "Response from *compare_checkout_positions*. Only the requested view's rows are populated." } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
compare_checkout_positions
Monthly checkout position trend by provider or method Tracks checkout positions month by month: per provider (or delivery method), the number of webshops where it appears at checkout, how many list it first, and its average/median best position. Domestic checkout data only. The trend sibling of ``compare_checkout_positions`` — same filters and dedupe convention, monthly series instead of one snapshot. Series are the top ``top_n`` providers/methods by latest-month presence, plus the caller's own provider (always included as a series and summarised — ``subject``), plus any ``series_values`` (resolve exact values with ``get_queryable_values``). For a head-to-head against your immediate rivals, take ``ahead``/``behind`` from ``compare_checkout_positions``' ``subject_context`` and pass them as ``series_values``. Window is the trailing ``months`` (default 12) anchored on the latest snapshot. ``positions``, ``delivery_methods``, provider-count band, and the shared segment filters apply. Returns per-series monthly points with start-to-end changes and a ``summary_for_llm``. For month-vs-month position share deltas, prefer the snapshot tool with ``compare_month``. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "entitled_markets": [ "string" ], "unauthorized_markets": [ "string" ], "markets_resolved": true, "dimension": "CheckoutDimension", "country_codes": [ "string" ], "months": 1, "positions": [ 1 ], "filters_summary": "Filters Summary", "excluded_providers": [ "string" ], "subject_resolved": true, "series": [ { "series_value": "Series Value", "points": [ { "month": "Month", "webshop_count": 1, "first_position_count": 1, "avg_best_position": 1.0, "median_best_position": 1.0 } ], "change_webshop_count": 1, "change_first_position_count": 1, "change_avg_best_position": 1.0 } ], "total_series_available": 1, "unresolved_series": [ "string" ], "candidate_values": [ "string" ], "summary_for_llm": "Summary For Llm" } ``` **Output Schema:** ```json { "properties": { "entitled_markets": { "items": { "type": "string" }, "type": "array", "title": "Entitled Markets", "description": "Markets the caller's account is entitled to query (empty = no restriction)." }, "unauthorized_markets": { "items": { "type": "string" }, "type": "array", "title": "Unauthorized Markets", "description": "Requested markets dropped because they are outside the caller's entitlement." }, "markets_resolved": { "type": "boolean", "title": "Markets Resolved", "description": "False when every explicitly requested market is outside the caller's entitlement. No data was queried in that case; 'entitled_markets' lists the markets to retry with.", "default": true }, "dimension": { "type": "string", "enum": [ "delivery_provider", "delivery_method" ], "title": "CheckoutDimension", "description": "What the position analysis is split by." }, "country_codes": { "items": { "type": "string" }, "type": "array", "title": "Country Codes" }, "months": { "type": "integer", "title": "Months", "default": 12 }, "data_as_of": { "title": "Data As Of", "description": "Latest month present ('yyyy-MM')." }, "positions": { "items": { "type": "integer" }, "type": "array", "title": "Positions" }, "filters_summary": { "type": "string", "title": "Filters Summary", "default": "" }, "excluded_providers": { "items": { "type": "string" }, "type": "array", "title": "Excluded Providers" }, "subject": { "title": "Subject", "description": "Resolved subject (lower-cased): the request's, or the caller's own provider." }, "subject_resolved": { "type": "boolean", "title": "Subject Resolved", "description": "False when the subject has no checkout data in this segment; candidate_values lists alternatives.", "default": true }, "series": { "items": { "properties": { "series_value": { "type": "string", "title": "Series Value" }, "points": { "items": { "properties": { "month": { "type": "string", "title": "Month", "description": "Month label 'yyyy-MM'." }, "webshop_count": { "type": "integer", "title": "Webshop Count", "description": "Distinct webshops where the value appears at checkout." }, "first_position_count": { "type": "integer", "title": "First Position Count" }, "avg_best_position": { "type": "number", "title": "Avg Best Position" }, "median_best_position": { "type": "number", "title": "Median Best Position" } }, "type": "object", "required": [ "month", "webshop_count", "first_position_count", "avg_best_position", "median_best_position" ], "title": "CheckoutPositionsTrendPoint", "description": "One month of a positions trend series." }, "type": "array", "title": "Points" }, "change_webshop_count": { "type": "integer", "title": "Change Webshop Count", "description": "Last minus first point." }, "change_first_position_count": { "type": "integer", "title": "Change First Position Count" }, "change_avg_best_position": { "type": "number", "title": "Change Avg Best Position" } }, "type": "object", "required": [ "series_value", "points", "change_webshop_count", "change_first_position_count", "change_avg_best_position" ], "title": "CheckoutPositionsTrendSeries", "description": "Monthly positions series for one provider/method.\n\n``change_*`` fields are the last point minus the first (the window's net move)." }, "type": "array", "title": "Series" }, "total_series_available": { "type": "integer", "title": "Total Series Available", "default": 0 }, "unresolved_series": { "items": { "type": "string" }, "type": "array", "title": "Unresolved Series", "description": "Requested series_values with no data in this segment." }, "candidate_values": { "items": { "type": "string" }, "type": "array", "title": "Candidate Values", "description": "Largest values in this segment \u2014 retry options for unresolved series/subject." }, "summary_for_llm": { "type": "string", "title": "Summary For Llm", "description": "Pre-rendered narrative of the result, with absolute counts \u2014 quote from this.", "default": "" } }, "type": "object", "required": [ "dimension" ], "title": "CompareCheckoutPositionsTrendResponse", "description": "Response from *compare_checkout_positions_trend*." } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
compare_checkout_positions_trend
Compare delivery prices by provider and method at a point in time Compares the delivery prices webshops display at checkout, by delivery provider and method, over a trailing window ending at the latest month with data. The point-in-time sibling of ``compare_delivery_pricing_trend``. **Per-webshop method:** each shop contributes its latest in-band price (weighted once), matching the dashboards — not a raw row average. Returns a robust distribution per group: mean, **median**, p25/p75, min/max, and **free-delivery %**. **Market scope:** ``domestic`` (default) prices webshops' own-market checkouts. ``cross_border`` prices what webshops charge consumers in OTHER markets: ``country_code`` scopes the source webshops' market(s) and ``target_country`` the destination(s) — e.g. Italy→Spain checkout prices = market_scope='cross_border', country_code='IT', target_country='ES'. A ``target_country`` stratification gives per-lane cross-tabs. Cross-border data is a single current snapshot (``period_months`` is ignored; the response sets ``snapshot_only``); classification and free-threshold coverage are lower than domestic, and lanes are thinner — consider lowering ``min_webshops`` for narrow lanes. (Two segment filters are related but distinct, and apply in either scope: ``cross_border`` — whether a shop exports at all — and ``export_markets`` — declared export destinations, as country names. Neither selects the lane rows analysed; only ``target_country`` does.) **Grain:** price is method-specific, so groups are ``(provider, delivery_method)`` by default. Set ``breakdown_by_method=false`` for a method-blind provider average; narrow with ``delivery_methods``; add a ``stratify_by`` segment (size, country, cross_border, …) for deeper comparison. **Subject:** pass ``subject`` (or rely on the caller's own provider) to get its prices vs the market median. **Outliers:** prices above ``max_price_eur`` (default 20) are dropped; groups below ``min_webshops`` are excluded. Segment filters (``cross_border``, size, growth, main-product-category, ``export_markets``, ``uses_delivery_*``) apply as elsewhere. Returns a ``summary_for_llm``. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "entitled_markets": [ "string" ], "unauthorized_markets": [ "string" ], "markets_resolved": true, "market_scope": "MarketScope", "country_codes": [ "string" ], "target_countries": [ "string" ], "snapshot_only": true, "period_months": 1, "breakdown_by_method": true, "price_band": "Price Band", "min_webshops": 1, "filters_summary": "Filters Summary", "subject_resolved": true, "candidate_values": [ "string" ], "rows": [ { "delivery_provider": "Delivery Provider", "avg_price_eur": 1.0, "median_price_eur": 1.0, "p25_price_eur": 1.0, "p75_price_eur": 1.0, "min_price_eur": 1.0, "max_price_eur": 1.0, "free_delivery_pct": 1.0, "free_threshold_pct": 1.0, "webshop_count": 1 } ], "total_groups_available": 1, "summary_for_llm": "Summary For Llm" } ``` **Output Schema:** ```json { "properties": { "entitled_markets": { "items": { "type": "string" }, "type": "array", "title": "Entitled Markets", "description": "Markets the caller's account is entitled to query (empty = no restriction)." }, "unauthorized_markets": { "items": { "type": "string" }, "type": "array", "title": "Unauthorized Markets", "description": "Requested markets dropped because they are outside the caller's entitlement." }, "markets_resolved": { "type": "boolean", "title": "Markets Resolved", "description": "False when every explicitly requested market is outside the caller's entitlement. No data was queried in that case; 'entitled_markets' lists the markets to retry with.", "default": true }, "market_scope": { "description": "Which delivery dataset a scope-aware tool analyses.\n\n* ``domestic`` \u2013 webshops' own-market delivery data (monthly history).\n* ``cross_border`` \u2013 what webshops offer consumers in *other* markets\n (source webshop \u2192 target market pathways). Currently a single snapshot:\n month/window addressing is not yet supported for this scope.\n\nNot to be confused with the *entitlement* market scope (``MarketScopeEcho``,\nISO country codes) or the ``cross_border`` segment filter (a webshop\nattribute: whether the shop exports at all).", "default": "domestic", "type": "string", "enum": [ "domestic", "cross_border" ], "title": "MarketScope" }, "country_codes": { "items": { "type": "string" }, "type": "array", "title": "Country Codes", "description": "Markets analysed (source markets for cross_border)." }, "target_countries": { "items": { "type": "string" }, "type": "array", "title": "Target Countries", "description": "cross_border: target markets analysed (empty = all)." }, "snapshot_only": { "type": "boolean", "title": "Snapshot Only", "description": "True when the scope's data source is a single undated snapshot (cross_border today): data_as_of is null and window addressing is unavailable.", "default": false }, "period_months": { "type": "integer", "title": "Period Months" }, "data_as_of": { "title": "Data As Of", "description": "Latest month with data anchoring the window (null when the data source is a single undated snapshot)." }, "breakdown_by_method": { "type": "boolean", "title": "Breakdown By Method" }, "stratify_by": {}, "price_band": { "type": "string", "title": "Price Band", "description": "The applied outlier price band, e.g. '\u20ac0\u2013\u20ac20'." }, "min_webshops": { "type": "integer", "title": "Min Webshops" }, "filters_summary": { "type": "string", "title": "Filters Summary", "description": "Human-readable summary of segment filters." }, "subject": { "title": "Subject", "description": "The highlighted provider, if any." }, "subject_resolved": { "type": "boolean", "title": "Subject Resolved", "description": "False when a subject was requested but has no eligible pricing data.", "default": true }, "candidate_values": { "items": { "type": "string" }, "type": "array", "title": "Candidate Values", "description": "Providers with eligible pricing data to retry with when unresolved." }, "rows": { "items": { "properties": { "delivery_provider": { "type": "string", "title": "Delivery Provider" }, "delivery_method": { "title": "Delivery Method", "description": "Null when breakdown_by_method is false (method-blind average)." }, "stratum": { "title": "Stratum", "description": "The stratify_by value, when stratified." }, "checkout_position": { "title": "Checkout Position", "description": "Checkout position bucket (1/2/3/4+) when by_checkout_position is set." }, "avg_price_eur": { "type": "number", "title": "Avg Price Eur", "description": "Per-webshop mean delivery price (EUR)." }, "median_price_eur": { "type": "number", "title": "Median Price Eur", "description": "Per-webshop median \u2014 the robust headline." }, "p25_price_eur": { "type": "number", "title": "P25 Price Eur" }, "p75_price_eur": { "type": "number", "title": "P75 Price Eur" }, "min_price_eur": { "type": "number", "title": "Min Price Eur" }, "max_price_eur": { "type": "number", "title": "Max Price Eur" }, "free_delivery_pct": { "type": "number", "title": "Free Delivery Pct", "description": "Share of webshops in this group offering free delivery (price \u20ac0)." }, "free_threshold_pct": { "type": "number", "title": "Free Threshold Pct", "description": "Share of webshops publishing a free-delivery spend threshold (free above \u20acX)." }, "median_free_threshold_eur": { "title": "Median Free Threshold Eur", "description": "Median free-delivery spend threshold among shops that publish one (EUR)." }, "webshop_count": { "type": "integer", "title": "Webshop Count", "description": "Distinct webshops contributing to this group." } }, "type": "object", "required": [ "delivery_provider", "avg_price_eur", "median_price_eur", "p25_price_eur", "p75_price_eur", "min_price_eur", "max_price_eur", "free_delivery_pct", "free_threshold_pct", "webshop_count" ], "title": "DeliveryPricingRow", "description": "Per-webshop price distribution for one (provider, method[, stratum]) group." }, "type": "array", "title": "Rows", "description": "Per-group price distributions, ordered cheapest average first." }, "total_groups_available": { "type": "integer", "title": "Total Groups Available", "description": "Eligible groups in the segment (may exceed the returned rows).", "default": 0 }, "summary_for_llm": { "type": "string", "title": "Summary For Llm" } }, "type": "object", "required": [ "period_months", "breakdown_by_method", "price_band", "min_webshops", "filters_summary", "rows", "summary_for_llm" ], "title": "DeliveryPricingResponse", "description": "Response from the *compare_delivery_pricing* tool." } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
compare_delivery_pricing
Monthly delivery-price trend by provider and method Returns a monthly per-webshop average delivery-price series per provider (or provider × delivery method) — the data behind the Market Intelligence 'Average delivery price' line charts. The trend sibling of ``compare_delivery_pricing``. Domestic (own-market) prices only — for cross-border/export prices use the snapshot tool with market_scope='cross_border' (that data has no monthly history yet). Each shop contributes its latest in-band price per month (weighted once). Series are the top ``top_n`` providers by latest-month webshop count plus any ``series_values``; ``breakdown_by_method`` and ``delivery_methods`` control the method split (narrow the methods to keep the number of lines readable). Outlier band (``max_price_eur`` default 20) and the shared segment filters (``cross_border``, size, growth, main-product-category, ``export_markets``, ``uses_delivery_*``) apply. Returns a ``summary_for_llm``. For distributions / subject-vs-market comparison, use ``compare_delivery_pricing``. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "entitled_markets": [ "string" ], "unauthorized_markets": [ "string" ], "markets_resolved": true, "country_codes": [ "string" ], "months": 1, "data_as_of": "2023-01-01", "breakdown_by_method": true, "price_band": "Price Band", "filters_summary": "Filters Summary", "series": [ { "delivery_provider": "Delivery Provider", "points": [ { "month": "Month", "avg_price_eur": 1.0, "webshop_count": 1 } ], "start_price_eur": 1.0, "end_price_eur": 1.0, "change_eur": 1.0, "change_pct": 1.0 } ], "total_series_available": 1, "unresolved_series": [ "string" ], "candidate_values": [ "string" ], "summary_for_llm": "Summary For Llm" } ``` **Output Schema:** ```json { "properties": { "entitled_markets": { "items": { "type": "string" }, "type": "array", "title": "Entitled Markets", "description": "Markets the caller's account is entitled to query (empty = no restriction)." }, "unauthorized_markets": { "items": { "type": "string" }, "type": "array", "title": "Unauthorized Markets", "description": "Requested markets dropped because they are outside the caller's entitlement." }, "markets_resolved": { "type": "boolean", "title": "Markets Resolved", "description": "False when every explicitly requested market is outside the caller's entitlement. No data was queried in that case; 'entitled_markets' lists the markets to retry with.", "default": true }, "country_codes": { "items": { "type": "string" }, "type": "array", "title": "Country Codes" }, "months": { "type": "integer", "title": "Months" }, "data_as_of": { "type": "string", "format": "date", "title": "Data As Of", "description": "Latest month with data anchoring the window." }, "breakdown_by_method": { "type": "boolean", "title": "Breakdown By Method" }, "price_band": { "type": "string", "title": "Price Band", "description": "The applied outlier price band, e.g. '\u20ac0\u2013\u20ac20'." }, "filters_summary": { "type": "string", "title": "Filters Summary", "description": "Human-readable summary of segment filters." }, "series": { "items": { "properties": { "delivery_provider": { "type": "string", "title": "Delivery Provider" }, "delivery_method": { "title": "Delivery Method", "description": "Null when breakdown_by_method is false." }, "points": { "items": { "properties": { "month": { "type": "string", "title": "Month", "description": "Year-month label, e.g. '2026-03'." }, "avg_price_eur": { "type": "number", "title": "Avg Price Eur" }, "webshop_count": { "type": "integer", "title": "Webshop Count" } }, "type": "object", "required": [ "month", "avg_price_eur", "webshop_count" ], "title": "PricingTrendPoint", "description": "One monthly point: the per-webshop average price for a series." }, "type": "array", "title": "Points", "description": "Monthly points, oldest first." }, "start_price_eur": { "type": "number", "title": "Start Price Eur", "description": "Average price in the earliest month shown." }, "end_price_eur": { "type": "number", "title": "End Price Eur", "description": "Average price in the latest month shown." }, "change_eur": { "type": "number", "title": "Change Eur", "description": "end_price_eur \u2212 start_price_eur." }, "change_pct": { "type": "number", "title": "Change Pct", "description": "Percentage change from start to end (0 if start is 0)." } }, "type": "object", "required": [ "delivery_provider", "points", "start_price_eur", "end_price_eur", "change_eur", "change_pct" ], "title": "PricingTrendSeries", "description": "One series \u2014 a provider, or a (provider, method) pair \u2014 across the months." }, "type": "array", "title": "Series", "description": "One monthly average-price series per provider (or provider\u00d7method)." }, "total_series_available": { "type": "integer", "title": "Total Series Available", "description": "Distinct series in the segment (may exceed those returned).", "default": 0 }, "unresolved_series": { "items": { "type": "string" }, "type": "array", "title": "Unresolved Series", "description": "Requested providers with no priced data in this segment." }, "candidate_values": { "items": { "type": "string" }, "type": "array", "title": "Candidate Values", "description": "Providers with priced data to retry with when some were unresolved." }, "summary_for_llm": { "type": "string", "title": "Summary For Llm" } }, "type": "object", "required": [ "months", "data_as_of", "breakdown_by_method", "price_band", "filters_summary", "series", "summary_for_llm" ], "title": "DeliveryPricingTrendResponse", "description": "Response from the *compare_delivery_pricing_trend* tool." } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
compare_delivery_pricing_trend
List or search the queryable values for an analytics dimension Returns the real, queryable values that exist in the analytics data for a dimension, so you can resolve a user's free-text reference to the exact token the other tools expect — always prefer this over guessing a value. **Two modes, selected by dimension:** - Enumerate — `delivery_provider`, `delivery_method`, `country`, `platform`, `product_category`, `webshop_size`, `growth`, `export_market` (country names of declared export destinations — the values the `export_markets` segment filter takes), `target_country` (ISO codes of cross-border checkout destinations — the values the market-intelligence tools' `target_country` parameter takes), `product_dimension`: returns the full (or top-N) set of values, ranked by webshop count. - Search — `brand`, `company`, `domain` (high cardinality): a `query` term is **required**; returns ranked name matches. **Each value** carries a `canonical_value` to pass verbatim to other tools, a `label`, and—where meaningful—a `webshop_count` for materiality. Id-keyed dimensions (`product_category`, `product_dimension`, `brand`, `company`, `domain`) also return a `value_id`. Ordinal dimensions (`webshop_size`, `growth`, `product_dimension`) include an `order` (low→high), and `webshop_size` a `score_range`, so comparative phrasing such as 'above-average size' resolves to a contiguous set. Non-selectable placeholders (e.g. 'unknown') are flagged with `is_sentinel: true`. **Scope:** market-specific dimensions (`delivery_provider`, `delivery_method`, `platform`, `product_category`, `webshop_size`, `growth`, `export_market`, `target_country`) default to the caller's home market and can be overridden with a single `country_code`; the `country` dimension lists all available markets. Enumerated values for dated dimensions reflect recent activity (the current market), not all history. **Filtering / example:** for enumerate dimensions, pass `query` to narrow by substring (e.g. 'postn' → 'postnord', 'postnl'). To answer a question about 'Royal Mail', call with dimension='delivery_provider' to find 'royal_mail', then pass that `canonical_value` to the market-intelligence tools. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "entitled_markets": [ "string" ], "unauthorized_markets": [ "string" ], "markets_resolved": true, "dimension": "DimensionName", "mode": "Mode", "country_codes": [ "string" ], "total_values": 1, "returned": 1, "values": [ { "canonical_value": "Canonical Value", "label": "Label", "is_sentinel": true } ], "summary_for_llm": "Summary For Llm" } ``` **Output Schema:** ```json { "properties": { "entitled_markets": { "items": { "type": "string" }, "type": "array", "title": "Entitled Markets", "description": "Markets the caller's account is entitled to query (empty = no restriction)." }, "unauthorized_markets": { "items": { "type": "string" }, "type": "array", "title": "Unauthorized Markets", "description": "Requested markets dropped because they are outside the caller's entitlement." }, "markets_resolved": { "type": "boolean", "title": "Markets Resolved", "description": "False when every explicitly requested market is outside the caller's entitlement. No data was queried in that case; 'entitled_markets' lists the markets to retry with.", "default": true }, "dimension": { "type": "string", "enum": [ "delivery_provider", "delivery_method", "country", "platform", "product_category", "webshop_size", "growth", "export_market", "target_country", "product_dimension", "brand", "company", "domain" ], "title": "DimensionName", "description": "Dimensions whose queryable values can be discovered." }, "mode": { "type": "string", "enum": [ "enumerate", "search" ], "title": "Mode", "description": "How values were resolved: full enumeration vs name search." }, "country_codes": { "items": { "type": "string" }, "type": "array", "title": "Country Codes", "description": "Market scope applied (empty = not scoped / all markets)." }, "total_values": { "type": "integer", "title": "Total Values", "description": "Total distinct values/matches for this dimension, scope, and filter." }, "returned": { "type": "integer", "title": "Returned", "description": "Number of values included in this response." }, "values": { "items": { "properties": { "canonical_value": { "type": "string", "title": "Canonical Value", "description": "The value to pass verbatim to other tools (the stored token for value-keyed dimensions; the canonical name for id-keyed ones like category/brand)." }, "label": { "type": "string", "title": "Label", "description": "Human-readable label for matching against user phrasing." }, "value_id": { "title": "Value Id", "description": "Underlying key for id-keyed dimensions (e.g. category_id, brand_id, domain_id). Use when a downstream tool filters on the id rather than the name." }, "webshop_count": { "title": "Webshop Count", "description": "Distinct webshops with this value \u2014 a measure of materiality. Null when not applicable (e.g. search results)." }, "order": { "title": "Order", "description": "1-based rank for ordinal dimensions (low \u2192 high), e.g. small=1 \u2026 very_large=4. Null for non-ordinal dimensions." }, "score_range": { "title": "Score Range", "description": "For 'webshop_size': the [min, max] of the underlying 0\u2013100 size score this bucket covers (e.g. 'large' \u2192 [50, 74]). Null otherwise." }, "is_sentinel": { "type": "boolean", "title": "Is Sentinel", "description": "True when the value is a non-selectable placeholder (e.g. 'unknown', 'collect_yourself') rather than a real carrier/option.", "default": false } }, "type": "object", "required": [ "canonical_value", "label" ], "title": "QueryableValue", "description": "A single queryable value for a dimension." }, "type": "array", "title": "Values" }, "summary_for_llm": { "type": "string", "title": "Summary For Llm", "description": "Pre-rendered narrative listing the most material values for direct LLM use." } }, "type": "object", "required": [ "dimension", "mode", "total_values", "returned", "values", "summary_for_llm" ], "title": "QueryableValuesResponse", "description": "Response from the *get_queryable_values* tool." } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
get_queryable_values
Fetch a report's rendered HTML + metadata (to read or to clone) Returns a single report's rendered HTML plus its metadata — to preview/read it (e.g. verify what you just pushed) or to clone it locally for editing. Get ``report_id`` from ``list_reports`` or from a prior ``push_report``'s ``id``. The HTML is the figure-injected render the customer sees — numbers are baked in, not ``{{fig:token}}`` placeholders. ``figures`` is included for provenance only and is NOT in the shape ``push_report`` expects — rebuild bindings from your sources rather than feeding it back. To re-publish an edited clone, re-introduce ``{{fig:token}}`` placeholders and bind them in ``figures`` via ``push_report`` (pushing baked-in numbers trips the inline-number guard), and re-stamp the edited HTML with the report-to-tembi-style skill (editing invalidates the ``tembi-restyle`` hash). Pass ``release_id`` to fetch a specific version: a prior published version, or a **draft** you just pushed (use the ``release_id`` returned by ``push_report``). Omit ``release_id`` for the current published version — a bare fetch never returns an unpublished draft, and returns **empty** for a report that has never been published (e.g. one you just created), so pass the ``release_id`` to see that draft. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "id": "Id", "title": "Title", "markets": [ "string" ], "required_modules": [ "string" ], "html": "Html", "figures": {}, "summary_for_llm": "Summary For Llm" } ``` **Output Schema:** ```json { "properties": { "id": { "type": "string", "title": "Id" }, "title": { "type": "string", "title": "Title" }, "status": { "title": "Status" }, "markets": { "items": { "type": "string" }, "type": "array", "title": "Markets", "default": [] }, "required_modules": { "items": { "type": "string" }, "type": "array", "title": "Required Modules", "default": [] }, "ai_summary": { "title": "Ai Summary" }, "data_as_of": { "title": "Data As Of" }, "generated_on": { "title": "Generated On" }, "html": { "type": "string", "title": "Html", "description": "Rendered report HTML (figures injected, numbers baked in).", "default": "" }, "figures": { "additionalProperties": true, "type": "object", "title": "Figures", "description": "token -> figure binding used at render (provenance only)." }, "summary_for_llm": { "type": "string", "title": "Summary For Llm" } }, "type": "object", "required": [ "id", "title", "summary_for_llm" ], "title": "ReportContentResponse" } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
get_report_content
Return the authenticated Tembi user's identity, permissions, and market scope Resolves the caller's Auth0 JWT to their Tembi user record and returns the identity, permissions, and market/provider scope needed to parameterise the other tools. **Market scope:** 'country_code' is the user's default/locale market, applied only when a tool call omits one — it is not a restriction. 'market_intelligence_markets' lists the markets the user may actually query. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "user_id": "User Id", "is_admin": true, "custom_only": true, "modules": [ "string" ], "products_access": [ "string" ], "market_intelligence_markets": [ "string" ], "timestamp": "2023-01-01T00:00:00Z" } ``` **Output Schema:** ```json { "properties": { "user_id": { "type": "string", "title": "User Id", "description": "Tembi user ID (Auth0 subject)." }, "email": { "title": "Email", "description": "User's email address." }, "user_name": { "title": "User Name", "description": "Display name as stored in Tembi." }, "language": { "title": "Language", "description": "Preferred language code." }, "country_code": { "title": "Country Code", "description": "The user's default/locale market (ISO 3166-1 alpha-2, e.g. 'DK'). A convenience default applied when a tool call omits a market \u2014 not a restriction. The markets the user may query are in 'market_intelligence_markets'." }, "currency": { "title": "Currency", "description": "User's preferred currency code (e.g. 'DKK')." }, "providers": { "title": "Providers", "description": "Comma-separated delivery provider slug(s) (e.g. 'gls' or 'gls,bring')." }, "delivery_providers": { "title": "Delivery Providers", "description": "Delivery provider slugs as a list (e.g. ['gls'])." }, "is_admin": { "type": "boolean", "title": "Is Admin", "description": "Whether the user has admin privileges.", "default": false }, "custom_only": { "type": "boolean", "title": "Custom Only", "description": "When true, the user only has access to their own customer's data.", "default": false }, "modules": { "items": { "type": "string" }, "type": "array", "title": "Modules", "description": "Permission modules the user has access to." }, "products_access": { "items": { "type": "string" }, "type": "array", "title": "Products Access", "description": "Product access slugs granted to the user." }, "market_intelligence_markets": { "items": { "type": "string" }, "type": "array", "title": "Market Intelligence Markets", "description": "Markets (ISO country codes) this user may run the market-intelligence tools for. Empty = no explicit restriction (e.g. internal users may query any market)." }, "access_markets": { "title": "Access Markets", "description": "Markets (ISO country codes) this user has access to across Tembi products. None / empty = no explicit restriction (e.g. internal users)." }, "countries": { "title": "Countries", "description": "Countries/markets the customer organisation has access to." }, "domain_business_model": { "title": "Domain Business Model", "description": "Business model filter(s) active for this user (e.g. ['b2c'])." }, "customer": { "description": "Customer/organisation metadata (when requested)." }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp", "description": "Server-side UTC timestamp of the invocation." } }, "type": "object", "required": [ "user_id", "timestamp" ], "title": "UserContextResponse", "description": "Response from the *get_user_context* tool.\n\nScoped to what an agent needs to parameterise the other tools \u2014 identity,\npermissions, and market/provider scope." } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
get_user_context
List the reports visible to the calling user Lists every report visible to the authenticated user (own customer scope). Start here to find a report ``id`` before fetching it with ``get_report_content`` or revising it via ``push_report``'s ``report_id``. Each entry: ``id``; ``title``; ``status`` (``draft`` = unpublished, or ``published`` = signed off and customer-visible); ``markets`` (ISO country codes, e.g. ``["DK","SE"]``); ``data_as_of`` (when the underlying figures were sourced); ``generated_on`` (when this version was rendered/pushed). One row per report, showing its latest version. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "reports": [ { "id": "Id", "title": "Title", "markets": [ "string" ] } ], "summary_for_llm": "Summary For Llm" } ``` **Output Schema:** ```json { "properties": { "reports": { "items": { "properties": { "id": { "type": "string", "title": "Id" }, "title": { "type": "string", "title": "Title" }, "status": { "title": "Status" }, "markets": { "items": { "type": "string" }, "type": "array", "title": "Markets", "default": [] }, "data_as_of": { "title": "Data As Of" }, "generated_on": { "title": "Generated On" } }, "type": "object", "required": [ "id", "title" ], "title": "ReportSummary" }, "type": "array", "title": "Reports", "default": [] }, "summary_for_llm": { "type": "string", "title": "Summary For Llm" } }, "type": "object", "required": [ "summary_for_llm" ], "title": "ListReportsResponse" } ```
list_reports
List webshops matching flexible segment + checkout filters Returns webshops matching any combination of the supported filters. Every filter is optional and AND-combined; each returned row carries the attributes the filter probed so the caller can quote concrete match evidence without a second call. **Segment filters:** ``country_code``, ``cross_border``, ``size_categories`` / ``size_indication_min`` / ``size_indication_max``, ``growth_categories``, ``product_categories`` (main product category), ``export_markets``, ``platforms`` (e-commerce framework), ``uses_delivery_provider`` / ``uses_delivery_method`` (point-in-time membership in the latest month with data). **Negative filter:** ``exclude`` is a dict mapping any of those same dimension names to values to EXCLUDE — e.g. ``exclude={'uses_delivery_method': ['parcel_box']}`` combined with ``uses_delivery_provider=['postnord']`` returns PostNord webshops that do NOT offer box delivery. Values are auto-resolved the same way as positive filters. **Checkout filters** (apply to each shop's latest checkout scrape day by default; a shop qualifies when ≥ 1 offer satisfies ALL provided predicates): ``max_checkout_position``, ``min_delivery_price_eur`` / ``max_delivery_price_eur``, ``delivery_time_contains`` (case-insensitive substring, e.g. ['same day','1 day']). When any checkout filter is used, ``matched_checkouts`` on each row lists the qualifying offer(s) — narrowed to the requested provider/method when those filters are also set. **Historical checkout mode:** pass ``date_from`` and/or ``date_to`` (YYYY-MM, e.g. ``date_from='2025-06'``, ``date_to='2026-01'``) to scope checkout filters over a date window instead of the latest snapshot. Each ``matched_checkouts`` entry then aggregates per (provider, method) across the window and carries earliest observations (``previous_*``), latest observations, ``months_present`` and a ``changed_fields`` list — so historical questions like 'shops where GLS's checkout position changed in Q4 2025' work. Add ``require_checkout_change=['position']`` to restrict to shops with an actual change in that dimension. **Delivery provider table routing:** ``uses_delivery_provider`` checks ``webshop_delivery_provider_history`` by default (broad, fast). Set ``use_checkout_history=true`` to verify membership through ``webshop_checkout_history`` instead — use this when the question is specifically about checkout behaviour (e.g. 'shops where DHL is offered at checkout'). When ``uses_delivery_method`` is set, checkout history is always used automatically (it's the only table that carries method data). **Filter auto-resolution:** ``auto_resolve_values`` defaults true. Free-text values for the canonical dimensions (product/size/growth/provider/method/export-market/platform) are looked up via ``get_queryable_values`` before querying — exact match wins, otherwise the closest canonical value is substituted. Every substitution is echoed in ``resolved_values`` so the caller can see what changed. ``delivery_time_contains`` is free text (no canonical set); when a query with it returns zero shops, the response's ``suggested_delivery_times`` lists the actual stored labels in scope so the caller can retry with one that exists. **Response:** paginated (`limit`, `offset`) list of webshops with identity, company name, size / growth / main-product-category, export markets, platform and (when applicable) matched checkout offers, plus a ``summary_for_llm``. ``total_matches`` reports the count before pagination. **Examples:** shops with size ≥ 80 AND growth in ['high','very_high']; Food & Beverage shops offering same-day delivery (``product_categories=['Food & Beverage']``, ``delivery_time_contains=['same day']``); customers of a delivery provider with a specific position or price at checkout (``uses_delivery_provider=['gls']``, ``max_checkout_position=1``); shops whose GLS checkout position moved in Q4 2025 (``uses_delivery_provider=['gls']``, ``date_from='2025-10'``, ``date_to='2025-12'``, ``require_checkout_change=['position']``). ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "entitled_markets": [ "string" ], "unauthorized_markets": [ "string" ], "markets_resolved": true, "country_codes": [ "string" ], "total_matches": 1, "returned": 1, "offset": 1, "limit": 1, "filters_summary": "Filters Summary", "resolved_values": {}, "suggested_delivery_times": [ "string" ], "webshops": [ { "domain_id": "Domain Id", "domain": "Domain", "country_code": "Country Code", "exports": true, "export_markets": [ "string" ], "matched_checkouts": [ { "changed_fields": [ "string" ] } ] } ], "summary_for_llm": "Summary For Llm" } ``` **Output Schema:** ```json { "properties": { "entitled_markets": { "items": { "type": "string" }, "type": "array", "title": "Entitled Markets", "description": "Markets the caller's account is entitled to query (empty = no restriction)." }, "unauthorized_markets": { "items": { "type": "string" }, "type": "array", "title": "Unauthorized Markets", "description": "Requested markets dropped because they are outside the caller's entitlement." }, "markets_resolved": { "type": "boolean", "title": "Markets Resolved", "description": "False when every explicitly requested market is outside the caller's entitlement. No data was queried in that case; 'entitled_markets' lists the markets to retry with.", "default": true }, "country_codes": { "items": { "type": "string" }, "type": "array", "title": "Country Codes", "description": "Resolved market scope (empty = all entitled markets)." }, "total_matches": { "type": "integer", "title": "Total Matches", "description": "Total webshops matching the filters before pagination." }, "returned": { "type": "integer", "title": "Returned", "description": "Number of webshops in this response." }, "offset": { "type": "integer", "title": "Offset", "description": "Offset applied to this page." }, "limit": { "type": "integer", "title": "Limit", "description": "Limit applied to this page." }, "filters_summary": { "type": "string", "title": "Filters Summary", "description": "Human-readable one-liner of the applied filters." }, "resolved_values": { "additionalProperties": { "additionalProperties": { "type": "string" }, "type": "object" }, "type": "object", "title": "Resolved Values", "description": "For each dimension whose values were auto-resolved, the mapping {requested \u2192 canonical} the tool substituted before querying. Empty when no substitution happened." }, "suggested_delivery_times": { "items": { "type": "string" }, "type": "array", "title": "Suggested Delivery Times", "description": "Populated only when ``delivery_time_contains`` was set AND the query returned zero shops: the most common raw ``delivery_time`` labels in the scope, so the caller can retry with a value that actually exists." }, "webshops": { "items": { "properties": { "domain_id": { "type": "string", "title": "Domain Id" }, "domain": { "type": "string", "title": "Domain" }, "domain_name": { "title": "Domain Name" }, "country_code": { "type": "string", "title": "Country Code" }, "company_name": { "title": "Company Name" }, "size_indication": { "title": "Size Indication", "description": "Overall size score (0\u2013100)." }, "size_indication_category": { "title": "Size Indication Category", "description": "Size bucket: small/medium/large/very_large." }, "growth_category": { "title": "Growth Category", "description": "Growth bucket: negative/flat/low/high/very_high." }, "main_product_category": { "title": "Main Product Category", "description": "Canonical name of the webshop's single main product category." }, "exports": { "type": "boolean", "title": "Exports", "description": "True when the webshop exports to at least one foreign market.", "default": false }, "export_markets": { "items": { "type": "string" }, "type": "array", "title": "Export Markets", "description": "Destination markets (country names) the webshop exports to." }, "platform": { "title": "Platform", "description": "Latest observed e-commerce framework, when tracked." }, "matched_checkouts": { "items": { "properties": { "delivery_provider": { "title": "Delivery Provider" }, "delivery_method": { "title": "Delivery Method" }, "checkout_position": { "title": "Checkout Position", "description": "Lower is better (1 = first)." }, "delivery_price_eur": { "title": "Delivery Price Eur" }, "free_delivery_threshold_eur": { "title": "Free Delivery Threshold Eur" }, "delivery_time": { "title": "Delivery Time", "description": "Raw delivery-time label at checkout (e.g. 'same day', '1-2 days')." }, "observed_date": { "title": "Observed Date", "description": "Scrape day of the LATEST observation (YYYY-MM-DD)." }, "first_observed_month": { "title": "First Observed Month", "description": "First month in the window this (provider, method) was seen." }, "latest_observed_month": { "title": "Latest Observed Month", "description": "Latest month in the window this (provider, method) was seen." }, "months_present": { "title": "Months Present", "description": "Distinct months the (provider, method) appeared in the window." }, "previous_checkout_position": { "title": "Previous Checkout Position", "description": "Position on the first observation in the window." }, "previous_delivery_price_eur": { "title": "Previous Delivery Price Eur" }, "previous_delivery_time": { "title": "Previous Delivery Time" }, "changed_fields": { "items": { "type": "string", "enum": [ "position", "price", "delivery_time" ] }, "type": "array", "title": "Changed Fields", "description": "Which dimensions moved between the first and latest observation in the window." } }, "type": "object", "title": "MatchedCheckoutOffer", "description": "One checkout offer that satisfied the request's checkout filters.\n\nIn the default (latest-snapshot) mode this is one raw row from the shop's\nlatest scrape day. In the historical mode (``date_from`` / ``date_to`` set),\nit aggregates per (provider, method) across the window: the ``*_price_eur``,\n``checkout_position`` and ``delivery_time`` fields hold the LATEST-observed\nvalues, and the ``previous_*`` fields hold the earliest-observed values so\n``changed_fields`` shows what moved." }, "type": "array", "title": "Matched Checkouts", "description": "Checkout offers on the webshop's latest scrape day that satisfied every checkout-level filter. Empty when no checkout filter was applied." } }, "type": "object", "required": [ "domain_id", "domain", "country_code" ], "title": "WebshopEntry", "description": "One matching webshop plus the attributes the filter probed." }, "type": "array", "title": "Webshops" }, "summary_for_llm": { "type": "string", "title": "Summary For Llm", "description": "Pre-rendered narrative summarising the result for direct LLM use." } }, "type": "object", "required": [ "total_matches", "returned", "offset", "limit", "filters_summary", "webshops", "summary_for_llm" ], "title": "ListWebshopsResponse", "description": "Response from the *list_webshops* tool." } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
list_webshops
Look up a batch of specific webshops with month-by-month time-series Take a caller-supplied list of webshops — typically pasted into the chat client or extracted from an uploaded Excel file — and return a per-shop dossier with month-by-month time-series so the LLM can answer trend questions ('which of these did we lose', 'how has each shop's checkout position moved', 'did their delivery prices change over Q4', 'what platforms did each run last month'). **Inputs:** each ``inputs`` entry is a full host with TLD (``'acme.dk'``), a ULID ``domain_id`` (``'01G39F4E65QDY5ZT9MXGV9KNA9'``), or a bare brand / company name without a TLD (``'matas'``). Hosts and ids are exact-matched. Bare brand names are never auto-resolved — they surface in ``unresolved_inputs`` with ``candidate_domains`` populated so the user can pick the exact host. Duplicate inputs (host + id for the same shop) collapse into one dossier with every original input echoed under ``inputs``. **Market gating:** ``country_code`` restricts the batch to the given market(s), bounded by the caller's entitlement. Webshops resolved but sitting outside the entitled markets land in ``unresolved_inputs`` with ``reason='excluded_by_market'`` and their ``country_code`` so the caller can request access. **Time window:** ``date_from`` and ``date_to`` (YYYY-MM). When both are omitted, every activity-derived block anchors on its own source table's latest data month — the fastest 'current state' view. When either bound is set, the block returns one row per (month, dimension) inside the requested range so the caller can chart the trend. To ask for a single month explicitly (e.g. 'what did each shop show at checkout in October'), set ``date_from`` and ``date_to`` to the same value. Month granularity — day part is ignored. **Time-series blocks** (one row per (month, dimension key) inside the window): ``providers_by_month`` (combined checkout + T&Cs provider view — no per-method breakdown), ``pricing_by_month`` (per (month, method): median / avg / min / max price + n_rows), ``delivery_times_by_month`` (per (month, method): modal label + distinct-count), ``platforms_by_month`` (per month), ``products_by_month`` (per month product_count). ``checkout_history`` is the raw-observation stream — one row per scrape day with provider, method, checkout_position, delivery_price_eur and delivery_time — bounded by the same window. **Point-in-time blocks** (unaffected by the window): identity, ``company``, ``size_indication``/``growth_category``, ``main_product_category``, ``export``, ``activity`` (first_seen / last_seen / total months active), ``financials`` (annual). The ``inventory_snapshot`` block is the top brands / categories / dimensions taken from the latest month IN the window — a snapshot rather than a monthly series so the response stays bounded. **Block toggles:** every non-identity block can be turned off (``include_company``, ``include_size_growth``, ``include_financials``, ``include_activity``, ``include_platform``, ``include_main_category``, ``include_export``, ``include_providers``, ``include_checkout_history``, ``include_pricing``, ``include_delivery_times``, ``include_products``). ``include_financials`` and ``include_products`` are off by default because they involve heavier joins — flip on when the caller's question needs them. **Provider / method exclusions:** ``exclude_providers`` and ``exclude_methods`` strip specific slugs from every checkout-related block. Case-insensitive. ``providers_by_month`` always drops ``'unknown'`` regardless. **Pagination:** ``limit`` and ``offset`` page over the resolved webshops only — ``unresolved_inputs`` is always returned in full so the caller never loses sight of what could not be looked up. ``total_resolved`` is the resolved-count before pagination. **Response:** paginated ``webshops`` list (identity + monthly + snapshot blocks), ``unresolved_inputs``, the resolved market ``country_codes``, the echoed ``date_from`` / ``date_to``, and a pre-rendered ``summary_for_llm``. Every dossier carries the caller inputs that mapped to it under ``inputs`` so a batched answer stays input-referenced. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "entitled_markets": [ "string" ], "unauthorized_markets": [ "string" ], "markets_resolved": true, "country_codes": [ "string" ], "total_inputs": 1, "resolved_count": 1, "unresolved_count": 1, "offset": 1, "limit": 1, "total_resolved": 1, "webshops": [ { "inputs": [ "string" ], "domain_id": "Domain Id", "domain": "Domain", "platforms_by_month": [ { "month": "Month", "framework": "Framework" } ], "providers_by_month": [ { "month": "Month", "delivery_provider": "Delivery Provider" } ], "checkout_history": [ { "date": "Date", "delivery_provider": "Delivery Provider" } ], "pricing_by_month": [ { "month": "Month", "delivery_method": "Delivery Method", "n_rows": 1 } ], "delivery_times_by_month": [ { "month": "Month", "delivery_method": "Delivery Method", "distinct_times": 1, "n_rows": 1 } ], "products_by_month": [ { "month": "Month", "product_count": 1 } ] } ], "unresolved_inputs": [ { "input": "Input", "reason": "Reason", "candidate_domains": [ "string" ] } ], "summary_for_llm": "Summary For Llm" } ``` **Output Schema:** ```json { "properties": { "entitled_markets": { "items": { "type": "string" }, "type": "array", "title": "Entitled Markets", "description": "Markets the caller's account is entitled to query (empty = no restriction)." }, "unauthorized_markets": { "items": { "type": "string" }, "type": "array", "title": "Unauthorized Markets", "description": "Requested markets dropped because they are outside the caller's entitlement." }, "markets_resolved": { "type": "boolean", "title": "Markets Resolved", "description": "False when every explicitly requested market is outside the caller's entitlement. No data was queried in that case; 'entitled_markets' lists the markets to retry with.", "default": true }, "country_codes": { "items": { "type": "string" }, "type": "array", "title": "Country Codes", "description": "Resolved market scope (empty = all entitled markets)." }, "date_from": { "title": "Date From", "description": "Echoed 'date_from' bound (YYYY-MM) or null when unset." }, "date_to": { "title": "Date To", "description": "Echoed 'date_to' bound (YYYY-MM) or null when unset." }, "total_inputs": { "type": "integer", "title": "Total Inputs", "description": "Distinct non-empty inputs after normalisation." }, "resolved_count": { "type": "integer", "title": "Resolved Count", "description": "Inputs that resolved to a dossier on this page." }, "unresolved_count": { "type": "integer", "title": "Unresolved Count", "description": "Inputs that did not resolve or were denied by market entitlement." }, "offset": { "type": "integer", "title": "Offset", "description": "Offset applied to the resolved-webshops page." }, "limit": { "type": "integer", "title": "Limit", "description": "Limit applied to the resolved-webshops page." }, "total_resolved": { "type": "integer", "title": "Total Resolved", "description": "Total resolved webshops matching this call (before pagination on the resolved list)." }, "webshops": { "items": { "properties": { "inputs": { "items": { "type": "string" }, "type": "array", "title": "Inputs", "description": "Every caller input that resolved to this webshop (deduplication echo \u2014 e.g. the same shop pasted under two hosts or with its ULID and its host)." }, "domain_id": { "type": "string", "title": "Domain Id" }, "domain": { "type": "string", "title": "Domain" }, "domain_name": { "title": "Domain Name" }, "country_code": { "title": "Country Code" }, "is_alive": { "title": "Is Alive" }, "company": {}, "financials": {}, "activity": {}, "main_product_category": { "title": "Main Product Category" }, "size_indication": { "title": "Size Indication" }, "size_indication_category": { "title": "Size Indication Category" }, "growth_category": { "title": "Growth Category" }, "export": {}, "platforms_by_month": { "items": { "properties": { "month": { "type": "string", "title": "Month" }, "framework": { "type": "string", "title": "Framework" } }, "type": "object", "required": [ "month", "framework" ], "title": "MonthlyPlatform", "description": "One (month, framework) row \u2014 a shop can migrate platforms mid-window." }, "type": "array", "title": "Platforms By Month" }, "providers_by_month": { "items": { "properties": { "month": { "type": "string", "title": "Month" }, "delivery_provider": { "type": "string", "title": "Delivery Provider" } }, "type": "object", "required": [ "month", "delivery_provider" ], "title": "MonthlyProvider", "description": "One (month, provider) presence row for a single webshop.\n\nProviders here are the combined view \u2014 every provider the shop surfaced at\ncheckout or listed in its terms & conditions that month. Method-level\ndetail is not carried on this row; use ``checkout_history`` when the\ncaller needs the per-method breakdown." }, "type": "array", "title": "Providers By Month" }, "checkout_history": { "items": { "properties": { "date": { "type": "string", "title": "Date", "description": "Scrape date (YYYY-MM-DD) this observation was captured on." }, "delivery_provider": { "type": "string", "title": "Delivery Provider" }, "delivery_method": { "title": "Delivery Method" }, "checkout_position": { "title": "Checkout Position", "description": "Checkout position (1-based) observed for this offer." }, "delivery_price_eur": { "title": "Delivery Price Eur", "description": "Delivery price in EUR observed for this offer." }, "delivery_time": { "title": "Delivery Time", "description": "Delivery-time label as displayed at checkout for this offer." } }, "type": "object", "required": [ "date", "delivery_provider" ], "title": "CheckoutEntry", "description": "One raw checkout observation for a single webshop.\n\nPreserved as-scraped rather than rolled up to a monthly aggregate so the\ncaller can see concrete instances of provider / method / position / price\non a specific date within the window." }, "type": "array", "title": "Checkout History" }, "pricing_by_month": { "items": { "properties": { "month": { "type": "string", "title": "Month" }, "delivery_method": { "type": "string", "title": "Delivery Method" }, "n_rows": { "type": "integer", "title": "N Rows" }, "avg_price_eur": { "title": "Avg Price Eur" }, "median_price_eur": { "title": "Median Price Eur" }, "min_price_eur": { "title": "Min Price Eur" }, "max_price_eur": { "title": "Max Price Eur" } }, "type": "object", "required": [ "month", "delivery_method", "n_rows" ], "title": "MonthlyPricing", "description": "One (month, method) price aggregate row for a single webshop." }, "type": "array", "title": "Pricing By Month" }, "delivery_times_by_month": { "items": { "properties": { "month": { "type": "string", "title": "Month" }, "delivery_method": { "type": "string", "title": "Delivery Method" }, "most_common": { "title": "Most Common" }, "distinct_times": { "type": "integer", "title": "Distinct Times", "default": 0 }, "n_rows": { "type": "integer", "title": "N Rows", "default": 0 } }, "type": "object", "required": [ "month", "delivery_method" ], "title": "MonthlyDeliveryTime", "description": "One (month, method) delivery-time rollup for a single webshop." }, "type": "array", "title": "Delivery Times By Month" }, "products_by_month": { "items": { "properties": { "month": { "type": "string", "title": "Month" }, "product_count": { "type": "integer", "title": "Product Count" } }, "type": "object", "required": [ "month", "product_count" ], "title": "MonthlyProductCount", "description": "One month of ``webshop_product_history.product_count`` for a single webshop." }, "type": "array", "title": "Products By Month" }, "inventory_snapshot": {} }, "type": "object", "required": [ "domain_id", "domain" ], "title": "WebshopDossier", "description": "One resolved webshop with every requested block populated.\n\nAll ``*_by_month`` lists are ordered chronologically (oldest \u2192 newest) and\nkeyed within a shop; concatenating across the batch is safe because every\nrow carries its own ``month`` and dimension key." }, "type": "array", "title": "Webshops" }, "unresolved_inputs": { "items": { "properties": { "input": { "type": "string", "title": "Input" }, "reason": { "type": "string", "enum": [ "not_found", "ambiguous", "excluded_by_market" ], "title": "Reason", "description": "'not_found' \u2014 no host / id matched. 'ambiguous' \u2014 a bare brand name matched several webshops; pick one from 'candidate_domains' and retry. 'excluded_by_market' \u2014 the webshop was found but sits outside the caller's entitled markets." }, "candidate_domains": { "items": { "type": "string" }, "type": "array", "title": "Candidate Domains", "description": "Real host values in the caller's markets the user can retry with, when the input was a bare brand name or a typo'd host. Empty for 'excluded_by_market'." }, "country_code": { "title": "Country Code", "description": "For 'excluded_by_market', the country where the resolved webshop sits \u2014 so the caller can ask their admin to add access." } }, "type": "object", "required": [ "input", "reason" ], "title": "UnresolvedInput", "description": "One caller input that could not be turned into a dossier." }, "type": "array", "title": "Unresolved Inputs" }, "summary_for_llm": { "type": "string", "title": "Summary For Llm", "description": "Pre-rendered narrative summarising the batch for direct LLM use." } }, "type": "object", "required": [ "total_inputs", "resolved_count", "unresolved_count", "offset", "limit", "total_resolved", "summary_for_llm" ], "title": "LookupWebshopsResponse", "description": "Response payload for the *lookup_webshops* tool." } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
lookup_webshops
Create or revise an HTML report (draft) in Market Intelligence Creates a new HTML report in the Market Intelligence → Reports section. Always lands as a **draft** — a human publisher signs it off before any customer sees it. There is no publish-from-MCP path. Visibility is locked to **your own customer account** — no other customer, market, or module can see it until a human editor widens visibility in the UI. ``data_as_of`` is optional — omit to default to the current UTC time. By default each push creates a new report keyed by a server-assigned id. To revise an existing report instead, pass its ``report_id`` — the push lands as a new draft version (release) on that report rather than a new one. Always a draft; a publisher still signs off the new version. **Provenance is mandatory:** every number in the HTML must be a ``{{fig:token}}`` placeholder bound in ``figures`` to a value sourced from the Market Intelligence tools. HTML with bare numbers in prose is rejected unless ``allow_inline_numbers`` is set. **Restyle stamp required:** the HTML must carry a valid ``tembi-restyle`` stamp (an HTML meta tag the report-to-tembi-style skill injects to prove the markup matches Tembi house style; the server verifies its hash) or the push is rejected with 422. Run that skill on the HTML **before the first push, not only after edits** — freshly authored HTML is unstamped and will be rejected. Any edit invalidates the hash, so re-stamp after every edit (a cloned report also loses its stamp on fetch). **Confidentiality:** reports are company-scoped — never public/global. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "id": "Id", "release_id": "Release Id", "content_url": "Content Url", "inline_number_warnings": [ "string" ], "summary_for_llm": "Summary For Llm" } ``` **Output Schema:** ```json { "properties": { "id": { "type": "string", "title": "Id" }, "release_id": { "type": "string", "title": "Release Id" }, "content_url": { "type": "string", "title": "Content Url" }, "inline_number_warnings": { "items": { "type": "string" }, "type": "array", "title": "Inline Number Warnings", "default": [] }, "summary_for_llm": { "type": "string", "title": "Summary For Llm" } }, "type": "object", "required": [ "id", "release_id", "content_url", "summary_for_llm" ], "title": "PushReportResponse" } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
push_report
Summarise everything Tembi knows about a webshop / online retailer (read-only) Read-only per-domain summary of a webshop. Input: ``domain_id`` (ULID) or ``domain`` (full host or bare brand). Unresolved input returns ``resolved=false`` with ``candidate_domains``. Scope the ``include_*`` flags to the user's question — don't ask them to confirm first. Available block toggles: ``include_financials``, ``include_pricing``, ``include_products``, ``include_size_growth``, ``include_export``, ``include_delivery`` (each defaults true). Flip off the blocks that don't relate to the question (e.g. checkout question → drop financials, products, size_growth, export; financials question → drop delivery, pricing, products, export). Also tune ``activity_months`` and ``exclude_providers`` / ``exclude_methods`` from the question. Answer from the returned structured blocks and ``summary_for_llm`` — quote the numbers, don't paraphrase. Widget UI is attached on every branch. On resolved=true + access_denied=false: give the answer, note ``settings_applied`` and that they're reconfigurable. On resolved=false: surface ``candidate_domains`` and wait. On access_denied=true: relay the denial. Country-scoped to ``UserContext.access_markets``. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "resolved": true, "access_denied": true, "candidate_domains": [ "string" ], "activity_window_months": 1, "settings_applied": { "activity_months": 1, "include_financials": true, "include_pricing": true, "include_products": true, "include_size_growth": true, "include_export": true, "include_delivery": true, "include_delivery_times": true, "top_n_brands": 1, "top_n_categories": 1, "top_n_checkout_history": 1, "excluded_providers": [ "string" ], "excluded_methods": [ "string" ], "all_defaults": true }, "summary_for_llm": "Summary For Llm", "timestamp": "2023-01-01T00:00:00Z" } ``` **Output Schema:** ```json { "properties": { "resolved": { "type": "boolean", "title": "Resolved", "description": "False when the requested domain has no data. Structured blocks are then omitted and 'candidate_domains' lists real hosts the caller can retry with.", "default": true }, "access_denied": { "type": "boolean", "title": "Access Denied", "description": "True when the webshop was found but its ``country_code`` is outside the caller's ``UserContext.countries`` access list. Fact blocks are omitted; ``identity`` is populated so the caller sees which market they need access to and ``summary_for_llm`` explains the denial.", "default": false }, "candidate_domains": { "items": { "type": "string" }, "type": "array", "title": "Candidate Domains", "description": "Closest domain host matches when the requested domain could not be resolved." }, "identity": {}, "company": {}, "financials": {}, "size": {}, "activity": {}, "platform": {}, "category": {}, "products": {}, "brands": {}, "product_categories": {}, "product_dimensions": {}, "delivery": {}, "pricing": {}, "delivery_times": {}, "export": {}, "activity_window_months": { "type": "integer", "title": "Activity Window Months", "description": "Trailing window (months) used for the activity-derived facts." }, "settings_applied": { "description": "Effective settings the tool ran with, echoed back so the client can\nsurface them to the user and offer re-runs with different knobs.\n\nThe values here are what actually shaped the answer \u2014 after defaults were\napplied for anything the caller omitted, and after sentinel lists resolved\nfor ``exclude_providers`` / ``exclude_methods``. ``all_defaults`` is true\nwhen the caller did not override any of the tuning knobs (identity inputs\n``domain_id`` / ``domain`` don't count).", "properties": { "activity_months": { "type": "integer", "title": "Activity Months" }, "include_financials": { "type": "boolean", "title": "Include Financials" }, "include_pricing": { "type": "boolean", "title": "Include Pricing" }, "include_products": { "type": "boolean", "title": "Include Products" }, "include_size_growth": { "type": "boolean", "title": "Include Size Growth" }, "include_export": { "type": "boolean", "title": "Include Export" }, "include_delivery": { "type": "boolean", "title": "Include Delivery" }, "include_delivery_times": { "type": "boolean", "title": "Include Delivery Times" }, "top_n_brands": { "type": "integer", "title": "Top N Brands" }, "top_n_categories": { "type": "integer", "title": "Top N Categories" }, "top_n_checkout_history": { "type": "integer", "title": "Top N Checkout History" }, "excluded_providers": { "items": { "type": "string" }, "type": "array", "title": "Excluded Providers", "description": "Provider slugs stripped from checkout blocks (post-default resolution)." }, "excluded_methods": { "items": { "type": "string" }, "type": "array", "title": "Excluded Methods", "description": "Method slugs stripped from checkout blocks (post-default resolution)." }, "all_defaults": { "type": "boolean", "title": "All Defaults", "description": "True when the caller did not explicitly set any tuning knob. Clients should surface a 'these can be reconfigured' hint to the user when this is true, so the user knows the defaults shaped the answer." } }, "type": "object", "required": [ "activity_months", "include_financials", "include_pricing", "include_products", "include_size_growth", "include_export", "include_delivery", "include_delivery_times", "top_n_brands", "top_n_categories", "top_n_checkout_history", "all_defaults" ], "title": "SummarizeDomainSettings" }, "summary_for_llm": { "type": "string", "title": "Summary For Llm", "description": "Pre-rendered narrative the LLM can quote directly. Numbers include the absolute counts backing each percentage \u2014 do not just paraphrase them, quote them." }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp", "description": "Server-side UTC timestamp of the invocation." } }, "type": "object", "required": [ "activity_window_months", "settings_applied", "summary_for_llm", "timestamp" ], "title": "SummarizeDomainResponse", "description": "Consolidated point-in-time summary of a webshop domain.\n\n``resolved`` is false only when the caller supplied a ``domain`` string that\ndid not match any row in ``webshop_info``; in that case the metric blocks are\nempty and ``candidate_domains`` lists the closest hosts. ``access_denied`` is\ntrue when the webshop was found but sits in a country the caller does not\nhave access to \u2014 the identity block is populated so the caller can see what\nmarket they were asking for, but every fact block is omitted." } ``` **422**: Validation Error Content-Type: application/json **Example Response:** ```json { "detail": [ { "loc": [], "msg": "Message", "type": "Error Type" } ] } ``` **Output Schema:** ```json { "properties": { "detail": { "items": { "properties": { "loc": { "items": {}, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" } ```
summarize_domain
How do I improve a ChatGPT Plugin's discoverability?
The levers are the listing surface agents actually read: names, descriptions, keywords, tool metadata, and registry health. Which lever matters depends on where discovery breaks, which is what continuous measurement shows.
What are Tembi Intelligence alternatives on ChatGPT?
As of 2026-09-04, Tembi Intelligence competes with ABRAMS Trade Intelligence, CE Cosmos Deep Dive, CE Cosmos Signal, Clutch.co, Company Dossier, Comscore, Crunchbase, D&B Finance Analytics, Dow Jones Factiva, Economic Mind, GlobalSource Partners, Grata EU, Iceflower, InfoTrack.ai, JARS LT, JoomPulse, Kindora, Lux AI, Nogogo AI, Partnership Leaders Research, Pi by Placer.ai, PolicyNote, Powerset Research, SmartCustomer, Songstats, Soundcharts, Trace, Website Launches, Windsock, ZINT in ChatGPT Market & Competitive Intelligence Data, ranked by public Discoverability Score.
Where is this profile measured?
This profile uses the geography attached to the latest public registry snapshot: US. Locale tags are intentionally omitted.