Skip to main content
Glama

MongoDB MCP Server

Official
by mongodb-js
Apache 2.0
8,598
430
  • Apple
  • Linux

rename-collection

Renames a MongoDB collection by specifying the database, collection, and new name, with an option to drop the target collection if it exists.

Instructions

Renames a collection in a MongoDB database

Input Schema

NameRequiredDescriptionDefault
collectionYesCollection name
databaseYesDatabase name
dropTargetNoIf true, drops the target collection if it exists
newNameYesThe new name for the collection

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "collection": { "description": "Collection name", "type": "string" }, "database": { "description": "Database name", "type": "string" }, "dropTarget": { "default": false, "description": "If true, drops the target collection if it exists", "type": "boolean" }, "newName": { "description": "The new name for the collection", "type": "string" } }, "required": [ "database", "collection", "newName" ], "type": "object" }
Install Server

Other Tools from MongoDB MCP Server

Related Tools

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