Skip to main content
Glama

get_buckets_in_cluster

Retrieve the names of all accessible buckets in a Couchbase cluster to identify available data containers for querying or management.

Instructions

Get the names of all the accessible buckets in the cluster.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'get_buckets_in_cluster' tool. It retrieves the cluster connection and lists all accessible bucket names using the Couchbase SDK.
    def get_buckets_in_cluster(ctx: Context) -> list[str]:
        """Get the names of all the accessible buckets in the cluster."""
        cluster = get_cluster_connection(ctx)
        bucket_manager = cluster.buckets()
        buckets_with_settings = bucket_manager.get_all_buckets()
    
        buckets = []
        for bucket in buckets_with_settings:
            buckets.append(bucket.name)
    
        return buckets
  • Registration of all tools, including 'get_buckets_in_cluster', to the FastMCP server instance via a loop over ALL_TOOLS.
    for tool in ALL_TOOLS:
        mcp.add_tool(tool)
  • Import of the 'get_buckets_in_cluster' handler from the server module into the tools package, making it available for inclusion in ALL_TOOLS.
    from .server import (
        get_buckets_in_cluster,
        get_cluster_health_and_services,
        get_collections_in_scope,
        get_scopes_and_collections_in_bucket,
        get_scopes_in_bucket,
        get_server_configuration_status,
        test_cluster_connection,
    )
  • The ALL_TOOLS list that includes 'get_buckets_in_cluster' for bulk registration in the MCP server.
    ALL_TOOLS = [
        get_buckets_in_cluster,
        get_server_configuration_status,
        test_cluster_connection,
        get_scopes_and_collections_in_bucket,
        get_collections_in_scope,
        get_scopes_in_bucket,
        get_document_by_id,
        upsert_document_by_id,
        delete_document_by_id,
        get_schema_for_collection,
        run_sql_plus_plus_query,
        get_index_advisor_recommendations,
        list_indexes,
        get_cluster_health_and_services,
        get_queries_not_selective,
        get_queries_not_using_covering_index,
        get_queries_using_primary_index,
        get_queries_with_large_result_count,
        get_queries_with_largest_response_sizes,
        get_longest_running_queries,
        get_most_frequent_queries,
    ]
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'accessible buckets' which hints at permission constraints, but doesn't specify what makes a bucket accessible, whether there are rate limits, pagination considerations, or what happens if no buckets are accessible. For a list operation with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core functionality without unnecessary words. It's front-loaded with the essential information ('Get the names of all the accessible buckets') and adds only necessary qualification ('in the cluster'). Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has zero parameters, 100% schema coverage, and an output schema exists, the description is minimally adequate. However, as a list operation with no annotations, it should ideally mention whether results are paginated, sorted, or filtered. The existence of an output schema means the description doesn't need to explain return values, but more behavioral context would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters (schema coverage 100%), so the description doesn't need to explain any inputs. The baseline for zero-parameter tools is 4, as there's no parameter documentation burden. The description appropriately focuses on what the tool returns rather than what it accepts.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('names of all the accessible buckets in the cluster'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'get_scopes_and_collections_in_bucket' or 'get_scopes_in_bucket', but the focus on bucket names rather than scopes/collections provides implicit differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, timing considerations, or comparison to sibling tools like 'get_scopes_in_bucket' or 'get_scopes_and_collections_in_bucket' that might provide overlapping functionality. The agent must infer usage context from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/Couchbase-Ecosystem/mcp-server-couchbase'

If you have feedback or need assistance with the MCP directory API, please join our Discord server