← 返回 Skills 市场
🔌

Mongodb Connector

作者 AgentPMT · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
36
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install mongodb-connector
功能描述
MongoDB Connector: Connect to a user's cloud-hosted MongoDB instance and run 24 permission-gated database operations. Use when an agent needs mongodb connect...
使用说明 (SKILL.md)

MongoDB Connector

Freshness

Last updated: 2026-06-09.

If the current date is more than 7 days after the last updated date, reinstall this skill from skills.sh or ClawHub before relying on endpoints, schemas, setup steps, or examples.

What This Tool Does

Connect your own MongoDB database and query, insert, update, delete, and aggregate documents without leaving your workflow. Browse databases and collections, inspect indexes, and run full aggregation pipelines including joins, grouping, and windowed analytics. Create and manage Atlas Search indexes for full-text search and Atlas Vector Search indexes for semantic similarity and RAG applications. Export query results as downloadable CSV or JSON files for use in spreadsheets, dashboards, or data pipelines. Execute atomic find-and-modify operations and batch mixed writes in a single round trip with bulk_write. Manage collection lifecycles with create, drop, and schema validation. Access is fully permission-gated with four levels — read, write, delete, and admin — so you stay in control of what agents can do with your data. Works with MongoDB Atlas and any cloud-hosted or publicly accessible MongoDB instance.

Product Instructions

MongoDB

Connect to a cloud-hosted MongoDB database and run queries, inserts, updates, deletes, aggregations, index management, Atlas Search, and Vector Search. Export results as CSV or JSON files. Supports MongoDB Atlas and any publicly accessible MongoDB instance.

Permissions

Access is controlled by a permissions array injected by the platform:

  • read (default if omitted): find, count, list, aggregate, distinct
  • write: insert, update, replace, find_one_and_update, bulk_write
  • delete: delete documents, find_one_and_delete
  • admin: indexes, search indexes, create/drop collection, run_command

Output Modes

find_documents and aggregate support an output array:

  • ["inline"] (default): return documents in the response
  • ["export"]: save results as a file (CSV or JSON)
  • ["inline", "export"]: both

Use export_format to choose csv or json (default: json).

Read Actions

find_documents

Required: database, collection Optional: filter, projection, sort ([[field, 1/-1]]), limit (1-1000, default 20), skip, output, export_format

Example: {"action":"find_documents","database":"mydb","collection":"users","filter":{"status":"active"},"limit":10}

count_documents

Required: database, collection Optional: filter

estimated_count

Required: database, collection Fast approximate count using collection metadata (no filter support).

list_databases

No required params.

list_collections

Required: database

aggregate

Required: database, collection, pipeline Optional: output, export_format

Supports all pipeline stages including $search, $vectorSearch, $geoNear, $lookup, $graphLookup, $sample.

Example: {"action":"aggregate","database":"mydb","collection":"orders","pipeline":[{"$group":{"_id":"$status","count":{"$sum":1}}}]}

Vector search example: {"action":"aggregate","database":"mydb","collection":"docs","pipeline":[{"$vectorSearch":{"index":"vector_idx","path":"embedding","queryVector":[0.1,0.2,...],"numCandidates":100,"limit":10}}]}

distinct

Required: database, collection, field_name Optional: filter

list_indexes

Required: database, collection Returns all indexes on a collection with key specs, options, and names.

list_search_indexes

Required: database, collection Returns Atlas Search and Vector Search indexes.

Write Actions

insert_documents

Required: database, collection, document (single) or documents (array)

update_documents

Required: database, collection, update Optional: filter, upsert, many (default false)

replace_document

Required: database, collection, document Optional: filter, upsert

find_one_and_update

Atomically find and update a document, returning it. Required: database, collection, update Optional: filter, projection, sort, upsert, return_document ("before" or "after", default "before")

find_one_and_delete

Atomically find and delete a document, returning it. Required: database, collection Optional: filter, projection, sort

bulk_write

Execute mixed batch operations in a single round trip. Required: database, collection, operations

Each operation: {"operation": "insert_one|update_one|update_many|replace_one|delete_one|delete_many", ...params}

Example: {"action":"bulk_write","database":"mydb","collection":"users","operations":[{"operation":"insert_one","document":{"name":"Alice"}},{"operation":"update_one","filter":{"name":"Bob"},"update":{"$set":{"active":true}}}]}

Delete Actions

delete_documents

Required: database, collection Optional: filter, many (default false)

Admin Actions

create_index

Required: database, collection, index_keys Optional: index_name, index_options

Supports all index types: single field, compound, text ([["field","text"]]), geospatial ([["location","2dsphere"]]), hashed, wildcard.

drop_index

Required: database, collection, index_name

create_search_index

Create an Atlas Search or Vector Search index. Required: database, collection, search_index_definition Optional: index_name, search_index_type ("search" or "vectorSearch")

Vector index example: {"action":"create_search_index","database":"mydb","collection":"docs","search_index_type":"vectorSearch","index_name":"vec_idx","search_index_definition":{"fields":[{"type":"vector","path":"embedding","numDimensions":1536,"similarity":"cosine"}]}}

update_search_index

Required: database, collection, index_name, search_index_definition

drop_search_index

Required: database, collection, index_name

create_collection

Required: database, collection Optional: collection_options (validator, capped, timeseries, clusteredIndex, collation, expireAfterSeconds)

drop_collection

Required: database, collection

run_command

Run any MongoDB database command. Required: database, command

Example: {"action":"run_command","database":"mydb","command":{"dbStats":1}} Example: {"action":"run_command","database":"mydb","command":{"collStats":"users"}}

Notes

  • Filters use standard MongoDB query syntax: $eq, $gt, $lt, $in, $regex, $near, $geoWithin, etc.
  • Updates use $set, $unset, $inc, $push, $pull, etc.
  • Sort uses 1 for ascending, -1 for descending
  • Aggregation pipelines with $out or $merge require write permission
  • Max 1000 documents returned per find or aggregate call
  • Atlas Search and Vector Search require search indexes (use create_search_index)
  • Geospatial queries require 2dsphere or 2d indexes (use create_index)

When To Use

  • Use this skill for MongoDB Connector on AgentPMT.
  • Use it when an agent needs this specific tool's behavior, schema, inputs, outputs, and invocation shape.
  • Search and activation keywords: mongodb connector, query mongodb collections, export data as csv or json, run aggregation pipelines, atlas vector search for rag, aggregate, database, collection.
  • Supported action names: aggregate, bulk_write, count_documents, create_collection, create_index, create_search_index, delete_documents, distinct, drop_collection, drop_index, drop_search_index, estimated_count, find_documents, find_one_and_delete, find_one_and_update, insert_documents, list_collections, list_databases, list_indexes, list_search_indexes, replace_document, run_command, update_documents, update_search_index.

Use Cases

  • Query MongoDB collections
  • Export data as CSV or JSON
  • Run aggregation pipelines
  • Atlas Vector Search for RAG
  • Full-text search with Atlas Search
  • Insert and update documents
  • Bulk write operations
  • Manage indexes
  • Create vector search indexes
  • Geospatial queries
  • Schema validation
  • Database administration

Related Product Skills

Categories And Industries

No categories or industry tags are published for this tool.

Actions And Schema

Complete generated action schema: ./schema.md. Supported action count: 24. x402 availability: not enabled for this product.

  • aggregate (action slug: aggregate): Run an aggregation pipeline. Supports $search, $vectorSearch, $geoNear, $lookup, CSV/JSON export. Price: 5 credits. Parameters: collection, database, export_format, output, pipeline.
  • bulk_write (action slug: bulk-write): Execute mixed batch of insert, update, replace, and delete operations Price: 5 credits. Parameters: collection, database, operations.
  • count_documents (action slug: count-documents): Count documents matching a filter Price: 5 credits. Parameters: collection, database, filter.
  • create_collection (action slug: create-collection): Create a collection with optional schema validation, capping, or time series config Price: 5 credits. Parameters: collection, collection_options, database.
  • create_index (action slug: create-index): Create an index (single, compound, text, geospatial, hashed, wildcard) Price: 5 credits. Parameters: collection, database, index_keys, index_name, index_options.
  • create_search_index (action slug: create-search-index): Create an Atlas Search or Vector Search index Price: 5 credits. Parameters: collection, database, index_name, search_index_definition, search_index_type.
  • delete_documents (action slug: delete-documents): Delete one or many documents Price: 5 credits. Parameters: collection, database, filter, many.
  • distinct (action slug: distinct): Get distinct values for a field Price: 5 credits. Parameters: collection, database, field_name, filter.
  • drop_collection (action slug: drop-collection): Drop a collection Price: 5 credits. Parameters: collection, database.
  • drop_index (action slug: drop-index): Drop an index from a collection Price: 5 credits. Parameters: collection, database, index_name.
  • drop_search_index (action slug: drop-search-index): Drop an Atlas Search or Vector Search index Price: 5 credits. Parameters: collection, database, index_name.
  • estimated_count (action slug: estimated-count): Fast approximate document count using collection metadata Price: 5 credits. Parameters: collection, database.
  • find_documents (action slug: find-documents): Query documents with filter, projection, sort, and pagination. Supports CSV/JSON export. Price: 5 credits. Parameters: collection, database, export_format, filter, limit, output, projection, skip, plus 1 more.
  • find_one_and_delete (action slug: find-one-and-delete): Atomically find and delete a document, returning it Price: 5 credits. Parameters: collection, database, filter, projection, sort.
  • find_one_and_update (action slug: find-one-and-update): Atomically find and update a document, returning it Price: 5 credits. Parameters: collection, database, filter, projection, return_document, sort, update, upsert.
  • insert_documents (action slug: insert-documents): Insert one or more documents Price: 5 credits. Parameters: collection, database, document, documents.
  • list_collections (action slug: list-collections): List collections in a database Price: 5 credits. Parameters: database.
  • list_databases (action slug: list-databases): List all accessible databases Price: 5 credits. Parameters: none.
  • list_indexes (action slug: list-indexes): List all indexes on a collection Price: 5 credits. Parameters: collection, database.
  • list_search_indexes (action slug: list-search-indexes): List Atlas Search and Vector Search indexes Price: 5 credits. Parameters: collection, database.
  • replace_document (action slug: replace-document): Replace a single document Price: 5 credits. Parameters: collection, database, document, filter, upsert.
  • run_command (action slug: run-command): Run any MongoDB database command (dbStats, collStats, serverStatus, etc.) Price: 5 credits. Parameters: command, database.
  • update_documents (action slug: update-documents): Update one or many documents Price: 5 credits. Parameters: collection, database, filter, many, update, upsert.
  • update_search_index (action slug: update-search-index): Update an Atlas Search or Vector Search index definition Price: 5 credits. Parameters: collection, database, index_name, search_index_definition.

Live Schema And Examples

Use the compact schema above for ordinary calls. Before a new production integration, or whenever parameters, enum values, nested objects, outputs, or examples are unclear, fetch live details first.

  • Exact schema: call agentpmt-tool-search-and-execution with action: "get_schema", and tool_id: "mongodb-connector".
  • Detailed examples: call agentpmt-tool-search-and-execution with action: "get_instructions" and tool_id: "mongodb-connector", or call this product with action: "get_instructions" when the product tool is already selected.
  • Treat returned live schema and instructions as more specific than this generated summary.

MCP schema lookup through the main AgentPMT MCP server:

{
  "method": "tools/call",
  "params": {
    "name": "AgentPMT-Tool-Search-and-Execution",
    "arguments": {
      "action": "get_schema",
      "tool_id": "mongodb-connector"
    }
  }
}

For live examples, keep the same MCP tool and use these arguments:

{
  "action": "get_instructions",
  "tool_id": "mongodb-connector"
}

Authenticated AgentPMT REST schema lookup body:

{
  "name": "agentpmt-tool-search-and-execution",
  "parameters": {
    "action": "get_schema",
    "tool_id": "mongodb-connector"
  }
}

Authenticated AgentPMT REST live examples body:

{
  "name": "agentpmt-tool-search-and-execution",
  "parameters": {
    "action": "get_instructions",
    "tool_id": "mongodb-connector"
  }
}

Call This Tool

Product slug: mongodb-connector

Marketplace page: https://www.agentpmt.com/marketplace/mongodb-connector

  • AgentPMT account route: first use ../agentpmt-account-mcp-rest-api-setup to connect the main MCP server or REST API for an Agent Group where this tool is enabled.
  • x402 route: not enabled for this product.
  • AgentPMT overview: use ../what-is-agentpmt for marketplace, Agent Group, workflow, MCP, REST, and payment concepts.

If those setup skills are not installed beside this product skill, use the downloads below.

Core AgentPMT setup skills:

  • What AgentPMT is: ../what-is-agentpmt
  • AgentPMT account MCP/REST setup: ../agentpmt-account-mcp-rest-api-setup

skills.sh install script:

npx skills add AgentPMT/agent-skills --skill what-is-agentpmt
npx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setup

MCP call shape after the main AgentPMT MCP server is connected:

{
  "method": "tools/call",
  "params": {
    "name": "MongoDB-Connector",
    "arguments": {
      "action": "aggregate",
      "collection": "example collection",
      "database": "example database",
      "export_format": "json",
      "output": [
        "inline"
      ],
      "pipeline": [
        {}
      ]
    }
  }
}

Use the exact tool name returned by tools/list; the name above is the expected readable form.

Authenticated AgentPMT REST call body:

{
  "name": "mongodb-connector",
  "parameters": {
    "action": "aggregate",
    "collection": "example collection",
    "database": "example database",
    "export_format": "json",
    "output": [
      "inline"
    ],
    "pipeline": [
      {}
    ]
  }
}

Use the setup skill for the account connection details before making REST calls.

Response Handling

  • Treat the returned JSON as the source of truth for this tool call.
  • If the response includes warnings or correction targets, apply them before retrying.
  • If the response includes a passed or success-style boolean, use it as the workflow gate.
  • If validation fails or the response shape is unclear, call get_schema or get_instructions before retrying.
  • If aggregate fails, preserve the request parameters and retry only after fixing schema, auth, or payment errors.

Security

  • Do not place account secrets, wallet private keys, mnemonics, signatures, or payment headers in prompts or logs.
  • Keep tool inputs scoped to the minimum content needed for the task.
  • Use the setup skills for credential handling; this product skill only defines product-specific behavior.

AgentPMT Reference

安全使用建议
Install only for AgentPMT groups and MongoDB users that are tightly permissioned. Prefer read-only credentials unless mutation is required, avoid granting admin/delete access broadly, review every export for sensitive fields, and require human confirmation for delete, drop, bulk_write, and run_command workflows.
能力标签
cryptorequires-walletrequires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is a MongoDB connector, and the documented read/write/delete/admin actions fit that purpose. The concern is scope: it includes deleting documents, dropping collections and indexes, exporting query results, and running any MongoDB database command.
Instruction Scope
The skill discloses permission levels, but the instructions do not require explicit confirmation, dry runs, allowlists, or warnings for destructive actions or unrestricted run_command usage.
Install Mechanism
The artifact consists of markdown skill instructions and schema documentation only; it declares no local command runtime or executable install script.
Credentials
Remote AgentPMT calls are proportionate for a hosted database connector, but the skill requires sensitive database access and can move data into downloadable CSV/JSON files.
Persistence & Privilege
Exported results may persist outside MongoDB as downloadable files, and admin/delete permissions can permanently change or remove database resources if granted.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install mongodb-connector
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /mongodb-connector 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Publish mongodb-connector v1.0.0
元数据
Slug mongodb-connector
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Mongodb Connector 是什么?

MongoDB Connector: Connect to a user's cloud-hosted MongoDB instance and run 24 permission-gated database operations. Use when an agent needs mongodb connect... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 36 次。

如何安装 Mongodb Connector?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install mongodb-connector」即可一键安装,无需额外配置。

Mongodb Connector 是免费的吗?

是的,Mongodb Connector 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Mongodb Connector 支持哪些平台?

Mongodb Connector 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Mongodb Connector?

由 AgentPMT(@agentpmt)开发并维护,当前版本 v1.0.0。

💬 留言讨论