Skip to main content
Glama

MongoDB MCP Server

Official
by mongodb-js
count.test.ts1.33 kB
import { describeAccuracyTests } from "./sdk/describeAccuracyTests.js"; import { Matcher } from "./sdk/matcher.js"; describeAccuracyTests([ { prompt: "Count number of documents in 'mflix.movies' namespace.", expectedToolCalls: [ { toolName: "count", parameters: { database: "mflix", collection: "movies", query: Matcher.emptyObjectOrUndefined, }, }, ], }, { prompt: "How many documents are there in 'characters' collection in 'comics' database?", expectedToolCalls: [ { toolName: "count", parameters: { database: "comics", collection: "characters", query: Matcher.emptyObjectOrUndefined, }, }, ], }, { prompt: "Count all the documents in 'mflix.movies' namespace with runtime less than 100?", expectedToolCalls: [ { toolName: "count", parameters: { database: "mflix", collection: "movies", query: { runtime: { $lt: 100 } }, }, }, ], }, ]);

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