Skip to main content
Glama
samscarrow

Oracle MCP Server

by samscarrow

list_schemas

Retrieve all database schemas to enable SQL queries and database introspection across Oracle databases.

Instructions

List all schemas in the database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_schemas' tool. It executes a SQL query against the ALL_USERS view to retrieve distinct schema names, their creation dates, and classifies them as SYSTEM or USER schemas, then returns the results as formatted JSON.
    async handleListSchemas(args) { const query = ` SELECT DISTINCT username AS schema_name, created, CASE WHEN username IN ('SYS', 'SYSTEM', 'DBSNMP', 'SYSMAN') THEN 'SYSTEM' ELSE 'USER' END AS schema_type FROM all_users ORDER BY username `; const result = await this.executeQuery(query); return { content: [ { type: 'text', text: JSON.stringify(result.rows, null, 2) } ] }; }
  • src/index.js:265-272 (registration)
    Registration of the 'list_schemas' tool in the ListToolsRequestHandler, including its name, description, and input schema (empty object since no parameters required).
    { name: 'list_schemas', description: 'List all schemas in the database', inputSchema: { type: 'object', properties: {} } }
  • Input schema definition for the 'list_schemas' tool, specifying an empty object as no input parameters are required.
    inputSchema: { type: 'object', properties: {} }
  • Dispatch case in the CallToolRequestHandler that routes 'list_schemas' calls to the handleListSchemas method.
    case 'list_schemas': return await this.handleListSchemas(args);

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

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