get_all_stables
Retrieve all super tables from a TDengine database to analyze database structure and explore available data models for querying.
Instructions
Get all stables.
Args:
db_name (Optional[str]): The name of the database. Defaults to None. When the value is None, it means the configured database is used.
Returns:
TaosSqlResponse: All stables in the current Taos database.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| db_name | No | The name of the database. Default is None which means the configured database. |
Implementation Reference
- The implementation of the 'get_all_stables' MCP tool handler.
@mcp.tool(name="get_all_stables") def get_all_stables( ctx: Context, db_name: Optional[str] = Field( None, description="The name of the database. Default is None which means the configured database.", ), ) -> TaosSqlResponse: """Get all stables. Args: db_name (Optional[str]): The name of the database. Defaults to None. When the value is None, it means the configured database is used. Returns: TaosSqlResponse: All stables in the current Taos database. """ taos = ctx.request_context.lifespan_context.client if db_name is None or db_name == "": db_name = taos.database result = taos.execute_sql(f"SHOW {db_name}.STABLES;") return result