Skip to main content
Glama

get_prestashop_doc

Retrieve complete PrestaShop documentation content by specifying the file path, enabling direct access to development guides, hooks, APIs, and theme resources.

Instructions

Get the full content of a specific PrestaShop documentation file.

Args: path: Document path (e.g., 'basics/installation/environments/macos-specific.md')

Returns: Full document content with metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler and registration for the MCP tool 'get_prestashop_doc'. This function is decorated with @mcp.tool(), retrieves the document data using the helper get_document, and formats it for output.
    @mcp.tool()
    def get_prestashop_doc(path: str) -> str:
        """Get the full content of a specific PrestaShop documentation file.
    
        Args:
            path: Document path (e.g., 'basics/installation/environments/macos-specific.md')
    
        Returns:
            Full document content with metadata
        """
        logger.info(f"Getting document: {path}")
        doc = get_document(path)
    
        if not doc:
            return f"Document '{path}' not found. Use search_prestashop_docs() to find documents."
    
        # Format document
        output = [f"# {doc['title']}\n"]
        output.append(f"**Type:** {doc['doc_type']}")
        output.append(f"**Category:** {doc['category']}")
        if doc.get('subcategory'):
            output.append(f"**Subcategory:** {doc['subcategory']}")
        if doc.get('version'):
            output.append(f"**Version:** {doc['version']}")
        output.append(f"**Path:** {doc['path']}\n")
    
        output.append("---\n")
        output.append(doc['content'])
    
        return "\n".join(output)
  • Core helper function that implements the document retrieval logic by querying the SQLite database (prestashop_docs table) using the provided path and returns the full document metadata and content.
    def get_document(path: str) -> Optional[Dict]:
        """Get a specific document by path.
    
        Args:
            path: Document path (e.g., 'basics/installation/system-requirements.md')
    
        Returns:
            Document data or None if not found
        """
        conn = sqlite3.connect(DB_PATH)
        cursor = conn.cursor()
    
        try:
            cursor.execute("""
                SELECT
                    name, title, category, subcategory, doc_type, path,
                    origin, location, content, metadata, version
                FROM prestashop_docs
                WHERE path = ?
            """, (path,))
    
            row = cursor.fetchone()
            if not row:
                return None
    
            return {
                "name": row[0],
                "title": row[1],
                "category": row[2],
                "subcategory": row[3],
                "doc_type": row[4],
                "path": row[5],
                "origin": row[6],
                "location": row[7],
                "content": row[8],
                "metadata": json.loads(row[9]) if row[9] else {},
                "version": row[10]
            }
    
        finally:
            conn.close()
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. It states the tool retrieves 'full content with metadata,' which adds some behavioral context beyond basic retrieval. However, it doesn't disclose critical traits like whether it's read-only (implied but not stated), error handling (e.g., for invalid paths), authentication needs, rate limits, or performance characteristics. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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

Conciseness5/5

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

The description is appropriately sized and front-loaded: the first sentence clearly states the purpose, followed by structured 'Args' and 'Returns' sections. Every sentence earns its place by adding value—no redundant or vague language. It's efficient and well-organized for quick understanding.

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

Completeness4/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 (1 parameter, no nested objects) and the presence of an output schema (which handles return values), the description is mostly complete. It covers purpose, parameter semantics, and return context adequately. However, with no annotations, it could benefit from more behavioral details (e.g., safety, errors) to be fully comprehensive, but the output schema reduces the need for extensive return explanations.

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 description adds meaningful semantics beyond the input schema. The schema has 1 parameter with 0% description coverage (just 'path' as a string). The description explains that 'path' is a 'Document path' and provides an example ('basics/installation/environments/macos-specific.md'), clarifying the expected format and usage. This compensates well for the low schema coverage, though it could specify path constraints or structure more explicitly.

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 the full content of a specific PrestaShop documentation file.' It specifies the verb ('Get') and resource ('PrestaShop documentation file'), distinguishing it from siblings like list_prestashop_docs (which lists files) and search_prestashop_docs (which searches content). However, it doesn't explicitly differentiate from get_prestashop_hook, which might retrieve hook documentation, making it slightly less specific than a perfect 5.

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

Usage Guidelines3/5

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

The description implies usage by mentioning 'specific PrestaShop documentation file,' suggesting it's for retrieving a known file rather than listing or searching. It doesn't provide explicit when-to-use vs. alternatives (e.g., use list_prestashop_docs to find paths first, or search_prestashop_docs for unknown content), nor does it mention prerequisites or exclusions. The context is clear but lacks detailed guidance.

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/prestashop-mcp'

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