Summary
The Prefab UI cards we render today were built ad-hoc per tool and surface inconsistent (and often incomplete) information for each entity type. Real session 2026-05-05: agent looked at a get_variant_details card for tubeless tire sealant and had to guess the unit of measure ("250 = 250ml presumably") because UoM isn't on the variant card — even though it's a critical fact for any inventory decision.
Background
13 card builders today in katana_mcp_server/src/katana_mcp/tools/prefab_ui.py:
| Builder |
Tool entry point |
Entity |
build_search_results_ui |
search_items |
Search results |
build_variant_details_ui |
get_variant_details |
Variant |
build_item_detail_ui |
get_item |
Product/Material/Service |
build_inventory_check_ui |
check_inventory |
Stock card |
build_low_stock_ui |
list_low_stock_items |
Reorder list |
build_order_preview_ui |
create_purchase_order / create_sales_order / create_manufacturing_order previews |
Order |
build_order_created_ui |
post-create |
Order |
build_fulfill_preview_ui / build_fulfill_success_ui |
fulfill_order |
Fulfillment |
build_verification_ui |
verify_order_document |
Document |
build_item_mutation_ui |
create_item / modify_item |
Item |
build_receipt_ui |
receive_purchase_order |
Receipt |
build_batch_recipe_update_ui |
modify_manufacturing_order(update_recipe_rows=...) |
MO recipe batch |
Each was built when its tool shipped, with limited cross-pollination. The result is uneven information density, inconsistent visual hierarchy, and missing decision-critical fields.
Design proposal — per-entity field hierarchy
Every card should follow the same three-tier shape, but the specific fields in each tier vary by entity type:
| Tier |
Visual |
Purpose |
Field selection |
| Tier 1 — Identity |
Header (title + badges) |
"What is this?" |
Name + SKU/order_no + type/status |
| Tier 2 — Decision metrics |
Big number metrics |
"What do I need to know to act?" |
Per-entity: stock for variants, total + status for orders, totals + status for receipts, etc. |
| Tier 3 — Reference data |
Small text grid |
"Where is it / who supplies it / what are the IDs" |
IDs, dates, supplier/customer name, location |
| Tier 4 — Actions |
Footer buttons |
"What's the most likely next step?" |
Per-entity: most-likely follow-up (e.g., variant → check inventory; order → modify/fulfill) |
The tiers stay constant; the field choices per tier are designed per entity type, not copied from a generic template.
Per-entity priority pass
Each builder should be redesigned with explicit answers to:
- What's the agent trying to decide when looking at this card? (e.g., for variant: "should I order more / where is it / what does it consume in")
- Which fields are tier 1 / 2 / 3 / 4? (with explicit cut-offs)
- What's missing from the response model that the card needs? (e.g., UoM is on the parent item but not on
VariantDetailsResponse; stock summary requires a separate fetch)
- What actions are most likely next? (different per entity type)
Each builder gets its own focused issue tracking the answer to those four questions + the implementation. This umbrella tracks the rollup.
Sub-issues to file
| Builder |
Issue |
Status |
build_variant_details_ui |
#TBD (filing alongside this umbrella) |
filed first |
build_item_detail_ui |
TBD |
|
build_inventory_check_ui |
TBD (paired with #529) |
|
build_low_stock_ui |
TBD |
|
build_order_preview_ui (PO / SO / MO) |
TBD — may split per entity |
|
build_order_created_ui |
TBD |
|
build_fulfill_preview_ui / build_fulfill_success_ui |
TBD |
|
build_verification_ui |
TBD |
|
build_item_mutation_ui |
TBD |
|
build_receipt_ui |
TBD |
|
build_batch_recipe_update_ui |
TBD |
|
(Sub-issues will be filed as the design work is done — this issue tracks the umbrella so subsequent work has context.)
Cross-cutting concerns to settle once
A few decisions affect every builder. Settle these on the variant-details starter first, then apply to the rest:
- When to enrich with extra fetches — variant card should arguably show stock summary, but that's a separate API call. Threshold for "worth the round-trip": is the field so important to the typical decision that omitting it makes the card useless? (UoM yes / stock probably yes / config_attributes maybe / barcodes no)
- How to render
katana_url — currently a separate field; should it be a link button? An auto-attached button on every card?
- Action button consistency — every entity card has 0-2 buttons today; should there be a standard action set per entity type?
- Empty / N/A handling — when a field is None, do we omit it (current pattern, sometimes), show "N/A" (current pattern, other times), or use a small italic placeholder?
Out of scope
- Backend response model changes that aren't needed for cards (the response models are already exhaustive for most entities).
- Markdown rendering changes — this issue is specifically about the Prefab card UI shown in MCP-Apps-capable hosts.
- New entity tools — restructuring what already exists.
Discovered in
User session 2026-05-05 — agent had to guess unit-of-measure on a tubeless sealant variant because the variant card didn't show UoM, even though the parent item has it.
Related
Summary
The Prefab UI cards we render today were built ad-hoc per tool and surface inconsistent (and often incomplete) information for each entity type. Real session 2026-05-05: agent looked at a
get_variant_detailscard for tubeless tire sealant and had to guess the unit of measure ("250 = 250ml presumably") because UoM isn't on the variant card — even though it's a critical fact for any inventory decision.Background
13 card builders today in
katana_mcp_server/src/katana_mcp/tools/prefab_ui.py:build_search_results_uisearch_itemsbuild_variant_details_uiget_variant_detailsbuild_item_detail_uiget_itembuild_inventory_check_uicheck_inventorybuild_low_stock_uilist_low_stock_itemsbuild_order_preview_uicreate_purchase_order/create_sales_order/create_manufacturing_orderpreviewsbuild_order_created_uibuild_fulfill_preview_ui/build_fulfill_success_uifulfill_orderbuild_verification_uiverify_order_documentbuild_item_mutation_uicreate_item/modify_itembuild_receipt_uireceive_purchase_orderbuild_batch_recipe_update_uimodify_manufacturing_order(update_recipe_rows=...)Each was built when its tool shipped, with limited cross-pollination. The result is uneven information density, inconsistent visual hierarchy, and missing decision-critical fields.
Design proposal — per-entity field hierarchy
Every card should follow the same three-tier shape, but the specific fields in each tier vary by entity type:
The tiers stay constant; the field choices per tier are designed per entity type, not copied from a generic template.
Per-entity priority pass
Each builder should be redesigned with explicit answers to:
VariantDetailsResponse; stock summary requires a separate fetch)Each builder gets its own focused issue tracking the answer to those four questions + the implementation. This umbrella tracks the rollup.
Sub-issues to file
build_variant_details_uibuild_item_detail_uibuild_inventory_check_uibuild_low_stock_uibuild_order_preview_ui(PO / SO / MO)build_order_created_uibuild_fulfill_preview_ui/build_fulfill_success_uibuild_verification_uibuild_item_mutation_uibuild_receipt_uibuild_batch_recipe_update_ui(Sub-issues will be filed as the design work is done — this issue tracks the umbrella so subsequent work has context.)
Cross-cutting concerns to settle once
A few decisions affect every builder. Settle these on the variant-details starter first, then apply to the rest:
katana_url— currently a separate field; should it be a link button? An auto-attached button on every card?Out of scope
Discovered in
User session 2026-05-05 — agent had to guess unit-of-measure on a tubeless sealant variant because the variant card didn't show UoM, even though the parent item has it.
Related
katana_mcp_server/src/katana_mcp/tools/prefab_ui.py— current builderskatana_mcp_server/src/katana_mcp/tools/foundation/items.py—VariantDetailsResponse(the data the variant card reads)check_inventoryper-location breakdown (relates to stock-card design)