Skip to main content
Glama
apache

IoTDB MCP Server

Official
by apache

list_tables

Retrieve all table names from an IoTDB database to understand available data structures and access schema information.

Instructions

List all tables in the IoTDB database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for list_tables tool. Executes 'SHOW TABLES' query using TableSessionPool and formats results as TextContent.
    @mcp.tool()
    async def list_tables() -> list[TextContent]:
        """List all tables in the IoTDB database."""
        table_session = None
        try:
            table_session = session_pool.get_session()
            res = table_session.execute_query_statement("SHOW TABLES")
    
            result = ["Tables_in_" + db_config["database"]]  # Header
            while res.has_next():
                result.append(str(res.next().get_fields()[0]))
            table_session.close()
            return [TextContent(type="text", text="\n".join(result))]
        except Exception as e:
            if table_session:
                table_session.close()
            logger.error(f"Failed to list tables: {str(e)}")
            raise
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits like whether it's read-only, pagination, rate limits, or error handling, leaving significant gaps for a tool with zero annotation coverage.

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 directly states the tool's purpose without any unnecessary words or fluff. It is appropriately sized and front-loaded.

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, no output schema, and a simple but incomplete description, the tool lacks context on behavior, output format, or usage scenarios. This is inadequate for a tool that might return a list of tables without further details.

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 0 parameters, and schema description coverage is 100%, so no parameter information is needed. The description appropriately doesn't discuss parameters, earning a high baseline score for this dimension.

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 ('List') and resource ('all tables in the IoTDB database'), providing a specific purpose. However, it doesn't explicitly differentiate from sibling tools like 'describe_table' or 'export_table_query', which prevents a perfect score.

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?

No guidance is provided on when to use this tool versus alternatives such as 'describe_table' or 'export_table_query'. The description only states what it does, without context for selection among siblings.

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/apache/iotdb-mcp-server'

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