Skip to main content
Glama

MongoDB MCP Server

Official
by mongodb-js
explain.test.ts2.66 kB
import { describeAccuracyTests } from "./sdk/describeAccuracyTests.js"; import { Matcher } from "./sdk/matcher.js"; describeAccuracyTests([ { prompt: `Will fetching documents, where release_year is 2020, from 'mflix.movies' namespace perform a collection scan?`, expectedToolCalls: [ { toolName: "explain", parameters: { database: "mflix", collection: "movies", method: [ { name: "find", arguments: { filter: { release_year: 2020 }, }, }, ], verbosity: Matcher.anyOf(Matcher.string(), Matcher.undefined), }, }, ], }, { prompt: `Will aggregating documents, where release_year is 2020, from 'mflix.movies' namespace perform a collection scan?`, expectedToolCalls: [ { toolName: "explain", parameters: { database: "mflix", collection: "movies", method: [ { name: "aggregate", arguments: { pipeline: [ { $match: { release_year: 2020 }, }, ], responseBytesLimit: Matcher.anyOf(Matcher.undefined, Matcher.number()), }, }, ], verbosity: Matcher.anyOf(Matcher.string(), Matcher.undefined), }, }, ], }, { prompt: `Will counting documents, where release_year is 2020, from 'mflix.movies' namespace perform a collection scan?`, expectedToolCalls: [ { toolName: "explain", parameters: { database: "mflix", collection: "movies", method: [ { name: "count", arguments: { query: { release_year: 2020 }, }, }, ], verbosity: Matcher.anyOf(Matcher.string(), Matcher.undefined), }, }, ], }, ]);

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/mongodb-js/mongodb-mcp-server'

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