Skip to main content
Glama
Symfomany

Recettes MCP Server

by Symfomany

query_comments

Retrieve user comments from a culinary recipes database to analyze feedback, improve dishes, and understand community preferences.

Instructions

Queries the 'comments' collection of the 'recipies' MongoDB database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo

Implementation Reference

  • main.py:382-385 (registration)
    Registration of the 'query_comments' tool using the @mcp.tool decorator, specifying name and description.
    @mcp.tool( name="query_comments", description="Queries the 'comments' collection of the 'recipies' MongoDB database.", )
  • main.py:386-395 (handler)
    The main handler function for the 'query_comments' tool. It connects to the local MongoDB instance, queries the 'comments' collection in the 'recipies' database with the provided query dictionary (or empty), converts results to JSON-serializable format using _to_jsonable, and returns the list of dictionaries.
    async def query_comments(query: Optional[Dict] = None) -> List[Dict]: """Interroge la collection 'comments' de la base de données MongoDB 'recipies'.""" client = MongoClient('mongodb://localhost:27017/') db = client['recipies'] collection = db['comments'] query = query or {} results = list(collection.find(query)) client.close() return [_to_jsonable(doc) for doc in results]

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/Symfomany/mcp-tuto'

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