Skip to main content
Glama
baidu

Baidu Vector Database MCP Server

Official
by baidu

describe_index

Retrieve detailed information about a specific index in a Baidu Vector Database table to understand its structure and configuration.

Instructions

Describe index details in the Mochow instance.

Args:
    table_name (str): Name of the table.
    index_name (str): Name of the index to describe.

Returns:
    str: A string containing the details of the index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYes
index_nameYes

Implementation Reference

  • The main execution logic for the 'describe_index' tool, decorated with @mcp.tool() which also serves as registration. It retrieves index details via the connector and formats the response.
    @mcp.tool()
    async def describe_index(table_name: str, index_name: str, ctx: Context = None) -> str:
        """
        Describe index details in the Mochow instance.
    
        Args:
            table_name (str): Name of the table.
            index_name (str): Name of the index to describe.
    
        Returns:
            str: A string containing the details of the index.
        """
        connector = ctx.request_context.lifespan_context.connector
        details = await connector.describe_index_info(table_name, index_name)
        return f"Index details named '{index_name}' for table named '{table_name}' in Mochow instance:\n{str(details)}"
  • Helper method in MochowConnector class that fetches and returns the index information as a dictionary from the database.
    async def describe_index_info(self, table_name: str, index_name: str) -> dict:
        """
        Get detailed information about a index.
    
        Args:
            table_name (str): Name of the table.
            index_name (str): Name of the index.
    
        Returns:
            dict: A dictionary containing index details.
        """
        if self.database is None:
            raise ValueError("Switch to the database before describe index")
        try:
            return self.database.table(table_name).describe_index(index_name).to_dict()
        except Exception as e:
            raise ValueError(f"Failed to get index detail info: {str(e)}")
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns a string with index details, but lacks critical information such as whether this is a read-only operation, what format the details are in, or if there are any error conditions. For a tool with zero annotation coverage, this leaves significant gaps.

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 and front-loaded, with the core purpose stated first, followed by structured sections for arguments and returns. It avoids unnecessary fluff, though the 'Args' and 'Returns' labels could be more integrated into the flow.

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 the tool's complexity (2 parameters, no annotations, no output schema), the description is incomplete. It covers the basic purpose and parameters but lacks details on usage context, behavioral traits, and output format, making it inadequate for an agent to fully understand how to invoke it correctly.

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?

The description includes an 'Args' section that lists and briefly describes the two parameters ('table_name' and 'index_name'), adding meaning beyond the input schema, which has 0% description coverage. However, it doesn't provide examples, constraints, or context for these parameters, so it only partially compensates for the schema gap.

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 tool's purpose as 'Describe index details in the Mochow instance,' which is a specific verb ('describe') applied to a resource ('index details'). It distinguishes from siblings like 'describe_table' by focusing on indexes rather than tables, though it doesn't explicitly contrast them.

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. It doesn't mention when to choose 'describe_index' over 'describe_table' or other siblings, nor does it specify prerequisites like needing to know the table and index names beforehand.

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/baidu/mochow-mcp-server-python'

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