Skip to main content
Glama

get_resource_capacity

Retrieve resource capacity details from OceanBase for the sys tenant. Use this tool to access and manage system-level resource allocation and utilization data.

Instructions

Get resource capacity from oceanbase. You need to be sys tenant to get resource capacity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_resource_capacity' tool. It verifies sys tenant access, logs the call, and executes a SQL query on GV$OB_SERVERS via the execute_sql tool.
    @app.tool() def get_resource_capacity(): """ Get resource capacity from oceanbase. You need to be sys tenant to get resource capacity. """ tenant = json.loads(get_current_tenant())["data"][0][0] if tenant != "sys": raise ValueError("Only sys tenant can get resource capacity") logger.info("Calling tool: get_resource_capacity") sql_query = "select * from oceanbase.GV$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