Skip to main content
Glama

get_liquid_object

Retrieve complete documentation for Shopify Liquid objects like 'product', 'cart', or 'shop' to understand their properties and usage in theme development.

Instructions

Get documentation for a specific Shopify Liquid object.

Args: object_name: Name of the object (e.g., 'product', 'cart', 'shop')

Returns: Complete object documentation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
object_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the get_liquid_object tool. It takes an object_name parameter, retrieves the corresponding documentation using get_document('objects', object_name), and returns the content or an error message if not found. The docstring defines the input/output schema.
    @mcp.tool()
    def get_liquid_object(object_name: str) -> str:
        """Get documentation for a specific Shopify Liquid object.
    
        Args:
            object_name: Name of the object (e.g., 'product', 'cart', 'shop')
    
        Returns:
            Complete object documentation
        """
        doc = get_document("objects", object_name)
    
        if not doc:
            return f"Object '{object_name}' not found. Use list_liquid_objects() to see available objects."
    
        return doc["content"]
  • Helper function that queries the SQLite database to retrieve a specific document by category and name. Called by the handler with category='objects'.
    def get_document(category: str, name: str) -> Dict[str, str] | None:
        """Get a specific document.
    
        Args:
            category: Category name (tags, filters, or objects)
            name: Document name
    
        Returns:
            Document data or None if not found
        """
        conn = sqlite3.connect(DB_PATH)
        cursor = conn.cursor()
    
        cursor.execute(
            f"""
            SELECT name, title, category, content, path
            FROM {DOCS_TABLE}
            WHERE category = ? AND name = ?
        """,
            (category, name),
        )
    
        row = cursor.fetchone()
        conn.close()
    
        if row:
            return {
                "name": row[0],
                "title": row[1],
                "category": row[2],
                "content": row[3],
                "path": row[4],
            }
        return None
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns 'Complete object documentation,' which hints at a read-only operation, but doesn't explicitly confirm it's safe (non-destructive) or address other traits like error handling, authentication needs, or rate limits. For a tool with zero annotation coverage, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded, with the core purpose stated first, followed by clear sections for 'Args' and 'Returns.' It avoids unnecessary fluff, though the 'Returns' section could be more concise (e.g., 'Documentation for the object' instead of 'Complete object documentation').

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (single parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. It covers the basic purpose and parameter semantics but lacks usage guidelines and behavioral details. With no annotations, it doesn't fully compensate for the missing context, keeping it at a baseline level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate. It adds meaningful context by explaining the parameter 'object_name' with examples ('e.g., 'product', 'cart', 'shop''), which clarifies its purpose beyond the bare schema. However, it doesn't detail constraints like valid object names or formatting rules, preventing a perfect score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get documentation for a specific Shopify Liquid object.' It specifies the verb ('Get') and resource ('documentation for a specific Shopify Liquid object'), making the intent unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_liquid_objects' or 'search_liquid_docs', which would be needed for a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention siblings like 'list_liquid_objects' (for browsing) or 'search_liquid_docs' (for broader searches), nor does it specify prerequisites or exclusions. The agent must infer usage from context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/florinel-chis/shopify-liquid-mcp'

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