Skip to main content
Glama

list_prestashop_docs

Find PrestaShop documentation files by type and category to access development resources, hooks, APIs, and guides.

Instructions

List PrestaShop documentation files.

Args: doc_type: Filter by type: hook, guide, tutorial, api, reference, component, faq, general category: Filter by category: basics, development, modules, themes, etc.

Returns: List of available documents

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_typeNo
categoryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for the list_prestashop_docs tool. It retrieves documents using list_documents helper, groups them by category, and formats a markdown list with titles, types, paths, limited to 20 per category.
    @mcp.tool()
    def list_prestashop_docs(
        doc_type: Optional[str] = None,
        category: Optional[str] = None
    ) -> str:
        """List PrestaShop documentation files.
    
        Args:
            doc_type: Filter by type: hook, guide, tutorial, api, reference, component, faq, general
            category: Filter by category: basics, development, modules, themes, etc.
    
        Returns:
            List of available documents
        """
        logger.info(f"Listing documents (type={doc_type}, category={category})")
        docs = list_documents(doc_type=doc_type, category=category, limit=50)
    
        if not docs:
            return "No documents found matching the filters"
    
        # Group by category
        by_category = {}
        for doc in docs:
            cat = doc['category']
            if cat not in by_category:
                by_category[cat] = []
            by_category[cat].append(doc)
    
        output = [f"Available PrestaShop Documentation ({len(docs)} documents)\n"]
    
        for category, category_docs in sorted(by_category.items()):
            output.append(f"## {category.title()} ({len(category_docs)} docs)\n")
    
            for doc in category_docs[:20]:  # Limit to 20 per category
                subcat = f" / {doc['subcategory']}" if doc.get('subcategory') else ""
                output.append(f"- **{doc['title']}** ({doc['doc_type']}){subcat}")
                output.append(f"  Path: {doc['path']}")
    
            if len(category_docs) > 20:
                output.append(f"\n  ... and {len(category_docs) - 20} more documents")
            output.append("")
    
        return "\n".join(output)
  • Database helper function that queries the SQLite database for documents matching doc_type and category filters, returning a list of document summaries used by the tool handler.
    def list_documents(
        doc_type: Optional[str] = None,
        category: Optional[str] = None,
        limit: int = 50
    ) -> List[Dict]:
        """List documents with optional filters.
    
        Args:
            doc_type: Filter by document type
            category: Filter by category
            limit: Maximum number of results
    
        Returns:
            List of documents (summary only)
        """
        conn = sqlite3.connect(DB_PATH)
        cursor = conn.cursor()
    
        # Build WHERE clause
        filters = []
        params = []
    
        if doc_type:
            filters.append("doc_type = ?")
            params.append(doc_type)
    
        if category:
            filters.append("category = ?")
            params.append(category)
    
        where_clause = ""
        if filters:
            where_clause = f"WHERE {' AND '.join(filters)}"
    
        query_sql = f"""
            SELECT
                name, title, category, subcategory, doc_type, path
            FROM prestashop_docs
            {where_clause}
            ORDER BY category, subcategory, title
            LIMIT ?
        """
    
        params.append(limit)
    
        try:
            cursor.execute(query_sql, params)
            results = []
    
            for row in cursor.fetchall():
                results.append({
                    "name": row[0],
                    "title": row[1],
                    "category": row[2],
                    "subcategory": row[3],
                    "doc_type": row[4],
                    "path": row[5]
                })
    
            return results
    
        finally:
            conn.close()
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It only states what the tool does (list files) and mentions parameters/returns, but doesn't describe important behavioral aspects like whether this is a read-only operation, if it requires authentication, rate limits, pagination behavior, or what happens when filters return no results.

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 with clear sections (Args, Returns) and uses minimal words to convey the core functionality. The main sentence is front-loaded, though the formatting with separate sections could be slightly more integrated for optimal flow.

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 moderate complexity (2 parameters, no annotations), the description covers basic purpose and parameters but lacks behavioral context. The existence of an output schema means it doesn't need to explain return values in detail, but it should provide more guidance on usage versus siblings and behavioral traits.

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 significant value beyond the input schema, which has 0% description coverage. It explains that 'doc_type' filters by specific documentation types (hook, guide, tutorial, etc.) and 'category' filters by categories (basics, development, modules, etc.), providing essential semantic context that the bare schema lacks.

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 verb 'List' and resource 'PrestaShop documentation files', providing a specific purpose. However, it doesn't distinguish this tool from its sibling 'search_prestashop_docs' or 'list_prestashop_hooks', which would require explicit differentiation to earn a 5.

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 like 'search_prestashop_docs' or 'list_prestashop_hooks'. It mentions filtering parameters but doesn't explain when filtering is appropriate or when other tools might be better suited for specific use cases.

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