Skip to main content
Glama
egarcia74

Warp SQL Server MCP

by egarcia74

list_databases

Retrieve all database names from a SQL Server instance to explore available data sources and manage connections.

Instructions

List all databases on the SQL Server instance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that executes a SQL query on sys.databases to retrieve user databases (excluding system ones), formats and returns the results.
    async listDatabases() {
      const query = `
        SELECT 
          name as database_name,
          database_id,
          create_date,
          collation_name,
          state_desc as state
        FROM sys.databases 
        WHERE name NOT IN ('master', 'tempdb', 'model', 'msdb')
        ORDER BY name
      `;
      const result = await this.executeQuery(query, 'list_databases');
      return this.formatResults(result);
    }
  • Tool schema definition specifying no input parameters are required.
    name: 'list_databases',
    description: 'List all databases on the SQL Server instance',
    inputSchema: { type: 'object', properties: {} }
  • index.js:256-259 (registration)
    Registration in the main tool dispatch switch statement, routing calls to the DatabaseToolsHandler's listDatabases method.
    case 'list_databases':
      return {
        content: await this.databaseTools.listDatabases()
      };

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/egarcia74/warp-sql-server-mcp'

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