Skip to main content
Glama

Albert Heijn: Frequently Bought Items

ah_get_frequent_items
Read-only

Identify frequently bought products across recent Albert Heijn delivery orders and store receipts, with purchase counts and last-purchased dates, to suggest shopping lists and spot bonus staples.

Instructions

Get the products the user buys most often, counted over their Albert Heijn delivery orders and in-store receipts (kassabonnen) of the last few months. purchase_count is the number of orders and store visits that included the product, split into online_count and in_store_count. Use it to suggest a shopping list or spot staples that are on bonus. Returns product_name, product_id, the counts and last_purchased_date, most bought first. When you mention a product or recipe from the result, link its name to its url.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ah_get_frequent_items"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of products (default 50, max 200)
monthsNoHow many months back to count (default 3, max 12)
sourceNoCount delivery orders, store receipts, or both (default all)
min_order_countNoOld name of min_purchase_count
min_purchase_countNoOnly products bought at least this many times (default 3)

Output Schema

NameRequiredDescriptionDefault
productsYes
warningsNo
from_dateYes
online_ordersYes
store_receiptsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed17 schema fields changedv1.8.0
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Maximum number of products (default 50, max 200)",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • changedInput schema / properties / min_order_count / description
      Previous value: -"Minimum number of orders a product must appear in (default 3)"New value: +"Old name of min_purchase_count"
    • addedInput schema / properties / min_purchase_count
      Added value: +{
      +  "description": "Only products bought at least this many times (default 3)",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedInput schema / properties / months
      Added value: +{
      +  "description": "How many months back to count (default 3, max 12)",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedInput schema / properties / source
      Added value: +{
      +  "description": "Count delivery orders, store receipts, or both (default all)",
      +  "enum": [
      +    "all",
      +    "online",
      +    "in_store"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / from_date
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / online_orders
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / products / items / properties / in_store_count
      Added value: +{
      +  "type": "number"
      +}
    • removedOutput schema / properties / products / items / properties / last_ordered_date
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / products / items / properties / last_purchased_date
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / products / items / properties / online_count
      Added value: +{
      +  "type": "number"
      +}
    • removedOutput schema / properties / products / items / properties / order_count
      Removed value: -{
      -  "type": "number"
      -}
    • addedOutput schema / properties / products / items / properties / purchase_count
      Added value: +{
      +  "type": "number"
      +}
    • changedOutput schema / properties / products / items / required
      Previous value: -[
      -  "product_name",
      -  "product_id",
      -  "order_count",
      -  "url"
      -]New value: +[
      +  "product_name",
      +  "purchase_count",
      +  "online_count",
      +  "in_store_count",
      +  "last_purchased_date"
      +]
    • addedOutput schema / properties / store_receipts
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "products"
      -]New value: +[
      +  "from_date",
      +  "online_orders",
      +  "store_receipts",
      +  "products"
      +]
  2. Changed1 schema field changedv1.3.1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "products": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "last_ordered_date": {
      +            "type": "string"
      +          },
      +          "order_count": {
      +            "type": "number"
      +          },
      +          "product_id": {
      +            "type": "number"
      +          },
      +          "product_name": {
      +            "type": "string"
      +          },
      +          "url": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "product_name",
      +          "product_id",
      +          "order_count",
      +          "url"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "products"
      +  ],
      +  "type": "object"
      +}
  3. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

readOnlyHint=true already covers the safety profile, and the description goes well beyond it: it defines what the counts mean, discloses which data sources feed them, and states the return ordering ('most bought first'). The mention of a product 'url' to link to is useful output guidance, though that field is not enumerated among the listed returns, a small inconsistency to reconcile against the output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and scope, then counting semantics, then returns, then a usage tip — a sensible ordering with no filler sentences. The closing instruction about linking product names to their url is agent-facing behavior rather than tool behavior and could arguably be trimmed or moved.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and annotations covering safety, the description only needs to explain the aggregation logic, which it does thoroughly. The one loose end is the 'url' reference not appearing in the stated return list, leaving a minor gap an agent can only resolve by inspecting the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents limit, months, source, and min_purchase_count with defaults. The description corroborates the source dimension by explaining the online/in-store split but adds no format or syntax detail beyond that; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (products the user buys most often) plus the exact data scope: delivery orders and in-store receipts over the last few months. The counting semantics (purchase_count = orders + store visits, split into online_count and in_store_count) make it unmistakable that this is an aggregated frequency tool, not a raw order or receipt listing like the sibling ah_get_orders or ah_get_receipts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete usage contexts ('suggest a shopping list or spot staples that are on bonus'), which is more than most definitions offer. It stops short of explicit exclusions or naming alternatives (e.g. use ah_get_products to browse, ah_get_receipt_details for a single visit), so the agent must infer the boundary itself.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.