MongoDB MCP Server
by jonfreeland
text_search
Perform a full-text search on a collection.
Requirements:
- Collection must have a text index
- Only one text index per collection is allowed
Features:
- Supports phrases and keywords
- Word stemming
- Stop words removal
- Text score ranking
Example: use_mcp_tool with server_name: "mongodb", tool_name: "text_search", arguments: { "collection": "articles", "searchText": "mongodb database", "filter": { "published": true }, "limit": 10, "includeScore": true }
Input Schema
Name | Required | Description | Default |
---|---|---|---|
collection | Yes | Collection name | |
database | No | Database name (optional if default database is configured) | |
filter | No | Additional MongoDB query filter (optional) | |
includeScore | No | Include text search score in results (optional) | |
limit | No | Maximum number of results to return (optional) | |
searchText | Yes | Text to search for |