Skip to main content
Glama
oceanbase

mcp-oceanbase

Official
by oceanbase

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

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

With no annotations provided, the description carries the full burden. It discloses a key behavioral trait: the requirement to be a sys tenant, which is crucial for authentication. However, it lacks details on rate limits, error handling, or return format, leaving gaps in behavioral context.

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 front-loaded with the core purpose in the first sentence and adds a critical prerequisite in the second. Both sentences earn their place by providing essential information without waste, though it could be slightly more structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and low complexity (0 parameters), the description is minimally adequate. It covers the purpose and a key prerequisite but lacks details on return values or error cases, making it incomplete for full agent guidance.

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 tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a baseline score of 4 for not introducing confusion or redundancy.

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 resource ('all server nodes from oceanbase'), making the purpose specific and understandable. It doesn't explicitly differentiate from siblings like 'get_resource_capacity', but the resource focus is distinct enough for clarity.

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 an implied usage guideline by stating 'You need to be sys tenant to get all server nodes', which indicates a prerequisite context. However, it doesn't explicitly mention when to use this tool versus alternatives like 'get_resource_capacity' or 'get_current_tenant', leaving some ambiguity.

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