Skip to main content
Glama
oceanbase

mcp-oceanbase

Official
by oceanbase

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)}"
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the sys tenant requirement, which is useful context about authentication needs. However, it lacks details on what 'resource capacity' entails (e.g., memory, CPU, storage), potential rate limits, error handling, or the format of the returned data, leaving significant gaps in transparency for a tool with no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief with two sentences, making it efficient and front-loaded. However, the second sentence could be more integrated or structured for clarity, and there's some room for improvement in flow, but overall it avoids unnecessary verbosity.

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 the complexity of retrieving system resource data, the description is incomplete. With no annotations and no output schema, it fails to explain what 'resource capacity' includes, the format of the return values, or any behavioral traits beyond the sys tenant requirement. This leaves the agent with insufficient information to understand the tool's full context and output.

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 input schema has 0 parameters with 100% coverage, so the schema fully documents that no inputs are required. The description doesn't add parameter information, which is acceptable in this case. Since there are no parameters, the baseline score is 4, as the description doesn't need to compensate for any gaps.

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 verb 'Get' and the resource 'resource capacity from oceanbase', making the purpose understandable. However, it doesn't differentiate this tool from sibling tools like 'get_all_server_nodes' or 'get_current_tenant', which also retrieve information from OceanBase, so it doesn't fully distinguish its specific scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some usage context by stating 'You need to be sys tenant to get resource capacity', which implies a prerequisite for use. However, it doesn't explicitly state when to use this tool versus alternatives like 'get_all_server_nodes' or provide exclusions, leaving the guidelines somewhat implied rather than comprehensive.

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

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