awslabs.documentdb-mcp-server
v2.0.2An AWS Labs Model Context Protocol (MCP) server for documentdb
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
find
Run a query against a DocumentDB collection. This tool queries documents from a specified collection based on a filter. Returns: List[Dict[str, Any]]: List of matching documents
| Parameter | Type | Description |
|---|---|---|
collection * | string | Name of the collection |
database * | string | Name of the database |
query * | object | Query filter (e.g., {"name": "example"}) |
limit | integer | Maximum number of documents to return (default: 10) |
projection | Fields to include/exclude (e.g., {"_id": 0, "name": 1}) |
aggregate
Run an aggregation pipeline against a DocumentDB collection. This tool executes a DocumentDB aggregation pipeline on a specified collection. Returns: List[Dict[str, Any]]: List of aggregation results
| Parameter | Type | Description |
|---|---|---|
collection * | string | Name of the collection |
database * | string | Name of the database |
pipeline * | array | DocumentDB aggregation pipeline |
limit | integer | Maximum number of documents to return (default: 10) |
insert
Insert one or more documents into a DocumentDB collection. This tool inserts new documents into a specified collection. Returns: Dict[str, Any]: Insert operation results including document IDs
| Parameter | Type | Description |
|---|---|---|
collection * | string | Name of the collection |
database * | string | Name of the database |
documents * | Document or list of documents to insert |
update
Update documents in a DocumentDB collection. This tool updates existing documents that match a specified filter. Returns: Dict[str, Any]: Update operation results
| Parameter | Type | Description |
|---|---|---|
collection * | string | Name of the collection |
database * | string | Name of the database |
filter * | object | Filter to select documents to update |
update * | object | Update operations to apply. It should either include DocumentDB operators like $set, or an entire document if the entire document needs to be replaced. |
many | boolean | Whether to update multiple documents (default: False) |
upsert | boolean | Whether to create a new document if no match is found (default: False) |
delete
Delete documents from a DocumentDB collection. This tool deletes documents that match a specified filter. Returns: Dict[str, Any]: Delete operation results
| Parameter | Type | Description |
|---|---|---|
collection * | string | Name of the collection |
database * | string | Name of the database |
filter * | object | Filter to select documents to delete |
many | boolean | Whether to delete multiple documents (default: False) |
listDatabases
List all available databases in the DocumentDB cluster. This tool returns the names of all accessible databases in the connected cluster. Returns: Dict[str, Any]: List of database names
createCollection
Create a new collection in a DocumentDB database. This tool creates a new collection in the specified database. Returns: Dict[str, Any]: Status of collection creation
| Parameter | Type | Description |
|---|---|---|
collection * | string | Name of the collection to create |
database * | string | Name of the database |
listCollections
List collections in a DocumentDB database. This tool returns the names of all collections in a specified database. Returns: List[str]: List of collection names
| Parameter | Type | Description |
|---|---|---|
database * | string | Name of the database |
dropCollection
Drop a collection from a DocumentDB database. This tool completely removes a collection and all its documents from the specified database. This operation cannot be undone, so use it with caution. Returns: Dict[str, Any]: Status of the drop operation
| Parameter | Type | Description |
|---|---|---|
collection * | string | Name of the collection to drop |
database * | string | Name of the database |
countDocuments
Count documents in a DocumentDB collection. This tool counts the number of documents in a collection that match the provided filter. If no filter is provided, it counts all documents. Returns: Dict[str, Any]: Count result
| Parameter | Type | Description |
|---|---|---|
collection * | string | Name of the collection |
database * | string | Name of the database |
filter | Query filter to count specific documents |
getDatabaseStats
Get statistics about a DocumentDB database. This tool retrieves statistics about the specified database, including storage information and collection data. Returns: Dict[str, Any]: Database statistics
| Parameter | Type | Description |
|---|---|---|
database * | string | Name of the database |
getCollectionStats
Get statistics about a DocumentDB collection. This tool retrieves detailed statistics about the specified collection, including size, document count, and storage information. Returns: Dict[str, Any]: Collection statistics
| Parameter | Type | Description |
|---|---|---|
collection * | string | Name of the collection |
database * | string | Name of the database |
analyzeSchema
Analyze the schema of a collection by sampling documents. This tool samples documents from a collection and provides information about the document structure and field coverage across the sampled documents. Returns: Dict[str, Any]: Schema analysis results including field coverage
| Parameter | Type | Description |
|---|---|---|
collection * | string | Name of the collection to analyze |
database * | string | Name of the database |
sample_size | integer | Number of documents to sample (default: 100) |
explainOperation
Get an explanation of how an operation will be executed. This tool returns the execution plan for a query or aggregation operation, helping you understand how DocumentDB will process your operations. Returns: Dict[str, Any]: Operation explanation
| Parameter | Type | Description |
|---|---|---|
collection * | string | Name of the collection |
database * | string | Name of the database |
operation_type * | string | Type of operation to explain (find, aggregate) |
pipeline | Pipeline for DocumentDB aggregation operations | |
query | Query for find operations | |
verbosity | string | Explanation verbosity level (queryPlanner, executionStats) |