Skip to main content
Glama
Symfomany

Recettes MCP Server

by Symfomany

query_ustensils

Search and retrieve cooking utensils from a recipe database to identify required kitchen tools for meal preparation.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:418-427 (handler)
    The asynchronous handler function for the 'query_ustensils' tool. It connects to a local MongoDB instance, queries the 'ustensils' collection in the 'recipies' database with an optional query dict, converts results to JSON-serializable format using _to_jsonable, and returns the list of documents.
    async def query_ustensils(query: Optional[Dict] = None) -> List[Dict]:
        """Interroge la collection 'ustensils' de la base de données MongoDB 'recipies'."""
        client = MongoClient('mongodb://localhost:27017/')
        db = client['recipies']
        collection = db['ustensils']
        query = query or {}
        results = list(collection.find(query))
        client.close()
        
        return [_to_jsonable(doc) for doc in results]
  • main.py:414-417 (registration)
    The @mcp.tool decorator that registers the 'query_ustensils' tool, specifying its name and description.
    @mcp.tool(
        name="query_ustensils",
        description="Queries the 'ustensils' collection of the 'recipies' MongoDB database.",
    )
  • main.py:25-38 (helper)
    Helper utility function used by the 'query_ustensils' handler (and others) to recursively convert MongoDB documents containing ObjectId and datetime objects into JSON-serializable dictionaries.
    def _to_jsonable(doc: Dict[str, any]) -> Dict[str, any]:
        out = {}
        for k, v in doc.items():
            if isinstance(v, ObjectId):
                out[k] = str(v)
            elif isinstance(v, datetime):
                out[k] = v.isoformat()
            elif isinstance(v, dict):
                out[k] = _to_jsonable(v)
            elif isinstance(v, list):
                out[k] = [_to_jsonable(x) if isinstance(x, dict) else x for x in v]
            else:
                out[k] = v
        return out
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It only states the basic action of querying a MongoDB collection, without mentioning potential side effects, authentication needs, rate limits, or the nature of the query operation (e.g., read-only, pagination, error handling). This leaves significant gaps in understanding the tool's behavior, warranting a low score.

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 a single, direct sentence that efficiently conveys the core purpose without unnecessary words. It is front-loaded with the essential information, making it highly concise and well-structured, which earns the maximum score of 5.

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 complexity (a query operation with 1 parameter), the lack of annotations, and the presence of an output schema (which reduces the need to describe return values), the description is minimally adequate. It identifies the target but misses details on parameters, usage, and behavior. This results in a baseline score of 3, as it meets the minimum viable threshold but has clear gaps.

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

Parameters2/5

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

The input schema has 1 parameter with 0% description coverage, and the tool description does not add any semantic information about the 'query' parameter. It does not explain what the query object should contain, how to structure it for the 'ustensils' collection, or provide examples. This fails to compensate for the low schema coverage, leading to a score of 2.

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 action ('Queries') and the target resource (the 'ustensils' collection of the 'recipies' MongoDB database), making the purpose understandable. However, it does not distinguish this tool from sibling query tools like 'query_comments' or 'query_users' beyond the specific collection name, which is why it scores a 4 rather than 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. It does not mention sibling tools like 'list_ingredients' or 'search_by_ingredient' that might serve similar purposes, nor does it specify contexts or prerequisites for use. This lack of comparative or contextual advice results in a score of 2.

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

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