Skip to main content
Glama
oceanbase

mcp-oceanbase

Official
by oceanbase

get_current_time

Retrieve the current system time from the mcp-oceanbase server for accurate time synchronization and logging purposes.

Instructions

Get current time

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_current_time' tool. It executes SQL 'SELECT NOW()' on OceanBase to get the current time, falling back to Python's local time if the database query fails. The @app.tool decorator registers the tool.
    @app.tool(name="get_current_time", description="Get current time")
    def get_current_time() -> str:
        """Get current time from OceanBase database."""
        logger.info("Calling tool: get_current_time")
        sql_query = "SELECT NOW()"
        try:
            return execute_sql(sql_query)
        except Error as e:
            logger.error(f"Error getting database time: {e}")
            # Fallback to system time if database query fails
            local_time = time.localtime()
            formatted_time = time.strftime("%Y-%m-%d %H:%M:%S", local_time)
            logger.info(f"Fallback to system time: {formatted_time}")
            return formatted_time
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Get current time' implies a read-only operation, but it doesn't specify whether it requires authentication, rate limits, timezone handling, or what format the output is in (e.g., string, timestamp). This leaves significant gaps for a tool with no annotation coverage.

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

Conciseness5/5

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

The description 'Get current time' is extremely concise—a single phrase with no wasted words. It's front-loaded and efficiently communicates the core purpose without unnecessary elaboration, making it ideal for quick understanding.

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 tool's simplicity (0 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain what 'current time' entails (e.g., timezone, format) or behavioral aspects like response type. For a tool with no structured data to rely on, more context is needed to be fully helpful.

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% (since there are no parameters to describe). With no parameters, the description doesn't need to add semantic details beyond what the schema provides, so a baseline of 4 is appropriate, as it adequately handles the lack of parameters.

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

Purpose3/5

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

The description 'Get current time' states a clear verb ('Get') and resource ('current time'), but it's vague about what 'current time' means (e.g., server time, UTC, local time) and doesn't distinguish from siblings like 'get_current_tenant' or 'get_all_server_nodes'. It avoids tautology by not restating the name exactly, but lacks specificity.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention context (e.g., for timestamping operations) or exclusions, and there's no reference to sibling tools. Usage is implied only by the tool name, with no explicit instructions.

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