Skip to main content
Glama
YeomYuJun

Tibero MCP Server

by YeomYuJun

get_table_info

Retrieve detailed table information from Tibero databases to inspect schema structure and column definitions for database analysis and management.

Instructions

Get detailed information about a table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYesThe name of the table

Implementation Reference

  • Handler implementation for the 'get_table_info' tool. It retrieves and formats table structure (columns, constraints, indexes) from the Tibero database.
    elif name == "get_table_info":
        table_name = arguments.get("table_name")
        if not table_name:
            raise ValueError("Table name is required")
        
        # Get table structure
        cursor.execute(f"""
            SELECT column_name, data_type, data_length, nullable
            FROM user_tab_columns 
            WHERE table_name = '{table_name.upper()}'
            ORDER BY column_id
        """)
        columns = cursor.fetchall()
        
        # Get constraint information
        cursor.execute(f"""
            SELECT c.constraint_name, c.constraint_type, 
                   cc.column_name
            FROM user_constraints c
            JOIN user_cons_columns cc ON c.constraint_name = cc.constraint_name
            WHERE c.table_name = '{table_name.upper()}'
            ORDER BY c.constraint_name, cc.position
        """)
        constraints = cursor.fetchall()
        
        # Get index information
        cursor.execute(f"""
            SELECT index_name, uniqueness
            FROM user_indexes
            WHERE table_name = '{table_name.upper()}'
        """)
        indexes = cursor.fetchall()
        
        # Format the results
        result = [f"Table: {table_name.upper()}", ""]
        
        result.append("COLUMNS:")
        result.append("-" * 80)
        result.append("NAME | TYPE | LENGTH | NULLABLE")
        result.append("-" * 80)
        for col in columns:
            nullable = "NULL" if col[3] == "Y" else "NOT NULL"
            result.append(f"{col[0]} | {col[1]} | {col[2]} | {nullable}")
        
        if constraints:
            result.append("")
            result.append("CONSTRAINTS:")
            result.append("-" * 80)
            result.append("NAME | TYPE | COLUMN")
            result.append("-" * 80)
            for con in constraints:
                constraint_type = {
                    "P": "PRIMARY KEY",
                    "U": "UNIQUE",
                    "R": "FOREIGN KEY",
                    "C": "CHECK"
                }.get(con[1], con[1])
                result.append(f"{con[0]} | {constraint_type} | {con[2]}")
        
        if indexes:
            result.append("")
            result.append("INDEXES:")
            result.append("-" * 80)
            result.append("NAME | UNIQUENESS")
            result.append("-" * 80)
            for idx in indexes:
                result.append(f"{idx[0]} | {idx[1]}")
        
        return [TextContent(type="text", text="\n".join(result))]
  • Input schema definition for the 'get_table_info' tool, specifying the required 'table_name' parameter.
    inputSchema={
        "type": "object",
        "properties": {
            "table_name": {
                "type": "string",
                "description": "The name of the table"
            }
        },
        "required": ["table_name"]
    }
  • Registration of the 'get_table_info' tool in the list_tools() function, including name, description, and input schema.
    Tool(
        name="get_table_info",
        description="Get detailed information about a table",
        inputSchema={
            "type": "object",
            "properties": {
                "table_name": {
                    "type": "string",
                    "description": "The name of the table"
                }
            },
            "required": ["table_name"]
        }
    )
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Get detailed information' implies a read-only operation, it doesn't specify what 'detailed information' includes, whether there are permission requirements, rate limits, error conditions, or what format the information comes in. This leaves significant behavioral gaps.

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 is a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a simple tool with one parameter and is perfectly front-loaded.

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?

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'detailed information' means in terms of return values, doesn't address potential errors or constraints, and doesn't help differentiate from the sibling SQL execution tool. The context demands more completeness than provided.

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

Parameters3/5

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

The schema description coverage is 100% with the single parameter 'table_name' well-documented in the schema. The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline for high schema coverage without adding extra value.

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 action ('Get detailed information') and target resource ('about a table'), making the purpose immediately understandable. However, it doesn't differentiate from the sibling tool 'execute_sql' which could also provide table information through SQL queries, so it doesn't reach the highest score.

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 the sibling 'execute_sql' tool, nor does it mention any prerequisites, context, or exclusions. It simply states what the tool does without helping the agent choose between alternatives.

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

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/YeomYuJun/tibero-mcp-server'

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