Skip to main content
Glama
oceanbase

mcp-oceanbase

Official
by oceanbase

configure_db_connection

Retrieve and configure OceanBase database connection details. Uses environment variables or user-defined parameters for host, port, user, password, and database. Ensures required fields are provided.

Instructions

Retrieve OceanBase database connection information.
If no parameters are provided, the configuration is loaded from environment variables.
Otherwise, user-defined connection parameters will be used.

:param host: Database host address. Defaults to environment variable OB_HOST or "localhost".
:param port: Database port number. Defaults to environment variable OB_PORT or "2881".
:param user: Database username. Required. Defaults to user input or environment variable OB_USER.
:param password: Database password. Required. Defaults to user input or environment variable OB_PASSWORD.
:param database: Database name. Required. Defaults to user input or environment variable OB_DATABASE.
:return: A dictionary containing the database connection configuration.
:raises ValueError: Raised if any of the required parameters (user, password, database) are missing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseNo
hostNo
passwordNo
portNo
userNo
Behavior4/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 effectively describes the tool's behavior: how it retrieves configuration from environment variables when parameters aren't provided, the fallback defaults, which parameters are required, and what error occurs when requirements aren't met. It doesn't mention rate limits, authentication needs beyond parameters, or what happens to the connection after retrieval, but covers the core operational behavior well.

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 well-structured and appropriately sized. The first paragraph establishes the purpose and usage guidelines, followed by clear parameter documentation. While the parameter documentation section is detailed, every sentence earns its place by providing essential information not available elsewhere. The structure is logical and front-loaded with the most important information.

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

Completeness4/5

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

Given the complexity (5 parameters, no annotations, no output schema), the description provides comprehensive coverage. It explains the tool's purpose, usage scenarios, all parameters with their semantics, return value format, and error conditions. The only minor gap is not explicitly describing the structure of the returned dictionary, but this is reasonable given the tool's scope and the absence of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by providing detailed semantic information for all 5 parameters. Each parameter is clearly explained with its purpose, default values, and environment variable fallbacks. The description adds significant value beyond the bare schema by clarifying which parameters are required and how the system prioritizes different input sources.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Retrieve OceanBase database connection information.' It specifies the exact action (retrieve) and resource (database connection information), distinguishing it from sibling tools like execute_sql or get_all_server_nodes that perform different operations.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: 'If no parameters are provided, the configuration is loaded from environment variables. Otherwise, user-defined connection parameters will be used.' This clearly explains the two usage scenarios and distinguishes it from alternatives by focusing on connection configuration rather than query execution or monitoring.

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

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