# MCP Server recipes

Worked patterns for getting useful results out of an MCP-connected assistant. Each one shows what to ask, which tools it exercises, and what to watch for.

All read recipes work under the Read-only profile. The enrichment recipes at the end need Full access.

## Get oriented in a new catalog

Before asking anything specific, establish what exists.

> What tables are in my catalog, and how many records does each one have?


This runs `list_custom_entities` followed by `get_entity_counts`, and gives you standard tables plus any custom entities with their record counts.

Then narrow to the table you care about:

> Give me a complete picture of the Products table — how many records, which fields, and which are multilingual.


This runs `get_table_info`, which returns counts, fields with human-readable titles, types, multilingual flags, and pagination limits in one call.

Ask for languages explicitly if you will be working with translations:

> Which languages are configured in this catalog, and which fields are multilingual?


That runs `get_catalog_locales`.

## Search a multilingual catalog

This is the most common source of empty results. A plain text search covers the default language only, so a Spanish term will not match content stored in English.

Instead of relying on a bare search, name the language:

> Find products with "Abrigo" in the Spanish title.


This runs `get_products` with a filter such as `contains(prod_title_es, 'Abrigo')`.

When you are unsure which language holds the data, ask for both:

> Find products with "Coat" in English or "Abrigo" in Spanish.


Use one language per filter. Ask for separate searches in English and Spanish, then combine the
results; a single OData filter spanning two languages is rejected. Catalog custom attributes of
type Date hold the app's date and time without a time zone. For a full calendar day, use a range
such as `prod_date ge 2026-10-20T00:00:00 and prod_date lt 2026-10-21T00:00:00`, after checking
the field's name and type in metadata. System dates and changelog `modified_at` remain UTC instants
and use `Z` in filters.

If a search comes back empty and you suspect a language mismatch:

> How should I search this catalog across multiple languages?


That runs `help_search_multilingual`, which reports the configured languages and shows patterns using your real field names.

Keep in mind that an empty value for a language means the field is not translated. It does not fall back to the base language.

## Audit data quality

Counting before listing keeps responses manageable.

> How many products are visible, and how many are drafts?


This runs `get_total_count` twice with filters on `prod_stat`, without downloading records.

Then find the gaps:

> List visible products that have no English description. Show reference and title.


> Which categories have no products assigned?


> Show me products whose title exists in English but not in Spanish.


For the last one, ask the assistant to select both language fields explicitly, so untranslated values are visible as empty rather than absent.

## Explore structure before building a REST integration

The MCP Server is a fast way to understand a catalog you are about to integrate with over the [Catalog REST API](/apis/catalog).

> What fields does the Products table have, with their types and which ones are images or files?


This runs `get_entity_fields` with `field_type` filtering.

> I want to fetch all visible products with their images, as efficiently as possible. What query should I use?


This runs `suggest_optimal_query`, which proposes filters, field selection, and performance settings. Treat the result as a starting point and verify it against [Filter](/guides/filter) and [Select](/guides/select) before putting it in production code.

## Work through large result sets

Ask for the shape of the data before the data itself.

> How many products match status visible and category SUMMER2024?


Then request a first page, and continue:

> Show me the first page of those products.


> Get the next page.


The second request runs `get_next_page` using the `@nextLink` from the previous response, which preserves the original filters. Page size limits vary by entity — ask the assistant to check `get_pagination_info` rather than assuming a number.

For large exports, the REST API is the better tool. See [Pagination strategies](/guides/pagination-strategies).

## Navigate relationships

Two shortcuts avoid hand-built filters.

> Show me all products in the Summer 2024 category.


The assistant resolves the category reference to its numeric ID, then calls `get_category_products`.

> What variants does product 42PH220506712 have?


Same pattern with `get_product_variants`.

Both relationship tools require the numeric internal ID. The assistant can resolve it from the business reference with `get_categories` or `get_products` first.

## Review changes with changelogs

Use resource changelogs when you need to understand what changed without downloading every current record.

> Show Product changes since yesterday, newest first.


This runs `get_products_changelog` with a date filter and descending order. For one known Product,
ask for its numeric ID first and then use `get_product_changelog`. Equivalent tools exist for
Categories, Variants, and Custom Entities.

Changelogs include creations and modifications, but do not record deletions. A listed item may
already be gone, so read it before assuming it still exists. Use `modified_at` for UTC date filters
and sorting; the tools display UTC changelog timestamps with `Z`.

## Inspect Attribute Sets and layouts

> List the Attribute Sets in this catalog, then show me the Product and Variant layout for the set used by product COAT001.


This combines `get_attribute_sets`, `get_products`, and `get_attribute_set`. Attribute Set and
layout writes replace complete structures, so always fetch the current value before proposing a
change.

A Product's attribute set is `typ_id` (sometimes titled “Family”). Use an ID returned by
`get_attribute_sets` in `typ_id eq <id>`; `typ_id eq null` finds Products in the default set.

## Discover and manage attribute definitions

The Catalog attribute-management REST surface is **Beta**. Its twenty MCP tools work with field
definitions for Categories, Products, Variants, and Custom Entities. They are separate from the
tools that read and change item values. See [Entity metadata and attribute management](/guides/entity-metadata)
for the REST contract and paired MCP examples.

Start with a read under either access profile:

> List the custom Product attributes and show me the definition of the one titled “Box material”. Do not change anything.


The assistant calls `get_product_attributes` with `filters: "kind eq 'custom'"`, then
`get_product_attribute` using the returned `attribute_id`. For a Custom Entity, first call
`list_custom_entities` and pass its exact denominator as `entity_name`. Product and Variant
attribute reads can use `attribute_set_id` to show placement on a particular form; Category and
Custom Entity definitions have one form and do not take it.

Creating a field needs Full access. After checking the current definitions, ask:

> Create a shortText Product attribute titled “Box material” on attribute set 7. Show me the generated identifier.


This calls `create_product_attribute` with `type: "shortText"`, `title: "Box material"`, and
`attribute_set_id: 7`. It executes when called. Use the returned identifier with `get_product_attribute`
to inspect the result, then `update_product` when you need to populate item values. Checklist
attributes need at least one option. For `linkItems`, pass `target_entity` as a standard entity
name or an exact Custom Entity denominator. The tool resolves Catalog's internal identifier.

For a definition change, read the current definition and ask for the exact fields to update:

> Rename Product attribute prod_boxmaterial to “Case material”. Keep its values and type.


`update_product_attribute` can change the title but cannot change the type or multilingual
setting. An ordinary title update executes when called. A request with
`delete_existing_values: true` first previews the loss of values and requires a second call with
`confirm: true`. If you remove checklist options that items still use, the preview shows their
usage; those items keep the removed values, which the app flags. Do not use an empty `options`
list: Catalog rejects it.

To take a Product or Variant attribute off one form while retaining values, ask for
`delete_product_attribute` or `delete_variant_attribute` with `only_from_form: true` and the
chosen `attribute_set_id`. To delete the definition everywhere, omit `only_from_form`, review the
preview count, and explicitly confirm the second call. Platform (`fixed`) attributes cannot be
deleted. The preview count may be incomplete for multilingual values, so treat the operation as
affecting **every** item value. For Categories and Custom Entities there is no form-only mode.

## Enrich content

These need Full access. Read the current record first and keep your MCP client's tool approval enabled.

Start narrow and verify:

> Show the current titles for product COAT001. Do not change anything yet.


After reviewing the result, ask:

> Update the Spanish title of product COAT001 to "Abrigo de Lana Merino".


The assistant calls `update_product`. This dedicated update tool executes when called; it does not
provide a server-side preview. The separate read and your client's approval prompt are the review
steps.

> Set product COAT001 to draft status.


For checklist item values, the Catalog write tools accept multiple options as a comma-separated
string or a list. The Catalog API validates the option identifiers; check the attribute definition
with `get_product_attribute` before writing them.

For anything touching more than one record, ask for the list first:

> List the visible products with no Spanish description.


Then work through them deliberately rather than asking for a blanket update. A bulk instruction gives you one preview for many changes, which is exactly the situation where an error is easiest to approve by accident.

Test enrichment flows against a non-production catalog before running them against live data.

Custom Entity create/update/delete tools do have a two-step preview. Category, Product, and Variant
deletes also require a second call with `confirm: true`.

Before deleting a Product, review its Variants. `delete_product` lists them in its preview;
the Catalog leaves them without a Product rather than deleting them. Delete the Variants first
if the workflow requires removing both.

## Work with DAM assets

The underlying DAM REST API is **Beta**. Source filenames for creates are limited to 255 characters, extension excluded; replacements retain the asset's existing name. When filtering by `createdOn` or `modifiedOn`, supply a UTC ISO 8601 timestamp with a `Z` suffix. See [DAM REST API overview](/apis/dam).

For `dam_create_*` and `dam_update_*`, use the direct asset URL. DAM does not follow redirects;
a `3xx` response is rejected with `400 Bad Request`.

> Find PDF files whose name contains "datasheet" and show whether each one is still linked.


This runs `dam_filter_files`. Before deleting a file, inspect its `numLinks` value with
`dam_get_file`; deletion does not repoint Catalog records.

For images, account for asynchronous processing:

> Import the image at https://example.com/images/coat-front.jpg, then check when it is ready.


This uses `dam_create_image`, followed by `dam_get_image` until the status reaches `Ok` or `Er`.
DAM writes execute when called and do not implement a server-side confirmation step.

## Diagnose a session

When something behaves oddly:

> Validate my token and tell me which catalog it points to.


> The catalog was updated outside this session and I am seeing stale data.


The second prompt leads to `cache_clear`, which needs Full access. Under Read-only, start a new session instead.

See [Troubleshooting](/mcp-server/troubleshooting) for connection-level problems.

## Related pages

* [Tool reference](/mcp-server/tools)
* [Access profiles and permissions](/mcp-server/permissions)
* [Troubleshooting](/mcp-server/troubleshooting)
* [REST API recipes](/guides/recipes)
* [Best practices](/guides/best-practices)