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()

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