Tools

  • reference
Reference of the tools the Couchbase MCP Server exposes, grouped by category.

The Couchbase MCP Server exposes several tools across multiple categories. The list of supported tools is constantly evolving so check the GitHub readme for the latest set of tools. Each tool is available to LLMs through the MCP protocol.

Cluster Setup & Health

Tools for checking server status and cluster connectivity.

Tool Description

get_server_configuration_status

Get the server status and configuration without connecting to the cluster — reports read-only mode, disabled/confirmation-required tools, OAuth settings, and the resolved logging configuration

test_cluster_connection

Check the cluster credentials by connecting to the cluster

get_cluster_health_and_services

Get cluster health status and list of all running services

Data Model & Schema Discovery

Tools for exploring buckets, scopes, collections, and document schemas. Tools that modify structure are disabled by default when CB_MCP_READ_ONLY_MODE=true.

Tool Description

get_buckets_in_cluster

Get a list of all the buckets in the cluster

get_scopes_in_bucket

Get a list of all the scopes in the specified bucket

get_collections_in_scope

Get a list of all the collections in a specified scope and bucket

get_scopes_and_collections_in_bucket

Get a list of all the scopes and collections in the specified bucket

get_schema_for_collection

Infer the document structure for a collection

create_scope

Create a new scope in a bucket

create_collection

Create a new collection in a scope

delete_scope

Delete an existing scope

delete_collection

Delete an existing collection

Document KV Operations

Tools for reading and writing documents by ID. Tools that modify data are disabled by default when CB_MCP_READ_ONLY_MODE=true.

Tool Description

get_document_by_id

Get a document by ID from a specified scope and collection

upsert_document_by_id

Insert or update a document by ID

insert_document_by_id

Insert a new document by ID (fails if document exists)

replace_document_by_id

Replace an existing document by ID (fails if document does not exist)

delete_document_by_id

Delete a document by ID

lookup_subdocument

Retrieve one or more paths (get, exists, count) from a document without fetching the whole document

mutate_subdocument

Mutate one or more paths in a document (upsert, insert, replace, remove, array_append, array_prepend, array_insert, array_add_unique, counter), optionally creating parent paths that do not exist

Query and Indexing

Tools for running SQL++ queries, listing indexes, and getting index recommendations. Tools that create, build, or drop indexes are disabled by default when CB_MCP_READ_ONLY_MODE=true.

Tool Description

run_sql_plus_plus_query

Run a SQL++ query on a specified scope

explain_sql_plus_plus_query

Provides information about the execution plan for the statement. This includes operators such as scans, joins, and filters; it aids in performance tuning by showing index usage, cost estimates, and data access paths

list_indexes

List all indexes in the cluster with their definitions, with optional filtering. Set return_raw_index_stats=true to return the unprocessed index information.

get_index_advisor_recommendations

Get index recommendations from Couchbase Index Advisor for a given SQL++ query

create_index

Create a non-vector GSI index, deferred by default. Not applicable to vector indexes.

build_index

Build a deferred index. Applies to all index types, including vector indexes.

drop_index

Drop an existing index. Applies to all index types, including vector indexes.

Query Performance Analysis

Tools for identifying slow queries, missing indexes, and optimization opportunities. These tools query system:completed_requests.

Tool Description

get_longest_running_queries

Get longest running queries by average service time

get_most_frequent_queries

Get most frequently executed queries

get_queries_not_selective

Get queries that are not selective

get_queries_not_using_covering_index

Get queries that do not use a covering index

get_queries_using_primary_index

Get queries that use a primary index (potential performance concern)

get_queries_with_largest_response_sizes

Get queries with the largest response sizes

get_queries_with_large_result_count

Get queries with the largest result counts