Skip to main content
Glama
benpeke

Turbify Store MCP Server

by benpeke

update_items

Modify product details in the Turbify Store catalog, such as price, description, availability, and specifications, while maintaining unique item IDs.

Instructions

Update items in Turbify Merchant Solutions catalog using the Catalog API. TableId and Id cannot be updated. HTML included in the request values must be contained within CDATA tags. Args: items: List of item dictionaries to update. Each item must have: - id (str): Unique item ID, this cannot be updated Returns: JSON string with creation results including success status and any error messages

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes

Implementation Reference

  • The MCP tool handler for 'update_items'. It takes a list of CatalogItem objects, calls the TurbifyStoreAPIClient.update_items method, and returns a formatted JSON response with the API results.
    @mcp.tool() def update_items(items: List[CatalogItem]) -> str: """ Update items in Turbify Merchant Solutions catalog using the Catalog API. TableId and Id cannot be updated. HTML included in the request values must be contained within CDATA tags. Args: items: List of item dictionaries to update. Each item must have: - id (str): Unique item ID, this cannot be updated Returns: JSON string with creation results including success status and any error messages """ try: response = client.update_items(items) return json.dumps({ "status": response.status, "success": response.is_success, "messages": response.success_messages, "errors": response.error_messages, "items_processed": len(items) }, indent=2) except APIError as e: return json.dumps({ "status": "error", "success": False, "errors": [str(e)], "items_processed": 0 }, indent=2)
  • Pydantic BaseModel defining the structure and validation for CatalogItem, which is the input type for the update_items tool (used as List[CatalogItem]).
    class CatalogItem(BaseModel): # Required fields id: str = Field(description="Unique item ID") name: str = Field(description="Item name") price: float = Field(description="Item price", gt=0) orderable: bool = Field(OrderableStatus.YES, description="Whether item is orderable") taxable: bool = Field(TaxableStatus.NO, description="Whether item is taxable") table_id: str = Field(description="Table ID where item belongs") # Optional pricing fields sale_price: Optional[float] = Field(None, description="Sale price of the item") ship_weight: Optional[float] = Field(None, description="Shipping weight of the item") # Optional descriptive fields headline: Optional[str] = Field(None, description="Item headline (used instead of name on item page)") caption: Optional[str] = Field(None, description="Item description/caption") abstract: Optional[str] = Field(None, description="Text used for description on other pages") label: Optional[str] = Field(None, description="Text used when item appears as special on home page") # Optional product information manufacturer: Optional[str] = Field(None, description="Item manufacturer") brand: Optional[str] = Field(None, description="Item brand") gender: Optional[str] = Field(None, description="Gender (men/women/unisex) - for apparel") color: Optional[str] = Field(None, description="Color of the item") size: Optional[str] = Field(None, description="Size of the item") # Optional product codes and identifiers upc: Optional[str] = Field(None, description="Universal Product Code (12-digit)") manufacturer_part_number: Optional[str] = Field(None, description="Manufacturer's part number") model_number: Optional[str] = Field(None, description="Model number") isbn: Optional[str] = Field(None, description="International Standard Book Number") ean: Optional[str] = Field(None, description="European Article Number (13-digit)") # Optional categorization classification: Optional[str] = Field(None, description="Item classification", pattern="^(new|overstock|damaged|returned|refurbished|open box|liquidation|used)$") condition: Optional[str] = Field(None, description="Item condition", pattern="^(New|Like new|Very good|Good|Acceptable|Refurbished|Used)$") merchant_category: Optional[str] = Field(None, description="Merchant category for Yahoo Shopping") # Optional availability and shipping availability: Optional[str] = Field(None, description="Availability status", pattern="^(SAME_DAY|NEXT_DAY|2_3_DAY|3_4_DAY|5_7_DAY|1_2_WEEKS|2_3_WEEKS|4_6_WEEKS|6_8_WEEKS|CONTACT_US|IN_STOCK|AVAILABLE|OUT_OF_STOCK|PRE_ORDER)$") # Optional checkout requirements need_bill: Optional[bool] = Field(None, description="Whether billing address is required") need_payment: Optional[bool] = Field(None, description="Whether payment information is required") need_pay_ship: Optional[bool] = Field(None, description="Whether shipping address is required") # Optional pricing and promotions personalization_charge: Optional[float] = Field(None, description="Charge for monogram/inscription") msrp: Optional[str] = Field(None, description="Manufacturer's suggested retail price") # Optional web and shopping integration product_url: Optional[str] = Field(None, description="Product URL") inyshopping: Optional[bool] = Field(None, description="Include in Yahoo Shopping") yahoo_shopping_category: Optional[str] = Field(None, description="Yahoo Shopping category") # Optional age and media information age_group: Optional[str] = Field(None, description="Age group", pattern="^(infant|toddler|child|pre-teen|teen|adult)$") age_range: Optional[str] = Field(None, description="Age range (for toys)") medium: Optional[str] = Field(None, description="Media type for music/video", pattern="^(CD|Casette|MiniDisc|LPd|EP|45|VHS|Beta|8mm|Laser Disc|DVD|VCD)$") # Optional style information style_number: Optional[str] = Field(None, description="Style number (for apparel/home & garden)") style: Optional[str] = Field(None, description="Style description (e.g., 'chino', 'denim')") promo_text: Optional[str] = Field(None, description="Promotional text (up to 50 chars)", max_length=50) # Optional flags gift_cert: Optional[bool] = Field(None, description="Whether item is a gift certificate") # Custom data and options custom_data: List[CustomData] = Field(default=[], description="List of custom attributes") options: List[ItemOption] = Field(default=[], description="List of item options (size, color, etc.)")
  • Registration of catalog tools (including update_items) by calling register_catalog_tools(mcp) in the server setup.
    # Register all tools register_catalog_tools(mcp)
  • Call to the TurbifyStoreAPIClient helper method within the handler. The actual API client implementation is in turbify_api_client.py.
    response = client.update_items(items) return json.dumps({ "status": response.status, "success": response.is_success, "messages": response.success_messages, "errors": response.error_messages, "items_processed": len(items) }, indent=2) except APIError as e: return json.dumps({ "status": "error", "success": False, "errors": [str(e)], "items_processed": 0 }, indent=2)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/benpeke/turbify_store_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server