4 ms·
This line [1] will become a source of many problems and wasted hours of debugging time. You could at least return a sample document based on random offset or sc
by piterrro 2y ago
This line [1] will become a source of many problems and wasted hours of debugging time.
You could at least return a sample document based on random offset or scan, lets say 1000 docs and infer their shape. Mongodb is schemaless, so theres no guarantee all documents look the same.
In fact the comment is inprecise
> Handler for reading a collection's schema
[1] https://github.com/kiliczsh/mcp-mongo-server/blob/9ffcd8f9fedf15b3faa40b444b59ebfb5217d5cf/src/index.ts#L134 https://github.com/kiliczsh/mcp-mongo-server/blob/9ffcd8f9fe...
- kilic 2y agoHi @piterrro Thanks so much for suggestion, I have created an issue and I will try to find a better way to improve this asap. Please don't hesitate to check and make suggestions on issue: https://github.com/kiliczsh/mcp-mongo-server/issues/14 https://github.com/kiliczsh/mcp-mongo-server/issues/14