Skip to main content
Glama
apache

Doris MCP Server

Official
by apache

Дорис MCP Сервер

Doris MCP (Model Control Panel) Server — это бэкэнд-сервис, созданный с помощью Python и FastAPI. Он реализует протокол MCP (Model Control Panel), позволяя клиентам взаимодействовать с ним через определенные «Инструменты». Он в первую очередь предназначен для подключения к базам данных Apache Doris, потенциально используя большие языковые модели (LLM) для таких задач, как преобразование запросов на естественном языке в SQL (NL2SQL), выполнение запросов и выполнение управления и анализа метаданных.

Основные характеристики

  • Реализация протокола MCP : предоставляет стандартные интерфейсы MCP, поддерживающие вызовы инструментов, управление ресурсами и оперативное взаимодействие.

  • Несколько режимов связи :

    • SSE (события, отправленные сервером) : обслуживаются через конечные точки /sse (инициализация) и /mcp/messages (связь) ( src/sse_server.py ).

    • Потоковый HTTP : обслуживается через унифицированную конечную точку /mcp , поддерживая запрос/ответ и потоковую передачу ( src/streamable_server.py ).

    • (Необязательно) Stdio : взаимодействие возможно через стандартный ввод/вывод ( src/stdio_server.py ), требуется определенная конфигурация запуска.

  • Интерфейс на основе инструментов : основные функции инкапсулированы в виде инструментов MCP, которые клиенты могут вызывать по мере необходимости. Доступные в настоящее время ключевые инструменты фокусируются на прямом взаимодействии с базой данных:

    • Выполнение SQL ( mcp_doris_exec_query )

    • Список баз данных и таблиц ( mcp_doris_get_db_list , mcp_doris_get_db_table_list )

    • Извлечение метаданных ( mcp_doris_get_table_schema , mcp_doris_get_table_comment , mcp_doris_get_table_column_comments , mcp_doris_get_table_indexes )

    • Извлечение журнала аудита ( mcp_doris_get_recent_audit_logs ) Примечание: текущие инструменты в основном ориентированы на прямые операции с базами данных.

  • Взаимодействие с базой данных : предоставляет функциональные возможности для подключения к Apache Doris (или другим совместимым базам данных) и выполнения запросов ( src/utils/db.py ).

  • Гибкая конфигурация : настраивается с помощью файла .env , поддерживает настройки для подключений к базе данных, поставщиков/моделей LLM, ключей API, уровней ведения журнала и т. д.

  • Извлечение метаданных : возможность извлечения метаданных базы данных ( src/utils/schema_extractor.py ).

Related MCP server: Superset MCP Server

Системные требования

  • Питон 3.12+

  • Детали подключения к базе данных (например, Doris Host, Port, User, Password, Database)

Быстрый старт

1. Клонировать репозиторий

# Replace with the actual repository URL if different
git clone https://github.com/apache/doris-mcp-server.git
cd doris-mcp-server

2. Установка зависимостей

pip install -r requirements.txt

3. Настройте переменные среды

Скопируйте файл .env.example в .env и измените настройки в соответствии с вашей средой:

cp env.example .env

Ключевые переменные среды:

  • Подключение к базе данных :

    • DB_HOST : Имя хоста базы данных

    • DB_PORT : порт базы данных (по умолчанию 9030)

    • DB_USER : Имя пользователя базы данных

    • DB_PASSWORD : Пароль базы данных

    • DB_DATABASE : Имя базы данных по умолчанию

  • Конфигурация сервера :

    • SERVER_HOST : Адрес хоста, который прослушивает сервер (по умолчанию 0.0.0.0 )

    • SERVER_PORT : Порт, который прослушивает сервер (по умолчанию 3000 )

    • ALLOWED_ORIGINS : разрешенные CORS источники (через запятую, * разрешает все)

    • MCP_ALLOW_CREDENTIALS : разрешать ли учетные данные CORS (по умолчанию false )

  • Конфигурация ведения журнала :

    • LOG_DIR : Каталог для файлов журнала (по умолчанию ./logs )

    • LOG_LEVEL : Уровень журнала (например, INFO , DEBUG , WARNING , ERROR , INFO по умолчанию)

    • CONSOLE_LOGGING : Выводить ли журналы на консоль (по умолчанию false )

Доступные инструменты MCP

В следующей таблице перечислены основные инструменты, доступные в настоящее время для вызова через клиент MCP:

Название инструмента

Описание

Параметры

Статус

mcp_doris_get_db_list

Получить список всех имен баз данных на сервере.

random_string (строка, обязательно)

✅ Активный

mcp_doris_get_db_table_list

Получить список всех имен таблиц в указанной базе данных.

random_string (string, Обязательно), db_name (string, Необязательно, по умолчанию текущая база данных)

✅ Активный

mcp_doris_get_table_schema

Получить подробную структуру указанной таблицы.

random_string (строка, Обязательно), table_name (строка, Обязательно), db_name (строка, Необязательно)

✅ Активный

mcp_doris_get_table_comment

Получить комментарий к указанной таблице.

random_string (строка, Обязательно), table_name (строка, Обязательно), db_name (строка, Необязательно)

✅ Активный

mcp_doris_get_table_column_comments

Получить комментарии для всех столбцов указанной таблицы.

random_string (строка, Обязательно), table_name (строка, Обязательно), db_name (строка, Необязательно)

✅ Активный

mcp_doris_get_table_indexes

Получить информацию об индексе для указанной таблицы.

random_string (строка, Обязательно), table_name (строка, Обязательно), db_name (строка, Необязательно)

✅ Активный

mcp_doris_exec_query

Выполнить SQL-запрос и вернуть команду результата.

random_string (строка, Обязательно), sql (строка, Обязательно), db_name (строка, Необязательно), max_rows (целое число, Необязательно, по умолчанию 100), timeout (целое число, Необязательно, по умолчанию 30)

✅ Активный

mcp_doris_get_recent_audit_logs

Получите записи журнала аудита за последний период.

random_string (строка, обязательно), days (целое число, необязательно, по умолчанию 7), limit (целое число, необязательно, по умолчанию 100)

✅ Активный

Примечание: Все инструменты требуют параметр random_string в качестве идентификатора вызова, который обычно автоматически обрабатывается клиентом MCP. «Необязательный» и «Обязательный» относятся к внутренней логике инструмента; клиенту может потребоваться предоставить значения для всех параметров в зависимости от его реализации. Перечисленные здесь имена инструментов являются базовыми именами; клиенты могут видеть их с префиксом (например, mcp_doris_stdio3_get_db_list ) в зависимости от режима подключения.

4. Запустите службу

Если вы используете режим SSE, выполните следующую команду:

./start_server.sh

Эта команда запускает приложение FastAPI, предоставляя по умолчанию службы SSE и Streamable HTTP MCP.

Конечные точки обслуживания:

  • Инициализация SSE : http://<host>:<port>/sse

  • SSE-коммуникация : http://<host>:<port>/mcp/messages (POST)

  • Потоковое HTTP : http://<host>:<port>/mcp (поддерживает GET, POST, DELETE, OPTIONS)

  • Проверка работоспособности : http://<host>:<port>/health

  • (Потенциальная) проверка статуса : http://<host>:<port>/status (подтвердите, если реализовано в main.py )

Использование

Для взаимодействия с Doris MCP Server требуется MCP Client . Клиент подключается к конечным точкам SSE или Streamable HTTP сервера и отправляет запросы (например, tool_call ) в соответствии со спецификацией MCP для вызова инструментов сервера.

Основной поток взаимодействия:

  1. Инициализация клиента : подключитесь к /sse (SSE) или отправьте вызов метода initialize в /mcp (потоковый).

  2. (Необязательно) Обнаружение инструментов : клиент может вызвать mcp/listTools или mcp/listOfferings чтобы получить список поддерживаемых инструментов, их описания и схемы параметров.

  3. Вызов инструмента : клиент отправляет сообщение/запрос tool_call , указывая tool_name и arguments .

    • Пример: Получить схему таблицы

      • tool_name : mcp_doris_get_table_schema (или имя, специфичное для режима)

      • arguments : включают random_string , table_name , db_name .

  4. Ответ на обработку :

    • Непотоковый : клиент получает ответ, содержащий result или error .

    • Потоковая передача : клиент получает ряд уведомлений об tools/progress , за которыми следует окончательный ответ, содержащий result или error .

Конкретные названия инструментов и параметры должны быть указаны в коде src/tools/ или получены через механизмы обнаружения MCP.

Подключение с помощью курсора

Вы можете подключить Cursor к этому MCP-серверу, используя режим Stdio или SSE.

Режим Stdio

Режим stdio позволяет Cursor напрямую управлять процессом сервера. Конфигурация выполняется в файле настроек MCP Server Cursor (обычно ~/.cursor/mcp.json или аналогичном).

Если вы используете режим stdio, выполните следующую команду, чтобы загрузить и собрать пакет зависимостей среды, но учтите, что вам необходимо изменить путь к проекту на правильный адрес пути :

uv --project /your/path/doris-mcp-server run doris-mcp
  1. Настройте курсор: добавьте в конфигурацию Cursor MCP запись следующего вида:

    {
      "mcpServers": {
        "doris-stdio": {
          "command": "uv",
          "args": ["--project", "/path/to/your/doris-mcp-server", "run", "doris-mcp"],
          "env": {
            "DB_HOST": "127.0.0.1",
            "DB_PORT": "9030",
            "DB_USER": "root",
            "DB_PASSWORD": "your_db_password",
            "DB_DATABASE": "your_default_db" 
          }
        },
        // ... other server configurations ...
      }
    }
  2. Ключевые моменты:

    • Замените /path/to/your/doris-mcp на фактический абсолютный путь к корневому каталогу проекта в вашей системе. Аргумент --project имеет решающее значение для uv , чтобы найти pyproject.toml и запустить правильную команду.

    • command установлена на uv (предполагая, что вы используете uv для управления пакетами, как указано в uv.lock ). args включают --project , путь, run и mcp-doris (который должен соответствовать скрипту, определенному в вашем pyproject.toml ).

    • Подробности подключения к базе данных ( DB_HOST , DB_PORT , DB_USER , DB_PASSWORD , DB_DATABASE ) задаются непосредственно в блоке env в файле конфигурации. Курсор передаст их серверному процессу. Для этого режима не требуется файл .env при настройке через Курсор.

Режим SSE

Режим SSE требует, чтобы вы сначала запустили сервер MCP независимо, а затем указали Cursor, как к нему подключиться.

  1. Настройте .env : убедитесь, что учетные данные вашей базы данных и любые другие необходимые параметры (например, SERVER_PORT , если не используется порт по умолчанию 3000) правильно настроены в файле .env в каталоге проекта.

  2. Запустите сервер: Запустите сервер из терминала в корневом каталоге проекта:

    ./start_server.sh

    Этот скрипт обычно считывает файл .env и запускает сервер FastAPI в режиме SSE (проверьте скрипт и sse_server.py / main.py для получения подробной информации). Обратите внимание на хост и порт, которые прослушивает сервер (по умолчанию 0.0.0.0:3000 ).

  3. Настройте курсор: добавьте в конфигурацию Cursor MCP запись следующего вида, указывающую на конечную точку SSE работающего сервера:

    {
      "mcpServers": {
        "doris-sse": {
           "url": "http://127.0.0.1:3000/sse" // Adjust host/port if your server runs elsewhere
        },
        // ... other server configurations ...
      }
    }

    Примечание: в примере используется порт по умолчанию 3000 Если ваш сервер настроен для работы на другом порту (например, 3010 в примере пользователя), измените URL-адрес соответствующим образом.

После настройки любого из режимов в Cursor вы сможете выбрать сервер (например, doris-stdio или doris-sse ) и использовать его инструменты.

Структура каталога

doris-mcp-server/
├── doris_mcp_server/    # Source code for the MCP server
│   ├── main.py          # Main entry point, FastAPI app definition
│   ├── mcp_core.py      # Core MCP tool registration and Stdio handling
│   ├── sse_server.py    # SSE server implementation
│   ├── streamable_server.py # Streamable HTTP server implementation
│   ├── config.py        # Configuration loading
│   ├── tools/           # MCP tool definitions
│   │   ├── mcp_doris_tools.py # Main Doris-related MCP tools
│   │   ├── tool_initializer.py # Tool registration helper (used by mcp_core.py)
│   │   └── __init__.py
│   ├── utils/           # Utility classes and helper functions
│   │   ├── db.py              # Database connection and operations
│   │   ├── logger.py          # Logging configuration
│   │   ├── schema_extractor.py # Doris metadata/schema extraction logic
│   │   ├── sql_executor_tools.py # SQL execution helper (might be legacy)
│   │   └── __init__.py
│   └── __init__.py
├── logs/                # Log file directory (if file logging enabled)
├── README.md            # This file
├── .env.example         # Example environment variable file
├── requirements.txt     # Python dependencies for pip
├── pyproject.toml       # Project metadata and build system configuration (PEP 518)
├── uv.lock              # Lock file for 'uv' package manager (alternative to pip)
├── start_server.sh      # Script to start the server
└── restart_server.sh    # Script to restart the server

Разработка новых инструментов

В этом разделе описывается процесс добавления новых инструментов MCP на сервер Doris MCP с учетом текущей структуры проекта.

1. Используйте служебные модули

Прежде чем писать новую логику взаимодействия с базой данных с нуля, проверьте существующие служебные модули:

  • doris_mcp_server/utils/db.py : предоставляет базовые функции для получения подключений к базе данных ( get_db_connection ) и выполнения необработанных запросов ( execute_query , execute_query_df ).

  • doris_mcp_server/utils/schema_extractor.py (класс MetadataExtractor ) : предлагает высокоуровневые методы для извлечения метаданных базы данных, такие как перечисление баз данных/таблиц ( get_all_databases , get_database_tables ), получение схем таблиц/комментариев/индексов ( get_table_schema , get_table_comment , get_column_comments , get_table_indexes ) и доступ к журналам аудита ( get_recent_audit_logs ). Включает механизмы кэширования.

  • doris_mcp_server/utils/sql_executor_tools.py (функция execute_sql_query ) : предоставляет оболочку вокруг db.execute_query , которая включает проверки безопасности (необязательно, контролируется переменной окружения ENABLE_SQL_SECURITY_CHECK ), добавляет автоматический LIMIT к запросам SELECT, обрабатывает сериализацию результатов (даты, десятичные числа) и форматирует вывод в стандартную структуру MCP success/error. Рекомендуется использовать это для выполнения предоставленного пользователем или сгенерированного SQL.

Вы можете импортировать и комбинировать функции этих модулей для создания своего нового инструмента.

2. Реализуйте логику инструмента

Реализуйте основную логику для вашего нового инструмента как async функцию в doris_mcp_server/tools/mcp_doris_tools.py . Это сохранит централизованность основных реализаций инструмента. Убедитесь, что ваша функция возвращает данные в формате, который можно легко обернуть в стандартную структуру ответа MCP (см. _format_response в том же файле для справки).

Пример: Давайте создадим простой инструмент get_server_time .

# In doris_mcp_server/tools/mcp_doris_tools.py
import datetime
# ... other imports ...
from doris_mcp_server.tools.mcp_doris_tools import _format_response # Reuse formatter

# ... existing tools ...

async def mcp_doris_get_server_time() -> Dict[str, Any]:
    """Gets the current server time."""
    logger.info(f"MCP Tool Call: mcp_doris_get_server_time")
    try:
        current_time = datetime.datetime.now().isoformat()
        # Use the existing formatter for consistency
        return _format_response(success=True, result={"server_time": current_time})
    except Exception as e:
        logger.error(f"MCP tool execution failed mcp_doris_get_server_time: {str(e)}", exc_info=True)
        return _format_response(success=False, error=str(e), message="Error getting server time")

3. Зарегистрируйте инструмент (двойная регистрация)

Из-за раздельной обработки режимов SSE/Streamable и Stdio вам необходимо зарегистрировать инструмент в двух местах:

A. SSE/Streamable регистрация ( tool_initializer.py )

  • Импортируйте новую функцию инструмента из mcp_doris_tools.py .

  • Внутри функции register_mcp_tools добавьте новую функцию-оболочку, декорированную @mcp.tool() .

  • Функция-оболочка должна вызывать функцию вашего основного инструмента.

  • Определите имя инструмента и предоставьте подробное описание (включая параметры, если таковые имеются) в декораторе. Не забудьте включить обязательное описание параметра random_string для совместимости с клиентом, даже если ваша оболочка явно не использует его.

Пример ( tool_initializer.py ):

# In doris_mcp_server/tools/tool_initializer.py
# ... other imports ...
from doris_mcp_server.tools.mcp_doris_tools import (
    # ... existing tool imports ...
    mcp_doris_get_server_time # <-- Import the new tool
)

async def register_mcp_tools(mcp):
    # ... existing tool registrations ...

    # Register Tool: Get Server Time
    @mcp.tool("get_server_time", description="""[Function Description]: Get the current time of the MCP server.\n
[Parameter Content]:\n
- random_string (string) [Required] - Unique identifier for the tool call\n""")
    async def get_server_time_tool() -> Dict[str, Any]:
        """Wrapper: Get server time"""
        # Note: No parameters needed for the core function call here
        return await mcp_doris_get_server_time()

    # ... logging registration count ...

B. Регистрация Stdio ( mcp_core.py )

  • Аналогично SSE добавьте новую функцию-оболочку, декорированную @stdio_mcp.tool() .

  • Важно: импортируйте основную функцию инструмента ( mcp_doris_get_server_time ) внутрь функции-оболочки (в этом файле используется шаблон отложенного импорта).

  • Обертка вызывает функцию основного инструмента. Сама обертка может потребовать async def в зависимости от того, как FastMCP обрабатывает инструменты в режиме Stdio, даже если базовая функция проста (как видно из текущей структуры файла). Убедитесь, что вызов соответствует (например, используйте await при вызове асинхронной функции).

Пример ( mcp_core.py ):

# In doris_mcp_server/mcp_core.py
# ... other imports and setup ...

# ... existing Stdio tool registrations ...

# Register Tool: Get Server Time (for Stdio)
@stdio_mcp.tool("get_server_time", description="""[Function Description]: Get the current time of the MCP server.\n
[Parameter Content]:\n
- random_string (string) [Required] - Unique identifier for the tool call\n""")
async def get_server_time_tool_stdio() -> Dict[str, Any]: # Using a slightly different wrapper name for clarity if needed
    """Wrapper: Get server time (Stdio)"""
    from doris_mcp_server.tools.mcp_doris_tools import mcp_doris_get_server_time # <-- Delayed import
    # Assuming the Stdio runner handles async wrappers correctly
    return await mcp_doris_get_server_time()

# --- Register Tools --- (Or wherever the registrations are finalized)

4. Перезапуск и тестирование

После внедрения и регистрации инструмента в обоих файлах перезапустите сервер MCP (в режиме SSE через ./start_server.sh и убедитесь, что команда Stdio, используемая Cursor, обновлена при необходимости) и протестируйте новый инструмент с помощью клиента MCP (например, Cursor) в обоих режимах подключения.

Внося вклад

Приветствуются ваши вклады через Issues или Pull Requests.

Лицензия

Этот проект лицензирован по лицензии Apache 2.0. Подробности смотрите в файле LICENSE (если он существует).

Available Tools

8 tools
exec_queryB

[Function Description]: Execute SQL query and return result command (executed by the client).

[Parameter Content]:

  • sql (string) [Required] - SQL statement to execute

  • db_name (string) [Optional] - Target database name, defaults to the current database

  • max_rows (integer) [Optional] - Maximum number of rows to return, default 100

  • timeout (integer) [Optional] - Query timeout in seconds, default 30

ParametersJSON Schema
NameRequiredDescriptionDefault
db_nameNo
max_rowsNo
sqlYes
timeoutNo

TDQS

B3.3/5.0
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 mentions that results are 'returned' and 'executed by the client,' but lacks critical details: whether queries are read-only or can modify data, authentication requirements, error handling, result format, or any rate limits. For a SQL execution tool with zero annotation coverage, this leaves significant behavioral gaps unaddressed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections ([Function Description] and [Parameter Content]) and uses bullet points efficiently. Every sentence earns its place by providing essential information. It could be slightly more concise by integrating the sections more fluidly, but overall it's appropriately sized and front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a SQL execution tool, no annotations, and no output schema, the description is moderately complete. It covers parameters thoroughly but lacks behavioral context (safety, permissions, result format) and doesn't explain what 'return result command' means or how results are structured. For a tool that could potentially modify data, this leaves important gaps despite good parameter documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully compensate. It does this excellently by providing clear semantics for all 4 parameters: sql (required SQL statement), db_name (optional target database with default behavior), max_rows (optional row limit with default), and timeout (optional timeout with default). Each parameter's purpose, optionality, and defaults are clearly explained beyond what the bare schema provides.

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 tool's purpose: 'Execute SQL query and return result command (executed by the client).' This specifies the verb ('Execute SQL query') and resource ('SQL query'), distinguishing it from sibling tools that are all read-only metadata retrieval functions (like get_db_list, get_table_schema). However, it doesn't explicitly contrast with those siblings beyond the different action.

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. It doesn't mention that siblings are for metadata retrieval while this is for actual query execution, nor does it discuss prerequisites like database connectivity or permissions. The only implicit usage context is that it executes SQL, but no explicit when/when-not instructions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_db_listC

[Function Description]: Get a list of all database names on the server.

[Parameter Content]:

  • random_string (string) [Required] - Unique identifier for the tool call

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't mention any behavioral traits such as permissions required, rate limits, whether it's read-only or has side effects, or what the return format looks like. This is a significant gap for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with sections for Function Description and Parameter Content, which is organized but includes unnecessary and incorrect parameter information. The Function Description sentence is clear, but the Parameter Content adds verbosity without value, reducing efficiency.

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 tool's complexity (simple list operation) but lack of annotations and output schema, the description is incomplete. It doesn't explain what the return value includes (e.g., format, pagination) or address behavioral aspects like error handling. For a tool with no structured support, more context is needed to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so the schema fully documents the lack of parameters. The description incorrectly includes a parameter 'random_string' in the Parameter Content section, which contradicts the schema. However, since the baseline for 0 parameters is 4, and the description's error doesn't severely mislead about parameter usage (as the schema overrides it), it scores slightly above minimum.

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 tool's purpose with a specific verb ('Get') and resource ('list of all database names on the server'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_db_table_list' or 'exec_query', which prevents a perfect score.

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 'get_db_table_list' (which might list tables within a database) or other siblings. It lacks any context about prerequisites, exclusions, or comparative use cases, leaving the agent to infer usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_db_table_listB

[Function Description]: Get a list of all table names in the specified database.

[Parameter Content]:

  • db_name (string) [Optional] - Target database name, defaults to the current database

ParametersJSON Schema
NameRequiredDescriptionDefault
db_nameNo

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Get[s] a list' but doesn't clarify if this is a read-only operation, whether it requires specific permissions, how it handles errors, or what the return format looks like. For a tool with zero annotation coverage, this is a significant gap in behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and structured with clear sections for function and parameters. It uses bullet points efficiently and avoids redundancy. However, the formatting with brackets like '[Function Description]' is slightly verbose, and the content could be more front-loaded with key usage information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 optional parameter, no output schema, no annotations), the description is minimally adequate. It covers the purpose and parameter semantics but lacks behavioral details, usage guidelines, and output information. For a simple read operation, this is borderline viable but leaves gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates well by explaining the single parameter's semantics. It specifies that 'db_name' is the 'Target database name' and defaults to 'the current database', adding meaningful context beyond the schema's basic type and title. This is sufficient for the one parameter, though more detail on format or constraints could be helpful.

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 tool's purpose with a specific verb ('Get') and resource ('list of all table names in the specified database'). It distinguishes itself from siblings like get_db_list (which lists databases) and get_table_schema (which provides schema details), though it doesn't explicitly name these alternatives. The purpose is unambiguous but could be slightly more specific about differentiation.

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. It doesn't mention siblings like get_db_list for listing databases or get_table_schema for detailed table information, nor does it specify prerequisites or contexts for usage. This leaves the agent without clear direction on tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_recent_audit_logsC

[Function Description]: Get audit log records for a recent period.

[Parameter Content]:

  • days (integer) [Optional] - Number of recent days of logs to retrieve, default is 7

  • limit (integer) [Optional] - Maximum number of records to return, default is 100

ParametersJSON Schema
NameRequiredDescriptionDefault
daysNo
limitNo

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions retrieving logs for a 'recent period' with defaults, but doesn't cover critical aspects like whether this requires specific permissions, what format the logs are returned in, if there are rate limits, or how the tool handles errors. For a read operation with zero annotation coverage, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description uses a structured format with sections, which is helpful, but includes redundant labeling like '[Function Description]' and '[Parameter Content]' that add little value. The content itself is reasonably concise, but the formatting could be more streamlined without sacrificing clarity.

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?

For a tool with 2 parameters, no annotations, and no output schema, the description is incomplete. It covers basic parameter semantics but lacks information about return format, error handling, authentication requirements, and how it differs from sibling tools. Given the complexity of audit logs and the absence of structured metadata, more contextual guidance is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides meaningful semantic context for both parameters ('days' as 'Number of recent days of logs to retrieve' and 'limit' as 'Maximum number of records to return'), including their defaults. With 0% schema description coverage, this fully compensates by explaining what each parameter controls beyond just their types, though it doesn't specify constraints like minimum/maximum values.

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 tool's purpose with a specific verb ('Get') and resource ('audit log records for a recent period'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'exec_query' or 'get_db_list', which could also potentially retrieve audit data, so it doesn't reach the highest score.

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 'exec_query' for custom queries or other sibling tools for database metadata. It only describes what the tool does, not when it's the appropriate choice, leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_table_column_commentsC

[Function Description]: Get comment information for all columns in the specified table.

[Parameter Content]:

  • table_name (string) [Required] - Name of the table to query

  • db_name (string) [Optional] - Target database name, defaults to the current database

ParametersJSON Schema
NameRequiredDescriptionDefault
db_nameNo
table_nameYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. It states this is a 'Get' operation (implying read-only), but doesn't mention authentication requirements, rate limits, error conditions, or what format the comment information returns. For a tool with no annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description uses a structured format with sections, which helps organization. However, the '[Function Description]' and '[Parameter Content]' labels add unnecessary verbosity. The content itself is reasonably concise, but the formatting could be more streamlined without losing clarity.

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 no annotations, no output schema, and 0% schema description coverage, the description is incomplete. It covers basic purpose and parameters but lacks crucial information about return format, error handling, and behavioral constraints. For a database query tool with siblings providing related functionality, more context is needed for effective use.

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?

Schema description coverage is 0%, so the description must compensate. It provides parameter information in the '[Parameter Content]' section, explaining what 'table_name' and 'db_name' represent. However, it doesn't clarify format expectations (e.g., case sensitivity, quoting requirements) or provide examples. The description adds meaningful semantics but doesn't fully compensate for the 0% schema coverage.

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 tool's purpose: 'Get comment information for all columns in the specified table.' This is a specific verb ('Get') + resource ('comment information for all columns') combination. However, it doesn't explicitly distinguish this from its sibling 'get_table_comment' (which presumably gets table-level rather than column-level comments), so it misses the highest score.

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. With siblings like 'get_table_schema' and 'get_table_comment' that might provide related information, there's no indication of when column comments specifically are needed or when other tools might be more appropriate. The only implicit context is the parameter descriptions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_table_commentC

[Function Description]: Get the comment information for the specified table.

[Parameter Content]:

  • table_name (string) [Required] - Name of the table to query

  • db_name (string) [Optional] - Target database name, defaults to the current database

ParametersJSON Schema
NameRequiredDescriptionDefault
db_nameNo
table_nameYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves comment information, implying a read-only operation, but doesn't clarify permissions, rate limits, error handling, or output format. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with labeled sections ('[Function Description]' and '[Parameter Content]'), which aids readability. However, it includes redundant formatting (e.g., brackets) and could be more streamlined. The content is front-loaded with the core purpose, but the parameter section adds necessary detail without being overly verbose.

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 tool's complexity (2 parameters, no annotations, no output schema), the description is incomplete. It explains what the tool does and the parameters, but lacks critical context: it doesn't describe the return value (e.g., comment text format), error conditions, or how it differs from siblings. This leaves gaps for effective agent use.

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 includes a '[Parameter Content]' section that lists both parameters with brief explanations: 'table_name' as required for the table to query, and 'db_name' as optional with a default. However, schema description coverage is 0%, so the schema provides no additional details. The description compensates somewhat by explaining parameter roles, but lacks depth on formats or constraints.

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 tool's purpose: 'Get the comment information for the specified table.' It uses a specific verb ('Get') and resource ('comment information for the specified table'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_table_column_comments' or 'get_table_schema', which reduces it from a perfect score.

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. It doesn't mention sibling tools like 'get_table_column_comments' (for column-level comments) or 'get_table_schema' (for schema details), nor does it specify prerequisites or exclusions. This leaves the agent without context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_table_indexesB

[Function Description]: Get index information for the specified table. [Parameter Content]:

  • table_name (string) [Required] - Name of the table to query

  • db_name (string) [Optional] - Target database name, defaults to the current database

ParametersJSON Schema
NameRequiredDescriptionDefault
db_nameNo
table_nameYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'queries' index information, implying a read-only operation, but doesn't clarify permissions, rate limits, error conditions, or what the output format looks like. This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded with the function description, followed by parameter details. It uses a structured format with bullet points, making it easy to parse, though the bracketed headings add minor verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no annotations, no output schema), the description covers the basic purpose and parameters adequately. However, it lacks details on output format, error handling, or behavioral constraints, making it incomplete for optimal agent use without additional context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful semantics for both parameters: it specifies that table_name is required for querying and db_name is optional with a default to the current database. With 0% schema description coverage, this compensates well by providing clear parameter roles and defaults beyond the basic schema.

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 tool's purpose as 'Get index information for the specified table,' which is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like get_table_schema or get_table_column_comments, which might retrieve related but different metadata.

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. It doesn't mention sibling tools like get_table_schema or explain what makes this tool unique for index information, leaving the agent to infer usage from context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_table_schemaB

[Function Description]: Get detailed structure information of the specified table (columns, types, comments, etc.).

[Parameter Content]:

  • table_name (string) [Required] - Name of the table to query

  • db_name (string) [Optional] - Target database name, defaults to the current database

ParametersJSON Schema
NameRequiredDescriptionDefault
db_nameNo
table_nameYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it 'gets' information, implying a read-only operation, but doesn't specify whether this requires permissions, has rate limits, returns paginated results, or what format the output takes (e.g., JSON, structured data). For a tool with no annotation coverage, this leaves significant gaps in understanding how it behaves beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and structured with clear sections for function and parameters. Each sentence adds value: the first defines the purpose with examples, and the parameter section explains semantics. There's minimal waste, though the formatting with brackets and bullet points is slightly verbose but still efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is somewhat complete but has gaps. It covers purpose and parameter semantics adequately, but lacks behavioral details like output format, error handling, or usage guidelines relative to siblings. Without annotations or output schema, more context on what 'detailed structure information' entails would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful context beyond the input schema, which has 0% description coverage. It explains that table_name is required and specifies what it queries, and clarifies that db_name is optional with a default to the current database. This compensates well for the lack of schema descriptions, though it doesn't detail constraints like valid table name formats or database name syntax.

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 'Get' and the resource 'detailed structure information of the specified table', with specific examples like 'columns, types, comments, etc.' This distinguishes it from siblings like get_db_list or get_table_indexes by focusing on comprehensive schema details rather than lists or specific components. However, it doesn't explicitly differentiate from get_table_column_comments or get_table_comment, which are more specialized siblings.

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. It doesn't mention siblings like get_table_column_comments (for only comments) or get_table_indexes (for indexes), nor does it specify prerequisites such as needing database access or when this is preferred over exec_query for schema inspection. Usage is implied by the purpose but lacks explicit context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 8 tool updatesv1.0.0
    • First observedexec_query
    • First observedget_db_list
    • First observedget_db_table_list
    • First observedget_recent_audit_logs
    • First observedget_table_column_comments
    • First observedget_table_comment
    • First observedget_table_indexes
    • First observedget_table_schema

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no ambiguity. exec_query handles SQL execution, get_db_list retrieves database names, get_db_table_list lists tables, get_recent_audit_logs fetches logs, and the remaining tools (get_table_column_comments, get_table_comment, get_table_indexes, get_table_schema) each target specific table metadata aspects without overlap.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern using snake_case. The naming is highly predictable: exec_query, get_db_list, get_db_table_list, get_recent_audit_logs, get_table_column_comments, get_table_comment, get_table_indexes, and get_table_schema all adhere to the same convention.

Tool Count5/5

With 8 tools, this server is well-scoped for database interaction and metadata exploration. Each tool earns its place by covering distinct aspects like query execution, database/table listing, audit logs, and detailed table metadata, without being overly sparse or bloated.

Completeness4/5

The toolset provides strong coverage for querying and inspecting databases, including CRUD-like operations via exec_query and comprehensive metadata retrieval. Minor gaps exist, such as no explicit tools for creating/dropping databases or tables, but agents can work around this using exec_query for such operations.

Maintenance

ActivityMaintained
ResponsivenessWithin a week

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    This MCP server provides connection to Starrocks allows you to explore this query engine with minimum effort.
    1
    MIT
  • F
    license
    B
    quality
    C
    maintenance
    A Model Context Protocol server that enables large language models to interact with Apache Superset databases through REST API, supporting database queries, table lookups, field information retrieval, and SQL execution.
    4
    5
    -
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    A TypeScript implementation of a Model Context Protocol server that enables interaction with StarRocks databases, supporting SQL operations like queries, table creation, and data manipulation through standardized MCP tools.
    1
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables LLMs to explore database schemas, execute read-only SQL queries, and perform data analysis on Apache Doris or MySQL-compatible databases through a standardized MCP interface with built-in analytical prompts.
    1
    MIT

Appeared in Searches

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/apache/doris-mcp-server'

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