Skip to main content
Glama

MongoDB MCP Server

Official
by mongodb-js
collectionSchema.test.ts1.42 kB
import { describeAccuracyTests } from "./sdk/describeAccuracyTests.js"; import { Matcher } from "./sdk/matcher.js"; const listCollectionsOptionalCall = { toolName: "list-collections", parameters: { database: "mflix", }, optional: true, }; describeAccuracyTests([ { prompt: "Is there a title field in 'mflix.movies' namespace?", expectedToolCalls: [ listCollectionsOptionalCall, { toolName: "collection-schema", parameters: { database: "mflix", collection: "movies", sampleSize: Matcher.anyOf(Matcher.undefined, Matcher.number()), responseBytesLimit: Matcher.anyOf(Matcher.undefined, Matcher.number()), }, }, ], }, { prompt: "What is the type of value stored in title field in movies collection in mflix database?", expectedToolCalls: [ listCollectionsOptionalCall, { toolName: "collection-schema", parameters: { database: "mflix", collection: "movies", sampleSize: Matcher.anyOf(Matcher.undefined, Matcher.number()), responseBytesLimit: Matcher.anyOf(Matcher.undefined, Matcher.number()), }, }, ], }, ]);

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