Skip to main content
Glama

get_prestashop_doc

Retrieve complete PrestaShop documentation content by specifying a file path, enabling developers to access specific technical guides and resources directly.

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

Implementation Reference

  • The handler function for the MCP tool 'get_prestashop_doc'. It is registered via @mcp.tool() decorator, includes schema in docstring, retrieves the document using the get_document helper, and formats the output with metadata.
    @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)
  • Supporting helper function that queries the SQLite database (prestashop_docs table) to fetch the full document data by path, used by the get_prestashop_doc tool handler.
    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()

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