Skip to main content
Glama

create_index

Define and create new indexes on specified table columns to optimize query performance and enhance data retrieval efficiency for read-heavy workloads.

Instructions

Create a new index on a specified table to improve query performance. This tool allows users to define indexes on one or more columns, enabling faster data retrieval and optimized execution plans for read-heavy workloads.

Args: table_name (str): Name of the table. index_name (str): Name of the index. columns (List[str]): List of column names to include in the index.

Returns: A success message or an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnsYes
index_nameYes
table_nameYes
Behavior2/5

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

With no annotations provided, the description carries full burden. It mentions the tool creates an index but lacks critical behavioral details: whether it requires specific permissions, if it locks the table during creation, potential performance impact during creation, or if indexes can be created concurrently. The description states it returns 'a success message or an error message' but doesn't specify format or examples.

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

Conciseness4/5

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

The description is appropriately sized with two sentences front-loading the purpose, followed by structured Args and Returns sections. Every sentence adds value, though the Returns section could be more specific (e.g., 'Returns a JSON object with status and message').

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

Completeness2/5

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

Given no annotations, 0% schema coverage, no output schema, and this being a mutation tool (index creation), the description is incomplete. It lacks behavioral transparency details (permissions, locking), parameter constraints, and output specifics, making it inadequate for safe and effective use by an AI agent.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It lists all three parameters in the Args section with basic types, adding minimal semantics (e.g., 'Name of the table', 'List of column names'). However, it doesn't explain constraints (e.g., valid table/column names, column order significance, index naming conventions), leaving gaps despite covering all parameters.

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 creates a new index on a specified table to improve query performance, specifying the verb 'create' and resource 'index' with purpose 'improve query performance'. It distinguishes from siblings like drop_index (deletion) and analyze_performance (analysis).

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 provides clear context for usage ('improve query performance', 'faster data retrieval', 'optimized execution plans for read-heavy workloads'), indicating when to use it. However, it doesn't explicitly state when NOT to use it or name specific alternatives among siblings (e.g., vs. analyze_performance for diagnosis).

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

Related 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/amineelkouhen/mcp-cockroach'

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