A FastAPI-based MCP server that provides tools for managing books in MongoDB. Exposes CRUD operations on a books collection through the Model Context Protocol.
This FastAPI MCP server exposes only a single tool ('get books') with minimal documentation. The tool has a basic description but lacks parameter descriptions (the input schema is empty, which is unusual for any real-world tool). The server uses fastapi-mcp to register tools via FastAPI route metadata, but critical definition-quality elements are missing: there is no input parameter documentation, no output schema formally declared, no error handling guidance, and no pagination support despite operating on a collection. The server is HTTP-based (HTTP/REST via FastAPI), which is appropriate for protocol readiness, but definition quality is severely compromised by under-documentation.
Retrieve all books from the collection
Empty input schema with no parameter documentation. Tool declares Input: {} which suggests no parameters, but provides no schema structure, constraints, or descriptions to guide LLM behavior.
No output schema documented. The tool returns a list of Book objects, but the response structure is not formally declared in the tool definition. LLMs cannot plan downstream operations without knowing what fields to expect.
Tool description is minimal (17 characters: 'Retrieve all books from the collection'). While grammatically correct, it lacks guidance on when to use this tool, what it returns, and any prerequisites. Baseline for A+ tools is 50 - 200 characters with context.
No pagination support. The tool returns all books without limit or offset parameters. If the collection grows large, this will blow context windows and degrade LLM reasoning. Best practice: add limit and offset/page parameters, return total_count, and document the limit.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 39 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 40 | - | v1 |
No error handling guidance. The FastAPI endpoint may fail (e.g., MongoDB connection loss, invalid data in database), but the tool definition provides no error recovery hints. LLMs will see raw HTTP errors with no context on what to do next.
Only one tool exposed. The underlying FastAPI app has full CRUD operations (create_book, get_book, update_book, delete_book), but only 'get books' is registered via mcp.mount_http(include_operations=['get books']). This severely limits the server's utility and violates the composition principle of offering related operations together.