Skip to main content
Glama
apache
by apache

describe_table

Retrieve schema details of a specific table in IoTDB MCP Server to understand its structure and metadata for efficient data management and querying.

Instructions

Get the schema information for a specific table Args: table_name: name of the table to describe

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYes

Implementation Reference

  • The main handler function for the 'describe_table' tool. It is registered via the @mcp.tool() decorator. The function retrieves a TableSession from the pool, executes a 'DESC {table_name} details' query to get schema information, and returns the formatted result using the shared prepare_res helper.
    @mcp.tool() async def describe_table(table_name: str) -> list[TextContent]: """Get the schema information for a specific table Args: table_name: name of the table to describe """ table_session = None try: table_session = session_pool.get_session() res = table_session.execute_query_statement("DESC " + table_name + " details") return prepare_res(res, table_session) except Exception as e: if table_session: table_session.close() logger.error(f"Failed to describe table {table_name}: {str(e)}") raise

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

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