Skip to main content
Glama
smith-nathanh

Oracle MCP Server

list_procedures

Retrieve stored procedures, functions, and packages from Oracle Database schemas to analyze database structure and capabilities.

Instructions

List all stored procedures, functions, and packages

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerNoFilter by schema owner (optional)

Implementation Reference

  • Handler for the 'list_procedures' tool within the call_tool method. Extracts the 'owner' parameter, calls DatabaseInspector.get_procedures(), and returns JSON-formatted list of procedures.
    elif name == "list_procedures":
        owner = arguments.get("owner")
        procedures = await self.inspector.get_procedures(owner)
    
        return [
            TextContent(
                type="text",
                text=json.dumps(
                    {"procedures": procedures}, indent=2, default=str
                ),
            )
        ]
  • Registration of the 'list_procedures' tool in the list_tools() handler, defining its name, description, and input schema (optional 'owner' parameter).
    Tool(
        name="list_procedures",
        description="List all stored procedures, functions, and packages",
        inputSchema={
            "type": "object",
            "properties": {
                "owner": {
                    "type": "string",
                    "description": "Filter by schema owner (optional)",
                    "default": None,
                }
            },
        },
    ),
  • Input schema definition for 'list_procedures' tool: object with optional 'owner' string property.
    Tool(
        name="list_procedures",
        description="List all stored procedures, functions, and packages",
        inputSchema={
            "type": "object",
            "properties": {
                "owner": {
                    "type": "string",
                    "description": "Filter by schema owner (optional)",
                    "default": None,
                }
            },
        },
    ),
  • Core helper method DatabaseInspector.get_procedures() that executes SQL query on ALL_OBJECTS to list procedures, functions, and packages, optionally filtered by owner, returning structured metadata.
    async def get_procedures(self, owner: Optional[str] = None) -> List[Dict[str, Any]]:
        """Get list of stored procedures and functions"""
        conn = await self.connection_manager.get_connection()
        try:
            cursor = conn.cursor()
    
            query = """
                SELECT 
                    owner,
                    object_name,
                    object_type,
                    status,
                    created,
                    last_ddl_time
                FROM all_objects
                WHERE object_type IN ('PROCEDURE', 'FUNCTION', 'PACKAGE')
            """
    
            params = []
    
            if owner:
                query += " AND owner = :owner"
                params.append(owner)
    
            query += " ORDER BY owner, object_type, object_name"
    
            cursor.execute(query, params)
    
            procedures = []
            for row in cursor:
                procedures.append(
                    {
                        "owner": row[0],
                        "object_name": row[1],
                        "object_type": row[2],
                        "status": row[3],
                        "created": row[4].isoformat() if row[4] else None,
                        "last_ddl_time": row[5].isoformat() if row[5] else None,
                    }
                )
    
            return procedures
    
        finally:
            conn.close()
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. It states the action ('List all') but doesn't describe traits such as whether this is a read-only operation, potential performance impacts, pagination, or output format. This leaves significant gaps for a tool that likely returns a list of database objects.

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 directly states the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse quickly, which is ideal for conciseness.

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 complexity of listing database objects, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, usage context, and what the output entails (e.g., format, structure), making it inadequate for an agent to fully understand how to use this tool effectively.

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 description adds no parameter information beyond what the input schema provides, which has 100% coverage for the single optional parameter 'owner'. Since the schema fully documents the parameter, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 ('List') and resource ('stored procedures, functions, and packages'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_tables' or 'list_views' beyond the resource type, which slightly reduces clarity in a context with multiple listing tools.

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 'list_tables' or 'list_views'. It lacks context about scenarios where listing procedures is preferred, prerequisites, or exclusions, leaving the agent to infer usage based on tool names alone.

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/smith-nathanh/oracle-mcp-server'

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