Skip to main content
Glama
anpy-j

MCP Oracle Server

by anpy-j

list_tables

Retrieve all table names in an Oracle database using the MCP Oracle Server for database interaction and management tasks.

Instructions

Get a list of all tables in the oracle database

Args:
    None

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Core implementation of list_tables tool: queries Oracle user_tables and returns newline-separated list of table names.
    async def list_tables() -> list:
        tables = []
        try:
            # Run database operations in a separate thread
            def db_operation():
                result_tables = []
                with cx_Oracle.connect(connection_string) as conn:
                    cursor = conn.cursor()
                    cursor.execute(
                        "SELECT table_name FROM user_tables ORDER BY table_name")
                    for row in cursor:
                        result_tables.append(row[0])
                return '\n'.join(result_tables)
    
            return await asyncio.to_thread(db_operation)
        except cx_Oracle.DatabaseError as e:
            print('Error occurred:', e)
            return str(e)
  • Core implementation of list_tables tool: queries Oracle user_tables and returns newline-separated list of table names.
    async def list_tables() -> list:
        tables = []
        try:
            # Run database operations in a separate thread
            def db_operation():
                result_tables = []
                with cx_Oracle.connect(connection_string) as conn:
                    cursor = conn.cursor()
                    cursor.execute(
                        "SELECT table_name FROM user_tables ORDER BY table_name")
                    for row in cursor:
                        result_tables.append(row[0])
                return '\n'.join(result_tables)
    
            return await asyncio.to_thread(db_operation)
        except cx_Oracle.DatabaseError as e:
            print('Error occurred:', e)
            return str(e)
  • Registers the list_tables tool using @mcp.tool() decorator on FastMCP server, delegating to oracle_tools.list_tables().
    @mcp.tool()
    async def list_tables() -> str:
        """Get a list of all tables in the oracle database
    
        Args:
            None
        """
        return await oracle_tools.list_tables()
  • Registers the list_tables tool using @mcp.tool() decorator on FastMCP server, delegating to oracle_tools.list_tables().
    @mcp.tool()
    async def list_tables() -> str:
        """Get a list of all tables in the oracle database
    
        Args:
            None
        """
        return await oracle_tools.list_tables()
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. It states the action but doesn't describe traits like whether it's read-only, requires authentication, has rate limits, or what the output format entails. This is a significant gap 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.

Conciseness4/5

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

The description is appropriately sized and front-loaded with the core purpose in the first sentence. The second sentence ('Args: None') is redundant given the schema but not wasteful. It could be slightly more concise by omitting the args note, but overall it's efficient.

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 the tool's low complexity (0 parameters) and the presence of an output schema, the description is minimally adequate. However, with no annotations and no guidance on usage versus siblings, it lacks completeness for effective agent operation, though the output schema mitigates some gaps.

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 the absence of parameters. The description explicitly states 'Args: None', which adds no semantic value beyond the schema but aligns perfectly. Baseline is 4 for 0 parameters, as there's nothing to compensate for.

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 a list') and resource ('all tables in the oracle database'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'describe_table' or 'reqd_query', which would require a 5.

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 like 'describe_table' or 'reqd_query'. It lacks any context about use cases, prerequisites, or exclusions, leaving the agent without direction on tool selection.

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/anpy-j/mcp-oracle'

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