Skip to main content
Glama

get_index_advisor_recommendations

Read-only

Analyzes a SQL++ query and provides recommendations for optimal indexes, including current, recommended secondary, and covering indexes to improve query performance.

Instructions

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

The Index Advisor analyzes the query and provides recommendations for optimal indexes. This tool works with SELECT, UPDATE, DELETE, or MERGE queries. The queries will be run on the specified scope in the specified bucket.

Returns a dictionary with:

  • current_used_indexes: Array of currently used indexes (if any)

  • recommended_indexes: Array of recommended secondary indexes (if any)

  • recommended_covering_indexes: Array of recommended covering indexes (if any)

Each index object contains:

  • index: The CREATE INDEX SQL++ command

  • statements: Array of statement objects with the query and run count

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucket_nameYes
scope_nameYes
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations indicate readOnlyHint=true, and the description reinforces this by stating the tool 'analyzes' and 'provides recommendations' without mentioning side effects. It also details the return structure, offering full transparency about what the tool does and returns.

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 well-structured with front-loaded purpose and bullet points for return values. Every sentence adds value without redundancy, making it concise and easy to scan.

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

Completeness4/5

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

Given three required parameters and no output schema in structured form, the description provides detailed return information and input constraints (query types, scope/bucket). It lacks error handling or prerequisites but is otherwise complete for the tool's domain.

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

Parameters2/5

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

Schema coverage is 0%, yet the description does not describe individual parameters (bucket_name, scope_name, query) beyond mentioning 'specified scope' and 'specified bucket'. It fails to compensate for the lack of schema descriptions, leaving parameter semantics vague.

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

Purpose5/5

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

The description clearly states the tool gets index recommendations from Couchbase Index Advisor for a SQL++ query. It specifies the verb 'get' and resource 'index recommendations', and distinguishes from siblings like 'explain_sql_plus_plus_query' and 'list_indexes' by focusing on recommendation generation.

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

Usage Guidelines4/5

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

The description explains it works with SELECT, UPDATE, DELETE, or MERGE queries and operates on a specified scope and bucket. However, it does not explicitly state when to use this tool versus alternatives like 'list_indexes' or 'explain_sql_plus_plus_query', so guidance is clear but incomplete.

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