Management: add slug/description/images/is_published to MCP inventory tools #26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
create_inventory_itemandupdate_inventory_itemMCP tools are missing the four store-facing fields (slug,description,images,is_published), making it impossible to publish items to the store catalog via MCP.The server action and REST API already handle these fields correctly — only the MCP tool schemas are incomplete.
Target
apps/management/lib/mcp/tools/inventory.tsChange
slug(optional string matching^[a-z0-9]+(?:-[a-z0-9]+)*$),description(optional string | null),images(optionalstring[]), andis_published(optional boolean) tocreate_inventory_item.update_inventory_item.item_name,type, etc.).InventorySlugSchemafrom@/lib/db/validatorsfor slug validation.inventory_published_slug_check(not is_published OR slug IS NOT NULL) must be respected: ifis_published: trueis passed without a slug, the DB will reject it — surface a clear error rather than letting the Drizzle error bubble up raw.Acceptance
is_published: truewithout a slug returns a clear error message.tsc --noEmitandbiome checkpass.