Skip to main content
Glama
samscarrow

Oracle MCP Server

by samscarrow

list_schemas

Retrieve a list of all schemas in an Oracle database to facilitate database introspection, query execution, and schema management tasks.

Instructions

List all schemas in the database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'list_schemas' tool. It executes a SQL query against the ALL_USERS view to retrieve a list of schemas, categorizing them as SYSTEM or USER, and returns the results as 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 ListToolsRequestSchema handler. Defines the tool name, description, and empty input schema (no parameters required).
    { name: 'list_schemas', description: 'List all schemas in the database', inputSchema: { type: 'object', properties: {} } }
  • Input schema for the 'list_schemas' tool, which is an empty object since no input parameters are required.
    inputSchema: { type: 'object', properties: {} }

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

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