list_liquid_objects
Retrieve all available Shopify Liquid objects organized by category to identify variables and data accessible in Liquid templates.
Instructions
List all available Shopify Liquid objects.
Returns: List of all object names with titles organized by category
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- shopify_liquid_mcp/server.py:302-373 (handler)The handler function for the 'list_liquid_objects' tool, decorated with @mcp.tool() for registration. Retrieves Liquid objects from the documentation database and formats them into categorized lists (Core, Product Related, Cart & Checkout, etc.).@mcp.tool() def list_liquid_objects() -> str: """List all available Shopify Liquid objects. Returns: List of all object names with titles organized by category """ docs = get_by_category("objects") if not docs: return "No objects found in database" output = [f"Available Liquid Objects ({len(docs)} total):\n"] # Group by category core = [] product_related = [] cart_related = [] customer_related = [] content = [] other_objects = [] for doc in docs: name = doc["name"] title = doc["title"] item = f"- **{name}**: {title}" if name in ["shop", "settings", "theme", "request", "routes"]: core.append(item) elif "product" in name or "variant" in name or "collection" in name: product_related.append(item) elif "cart" in name or "checkout" in name or "line_item" in name: cart_related.append(item) elif "customer" in name or "company" in name: customer_related.append(item) elif name in ["page", "blog", "article", "articles", "comment"]: content.append(item) else: other_objects.append(item) if core: output.append("**Core Objects:**") output.extend(core) output.append("") if product_related: output.append("**Product Related:**") output.extend(product_related) output.append("") if cart_related: output.append("**Cart & Checkout:**") output.extend(cart_related) output.append("") if customer_related: output.append("**Customer Related:**") output.extend(customer_related) output.append("") if content: output.append("**Content:**") output.extend(content) output.append("") if other_objects: output.append("**Other Objects:**") output.extend(other_objects[:15]) if len(other_objects) > 15: output.append(f" ... and {len(other_objects) - 15} more") return "\n".join(output)