Skip to main content
Glama
Symfomany

Recettes MCP Server

by Symfomany

query_users

Search and retrieve user data from the culinary recipes database to manage user profiles and access information.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:402-411 (handler)
    The asynchronous handler function that executes the 'query_users' tool. It connects to a local MongoDB instance, queries the 'users' collection in the 'recipies' database with the provided query (or empty), converts the documents to JSON-serializable format using _to_jsonable, and returns the list.
    async def query_users(query: Optional[Dict] = None) -> List[Dict]:
        """Interroge la collection 'users' de la base de données MongoDB 'recipies'."""
        client = MongoClient('mongodb://localhost:27017/')
        db = client['recipies']
        collection = db['users']
        query = query or {}
        docs  = list(collection.find(query))
        client.close()
        
        return [_to_jsonable(doc) for doc in docs]
  • main.py:398-401 (registration)
    The @mcp.tool decorator that registers the 'query_users' tool with the MCP server, specifying its name and description.
    @mcp.tool(
        name="query_users",
        description="Queries the 'users' collection of the 'recipies' MongoDB database.",
    )
  • main.py:25-38 (helper)
    Helper utility function used by 'query_users' (and similar tools) 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?

With no annotations provided, the description carries full burden but only states it's a query operation without disclosing behavioral traits. It doesn't mention whether this is read-only, if it requires authentication, what the output looks like (though an output schema exists), potential rate limits, or error conditions. For a database query tool, this is a significant gap in transparency.

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 extremely concise—a single sentence that directly states the tool's function without unnecessary words. It's front-loaded with the core action and resource, making it efficient and easy to parse, though this conciseness comes at the cost of completeness.

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 (database query), no annotations, and 0% schema coverage, the description is incomplete. However, the existence of an output schema mitigates some gaps by documenting return values. The description covers the basic purpose but lacks usage context, parameter details, and behavioral transparency needed for effective use.

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?

Schema description coverage is 0%, so the description must compensate but adds no parameter information. It doesn't explain what the 'query' parameter should contain (e.g., MongoDB filter syntax), its purpose, or examples. The single parameter remains undocumented, making it hard for an agent to use correctly without external knowledge.

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 target resource ('users' collection of the 'recipies' MongoDB database), making the purpose immediately understandable. However, it doesn't differentiate from sibling query tools like 'query_comments' or 'query_ustensils' beyond specifying the collection name, missing an opportunity to clarify what makes this query distinct.

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 doesn't mention when to prefer this over other user-related tools (none listed as siblings) or other query tools, and offers no context about prerequisites, limitations, or typical use cases. This leaves the agent with minimal direction.

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