Skip to main content
Glama

get_all_server_nodes

Retrieve all server nodes from OceanBase by executing the command as a sys tenant.

Instructions

Get all server nodes from oceanbase. You need to be sys tenant to get all server nodes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_all_server_nodes' tool. It is registered via @app.tool() decorator. Verifies sys tenant access, executes SQL query on DBA_OB_SERVERS using the execute_sql tool, and returns results or error.
    @app.tool() def get_all_server_nodes(): """ Get all server nodes from oceanbase. You need to be sys tenant to get all server nodes. """ tenant = json.loads(get_current_tenant())["data"][0][0] if tenant != "sys": raise ValueError("Only sys tenant can get all server nodes") logger.info("Calling tool: get_all_server_nodes") sql_query = "select * from oceanbase.DBA_OB_SERVERS" try: return execute_sql(sql_query) except Error as e: logger.error(f"Error executing SQL '{sql_query}': {e}") return f"Error executing query: {str(e)}"

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/oceanbase/mcp-oceanbase'

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