Skip to main content
Glama
ydb-platform

YDB MCP

Official
by ydb-platform

YDB MCP


License PyPI version

Сервер Model Context Protocol для YDB. Он позволяет работать с базами данных YDB из любого LLM, поддерживающего MCP. Эта интеграция обеспечивает выполнение операций с базой данных с помощью ИИ и взаимодействие с вашими экземплярами YDB на естественном языке.

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

Через uvx

uvx, который является псевдонимом для uv run tool, позволяет запускать различные приложения Python без их явной установки. Ниже приведены примеры того, как настроить YDB MCP с помощью uvx.

Пример: Использование анонимной аутентификации

{
  "mcpServers": {
    "ydb": {
      "command": "uvx",
      "args": [
        "ydb-mcp",
        "--ydb-endpoint", "grpc://localhost:2136",
        "--ydb-database", "/local"
      ]
    }
  }
}

Через pipx

pipx позволяет запускать различные приложения из PyPI без явной установки каждого из них. Однако сначала его необходимо установить. Ниже приведены примеры того, как настроить YDB MCP с помощью pipx.

Пример: Использование анонимной аутентификации

{
  "mcpServers": {
    "ydb": {
      "command": "pipx",
      "args": [
        "run", "ydb-mcp",
        "--ydb-endpoint", "grpc://localhost:2136",
        "--ydb-database", "/local"
      ]
    }
  }
}

Через pip

YDB MCP можно установить с помощью pip, установщика пакетов Python. Пакет доступен на PyPI и включает все необходимые зависимости.

pip install ydb-mcp

Чтобы начать работу с YDB MCP, вам нужно настроить ваш MCP-клиент для связи с экземпляром YDB. Ниже приведены примеры файлов конфигурации, которые вы можете настроить в соответствии с вашей установкой, а затем поместить в настройки MCP-клиента. Путь к интерпретатору Python, возможно, также потребуется скорректировать, указав правильное виртуальное окружение, в котором установлен пакет ydb-mcp.

Пример: Использование анонимной аутентификации

{
  "mcpServers": {
    "ydb": {
      "command": "python3",
      "args": [
        "-m", "ydb_mcp",
        "--ydb-endpoint", "grpc://localhost:2136",
        "--ydb-database", "/local"
      ]
    }
  }
}

Аутентификация

Независимо от метода использования (uvx, pipx или pip), вы можете настроить аутентификацию для вашей установки YDB. Для этого передайте специальные аргументы командной строки.

Использование аутентификации по логину/паролю

Чтобы использовать аутентификацию по логину/паролю, укажите аргументы --ydb-auth-mode, --ydb-login и --ydb-password:

{
  "mcpServers": {
    "ydb": {
      "command": "uvx",
      "args": [
        "ydb-mcp",
        "--ydb-endpoint", "grpc://localhost:2136",
        "--ydb-database", "/local",
        "--ydb-auth-mode", "login-password",
        "--ydb-login", "<your-username>",
        "--ydb-password", "<your-password>"
      ]
    }
  }
}

Использование аутентификации по токену доступа

Чтобы использовать аутентификацию по токену доступа, укажите аргументы --ydb-auth-mode и --ydb-access-token:

{
  "mcpServers": {
    "ydb": {
      "command": "uvx",
      "args": [
        "ydb-mcp",
        "--ydb-endpoint", "grpc://localhost:2136",
        "--ydb-database", "/local",
        "--ydb-auth-mode", "access-token",
        "--ydb-access-token", "qwerty123"
      ]
    }
  }
}

Использование аутентификации через сервисный аккаунт

Чтобы использовать аутентификацию через сервисный аккаунт, укажите аргументы --ydb-auth-mode и --ydb-sa-key-file:

{
  "mcpServers": {
    "ydb": {
      "command": "uvx",
      "args": [
        "ydb-mcp",
        "--ydb-endpoint", "grpc://localhost:2136",
        "--ydb-database", "/local",
        "--ydb-auth-mode", "service-account",
        "--ydb-sa-key-file", "~/sa_key.json"
      ]
    }
  }
}

Related MCP server: GreptimeDB MCP Server

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

YDB MCP предоставляет следующие инструменты для взаимодействия с базами данных YDB:

  • ydb_query: Выполнение SQL-запроса к базе данных YDB

    • Параметры:

      • sql: Строка SQL-запроса для выполнения

  • ydb_query_with_params: Выполнение параметризованного SQL-запроса с параметрами в формате JSON

    • Параметры:

      • sql: Строка SQL-запроса с плейсхолдерами параметров

      • params: JSON-строка, содержащая значения параметров

  • ydb_explain_query: Объяснение SQL-запроса (возвращает план выполнения)

    • Параметры:

      • sql: Строка SQL-запроса для объяснения

  • ydb_explain_query_with_params: Объяснение параметризованного SQL-запроса

    • Параметры:

      • sql: Строка SQL-запроса с плейсхолдерами параметров

      • params: JSON-строка, содержащая значения параметров

  • ydb_list_directory: Список содержимого директории в YDB

    • Параметры:

      • path: Путь к директории YDB для вывода списка

  • ydb_describe_path: Получение подробной информации о пути в YDB (таблица, директория и т.д.)

    • Параметры:

      • path: Путь в YDB для описания

  • ydb_status: Получение текущего статуса соединения с YDB

Создание пользовательских MCP-серверов

YDBMCPServer спроектирован для наследования. Вы можете добавить свои собственные инструменты поверх установленного соединения с YDB и, при необходимости, отключить встроенные общие инструменты, чтобы предоставлять только те запросы, которые нужны вашему приложению.

Зачем создавать пользовательский сервер?

  • Безопасность — ограничьте LLM фиксированным набором запросов только для чтения вместо предоставления возможности выполнения произвольного SQL.

  • Специфика предметной области — предоставьте модели инструменты, соответствующие вашей бизнес-логике, а не примитивы базы данных.

  • Простота — меньше инструментов означает меньше двусмысленности для модели.

Доступные методы

Переопределите или вызовите их в своем подклассе:

Метод

Описание

await self.execute(sql, params=None)

Выполнить SQL-запрос. Возвращает list[dict], каждый словарь содержит "columns" и "rows".

await self.explain(sql, params=None)

Вернуть план выполнения запроса в виде dict.

await self.list_directory(path)

Вывести список директории YDB. Возвращает dict с "path" и "items".

await self.describe_path(path)

Описать путь YDB (схема таблицы, директория и т.д.). Возвращает dict.

Аргумент params — это обычный dict. Ключи без префикса $ получат его автоматически. Чтобы указать явный тип YDB, используйте кортеж (value, "TypeName") — например, {"id": (42, "Int64")}.

Управление общими инструментами

Используйте атрибут класса generic_tools, чтобы управлять тем, какие встроенные инструменты регистрируются:

Значение

Эффект

set(YDBGenericTool)

Все встроенные инструменты (по умолчанию)

set()

Никаких встроенных инструментов — только ваши собственные

{YDBGenericTool.QUERY, YDBGenericTool.STATUS}

Только перечисленные инструменты

YDBGenericTool — это строковое перечисление (enum) — доступные значения: QUERY, QUERY_WITH_PARAMS, EXPLAIN, EXPLAIN_WITH_PARAMS, STATUS, LIST_DIRECTORY, DESCRIBE_PATH.

Пример

# my_server.py
from ydb_mcp import YDBMCPServer, YDBGenericTool, serialize_ydb_response


class OrdersServer(YDBMCPServer):
    """Minimal read-only MCP server for the orders service."""

    generic_tools = {YDBGenericTool.STATUS}  # keep status check for diagnostics

    def __init__(self, **kwargs):
        super().__init__(**kwargs)

        @self.tool()
        async def get_order(order_id: str) -> str:
            """Fetch a single order by ID."""
            rows = await self.execute(
                "SELECT * FROM orders WHERE id = $id",
                {"id": order_id},
            )
            return serialize_ydb_response(rows)

        @self.tool()
        async def list_recent_orders(limit: int = 10) -> str:
            """Return the most recent orders."""
            rows = await self.execute(
                "SELECT * FROM orders ORDER BY created_at DESC LIMIT $limit",
                {"limit": limit},
            )
            return serialize_ydb_response(rows)


if __name__ == "__main__":
    OrdersServer(
        endpoint="grpc://localhost:2136",
        database="/local",
    ).run()

Запустите его напрямую:

python my_server.py

Или подключите его как MCP-сервер в конфигурации вашего клиента:

{
  "mcpServers": {
    "orders": {
      "command": "python",
      "args": ["my_server.py"]
    }
  }
}

Разработка

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

Доступные команды Make

Проект включает в себя комплексный Makefile с различными командами для задач разработки. Каждая команда разработана для оптимизации рабочего процесса разработки и обеспечения качества кода:

  • make all: Последовательный запуск clean, lint и test (цель по умолчанию)

  • make clean: Удаление всех артефактов сборки и временных файлов

  • make test: Запуск всех тестов с использованием pytest

    • Можно настроить с помощью переменных окружения:

      • LOG_LEVEL (по умолчанию: WARNING) - Управление детализацией вывода тестов (DEBUG, INFO, WARNING, ERROR)

  • make unit-tests: Запуск только модульных тестов с подробным выводом

    • Можно настроить с помощью переменных окружения:

      • LOG_LEVEL (по умолчанию: WARNING) - Управление детализацией вывода тестов (DEBUG, INFO, WARNING, ERROR)

  • make integration-tests: Запуск только интеграционных тестов с подробным выводом

    • Можно настроить с помощью переменных окружения:

      • YDB_ENDPOINT (по умолчанию: grpc://localhost:2136)

      • YDB_DATABASE (по умолчанию: /local)

      • MCP_HOST (по умолчанию: 127.0.0.1)

      • MCP_PORT (по умолчанию: 8989)

      • LOG_LEVEL (по умолчанию: WARNING) - Управление детализацией вывода тестов (DEBUG, INFO, WARNING, ERROR)

  • make run-server: Запуск сервера YDB MCP

    • Можно настроить с помощью переменных окружения:

      • YDB_ENDPOINT (по умолчанию: grpc://localhost:2136)

      • YDB_DATABASE (по умолчанию: /local)

    • Дополнительные аргументы можно передать с помощью ARGS="your args"

  • make lint: Запуск всех проверок линтинга (flake8, mypy, black, isort)

  • make format: Форматирование кода с помощью black и isort

  • make install: Установка пакета в режиме разработки

  • make dev: Установка пакета в режиме разработки со всеми зависимостями для разработки

Управление детализацией тестов

По умолчанию тесты запускаются с минимальным выводом (уровень WARNING), чтобы сохранить чистоту вывода. Вы можете управлять детализацией вывода тестов с помощью переменной окружения LOG_LEVEL:

# Run all tests with debug output
make test LOG_LEVEL=DEBUG

# Run integration tests with info output
make integration-tests LOG_LEVEL=INFO

# Run unit tests with warning output (default)
make unit-tests LOG_LEVEL=WARNING

Доступные уровни логирования:

  • DEBUG: Показать все отладочные сообщения, полезно для детального отслеживания выполнения тестов

  • INFO: Показать информационные сообщения и выше

  • WARNING: Показать только предупреждения и ошибки (по умолчанию)

  • ERROR: Показать только сообщения об ошибках

Available Tools

7 tools
ydb_describe_pathC

Get detailed information about a YDB path

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.4/5.0
Behavior2/5

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

With no annotations, the description carries full burden for behavioral disclosure. It only states a read operation but does not describe error behavior (e.g., path not found), rate limits, or authentication requirements. Minimal 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 a single sentence, which is concise but under-informative. It lacks crucial details that could be added without significant length.

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?

The tool has low complexity with one required parameter and an output schema, yet the description fails to explain what information is returned or any preconditions. It is incomplete for effective agent use.

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

Parameters1/5

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

Schema coverage is 0% and the description adds no meaning to the 'path' parameter. It does not specify format, constraints, or examples. The parameter remains completely undocumented.

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 information about a YDB path', distinguishing it from sibling tools like 'ydb_list_directory' (lists directory contents) and 'ydb_explain_query' (explains queries). However, it lacks specificity about what 'detailed information' includes.

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?

No explicit guidance on when to use this tool versus alternatives. The description does not mention exclusions, prerequisites, or context. Usage is only implied by the tool's purpose.

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

ydb_explain_queryC

Explain a SQL query against YDB

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.6/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. It does not disclose whether the query is executed or just planned, required permissions, or side effects. Basic behavioral traits like read-only nature are omitted.

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 very concise (one sentence, five words). While efficient, it lacks necessary details. It is not verbose, but the conciseness comes at the cost of clarity. It barely meets the minimum threshold.

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 and low parameter coverage, the description is incomplete. It explains the basic purpose but omits key context such as the output format (though an output schema exists), prerequisites, or behavior. The agent may not be able to invoke correctly without additional information.

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

Parameters2/5

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

The schema has 0% description coverage for the 'sql' parameter. The description adds no extra meaning beyond the parameter type. It does not specify syntax, constraints, or examples, failing to compensate for the lack of schema documentation.

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?

Description clearly states the tool explains a SQL query against YDB. However, it does not differentiate from the sibling tool 'ydb_explain_query_with_params', which also explains queries but with parameters. The description should specify that this tool is for queries without parameters to avoid confusion.

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?

No guidance is provided on when to use this tool versus the alternatives. There is no mention of when not to use it, such as for parameterized queries where 'ydb_explain_query_with_params' is more appropriate. The agent is left 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.

ydb_explain_query_with_paramsC

Explain a parameterized SQL query against YDB

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYes
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It states 'Explain', implying a read-only operation, but does not disclose any behavioral traits such as side effects, permissions, rate limits, or output format beyond what is in the schema.

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 a single sentence with no extraneous words. However, it is too brief and could include more essential information without being verbose. It is concise but at the expense of completeness.

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 absence of annotations and only 2 parameters, the description is insufficiently complete. It does not mention that both parameters are required, or provide context on how to supply parameters. An output schema exists but is not referenced.

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

Parameters2/5

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

Schema has 0% description coverage. The description does not explain the format or meaning of the 'params' parameter, which accepts a string or object. This lack of semantic guidance increases ambiguity for the AI agent.

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?

Description uses verb 'Explain' and specifies resource 'parameterized SQL query against YDB', which clearly indicates the tool's action and target. However, it does not differentiate from sibling tool 'ydb_explain_query' which likely does the same without parameters.

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?

No guidance on when to use this tool vs ydb_explain_query or other siblings. The description implies it is for queries with parameters but does not explicitly state when it should be preferred.

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

ydb_list_directoryC

List directory contents in YDB

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are present, so the description bears full responsibility for behavioral disclosure. It only states the function without mentioning side effects, read-only nature, error handling, or recursion behavior.

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

Conciseness2/5

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

The description is overly brief at 4 words, lacking structure and essential details. It does not earn its place as it adds no value beyond the tool name.

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 simple single-parameter schema and presence of an output schema, the description omits critical context such as return types, pagination, or behavior for nonexistent paths, making it insufficient for correct agent invocation.

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

Parameters1/5

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

Schema description coverage is 0%, and the description does not explain the format or semantics of the 'path' parameter (e.g., full vs relative path, supported patterns).

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 'List' and resource 'directory contents', but does not differentiate from sibling tools like ydb_describe_path, which might also list path details.

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?

No guidance is provided on when to use this tool versus alternatives like ydb_describe_path or ydb_query. There is no context for typical use cases or exclusions.

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

ydb_queryC

Run a SQL query against YDB database

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.4/5.0
Behavior2/5

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

With no annotations, the description carries full burden but fails to disclose safety traits (e.g., read-only vs mutation), idempotency, or side effects. It only says 'run a SQL query', which is insufficient for an agent to gauge risk.

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 a single sentence, which is concise, but it is too terse given the lack of annotations and low schema coverage. Some additional context would be justified.

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?

While an output schema exists (which helps with return values), the description omits important behavioral context such as safety, limits, or error conditions. For a tool that executes arbitrary SQL, more completeness is needed.

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

Parameters2/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, but it only mentions 'SQL query' without elaborating on the 'sql' parameter's format, length constraints, or typical usage. The schema provides only type 'string'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('run a SQL query') and the resource ('YDB database'), but it does not differentiate from the sibling tool 'ydb_query_with_params', which presumably has similar functionality. The agent may be confused about when to use this one vs the other.

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?

No guidance is provided on when to use this tool versus alternatives like 'ydb_query_with_params' or 'ydb_explain_query'. There is no mention of prerequisites, return handling, or selection criteria.

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

ydb_query_with_paramsC

Run a parameterized SQL query with JSON parameters

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYes
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are present, so the description must fully disclose behavior. It only mentions JSON parameters but does not state if the query is executed (read/write), any limits, security implications, or whether results are returned. The behavioral transparency is insufficient.

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 very concise (one short sentence), which is efficient but underspecified. It earns its place by being clear but lacks sufficient detail for a tool with no annotations.

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 complexity of parameterized SQL, no annotations, and an output schema, the description is incomplete. It does not mention return values (despite output schema existing), expected parameter formats, or relationship to sibling tools.

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

Parameters2/5

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

With 0% schema description coverage, the description must compensate. It mentions 'JSON parameters' but does not explain the 'sql' parameter or the expected format/structure of 'params'. The added meaning is minimal compared to what is needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (run), resource (parameterized SQL query), and method (with JSON parameters). It distinguishes from siblings like ydb_query (likely non-parameterized) and ydb_explain_query_with_params (explain vs execute).

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?

No guidance is provided on when to use this tool versus alternatives like ydb_query or ydb_explain_query_with_params. The description lacks any context about preferences, prerequisites, or exclusions.

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

ydb_statusA

Get the current YDB connection status

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries full burden but only states a read operation. It does not disclose whether the operation is safe, fast, or what happens on failure, but for a simple status check this minimal disclosure is adequate.

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

Conciseness5/5

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

A single sentence that is front-loaded and contains no unnecessary words, ideal for a simple status-check tool.

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?

The tool is simple with no parameters and an output schema exists. The description covers the basic purpose but could be enhanced by clarifying what 'connection status' encompasses. Still, it is minimally complete.

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?

No parameters exist and schema coverage is 100%, so the baseline of 3 applies. No additional parameter semantics are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Get' and identifies the resource 'current YDB connection status', clearly distinguishing it from sibling tools that deal with path description, query execution, and directory listing.

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?

No guidance is provided on when to use this tool versus alternatives. The context of checking connectivity is implied but not explicitly stated.

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. 7 tool updatesv0.1.4
    • Changedydb_describe_path2 fields changed
      • changedInput schema / title
        Previous value: -"describe_pathArguments"New value: +"ydb_describe_pathArguments"
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "$defs": {
        +    "Annotations": {
        +      "additionalProperties": true,
        +      "properties": {
        +        "audience": {
        +          "anyOf": [
        +            {
        +              "items": {
        +                "enum": [
        +                  "user",
        +                  "assistant"
        +                ],
        +                "type": "string"
        +              },
        +              "type": "array"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Audience"
        +        },
        +        "priority": {
        +          "anyOf": [
        +            {
        +              "maximum": 1,
        +              "minimum": 0,
        +              "type": "number"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Priority"
        +        }
        +      },
        +      "title": "Annotations",
        +      "type": "object"
        +    },
        +    "TextContent": {
        +      "additionalProperties": true,
        +      "description": "Text content for a message.",
        +      "properties": {
        +        "_meta": {
        +          "anyOf": [
        +            {
        +              "additionalProperties": true,
        +              "type": "object"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Meta"
        +        },
        +        "annotations": {
        +          "anyOf": [
        +            {
        +              "$ref": "#/$defs/Annotations"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null
        +        },
        +        "text": {
        +          "title": "Text",
        +          "type": "string"
        +        },
        +        "type": {
        +          "const": "text",
        +          "title": "Type",
        +          "type": "string"
        +        }
        +      },
        +      "required": [
        +        "type",
        +        "text"
        +      ],
        +      "title": "TextContent",
        +      "type": "object"
        +    }
        +  },
        +  "properties": {
        +    "result": {
        +      "items": {
        +        "$ref": "#/$defs/TextContent"
        +      },
        +      "title": "Result",
        +      "type": "array"
        +    }
        +  },
        +  "required": [
        +    "result"
        +  ],
        +  "title": "ydb_describe_pathOutput",
        +  "type": "object"
        +}
    • Changedydb_explain_query3 fields changed
      • removedInput schema / properties / params
        Removed value: -{
        -  "anyOf": [
        -    {
        -      "additionalProperties": true,
        -      "type": "object"
        -    },
        -    {
        -      "type": "null"
        -    }
        -  ],
        -  "default": null,
        -  "title": "Params"
        -}
      • changedInput schema / title
        Previous value: -"explain_queryArguments"New value: +"ydb_explain_queryArguments"
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "$defs": {
        +    "Annotations": {
        +      "additionalProperties": true,
        +      "properties": {
        +        "audience": {
        +          "anyOf": [
        +            {
        +              "items": {
        +                "enum": [
        +                  "user",
        +                  "assistant"
        +                ],
        +                "type": "string"
        +              },
        +              "type": "array"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Audience"
        +        },
        +        "priority": {
        +          "anyOf": [
        +            {
        +              "maximum": 1,
        +              "minimum": 0,
        +              "type": "number"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Priority"
        +        }
        +      },
        +      "title": "Annotations",
        +      "type": "object"
        +    },
        +    "TextContent": {
        +      "additionalProperties": true,
        +      "description": "Text content for a message.",
        +      "properties": {
        +        "_meta": {
        +          "anyOf": [
        +            {
        +              "additionalProperties": true,
        +              "type": "object"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Meta"
        +        },
        +        "annotations": {
        +          "anyOf": [
        +            {
        +              "$ref": "#/$defs/Annotations"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null
        +        },
        +        "text": {
        +          "title": "Text",
        +          "type": "string"
        +        },
        +        "type": {
        +          "const": "text",
        +          "title": "Type",
        +          "type": "string"
        +        }
        +      },
        +      "required": [
        +        "type",
        +        "text"
        +      ],
        +      "title": "TextContent",
        +      "type": "object"
        +    }
        +  },
        +  "properties": {
        +    "result": {
        +      "items": {
        +        "$ref": "#/$defs/TextContent"
        +      },
        +      "title": "Result",
        +      "type": "array"
        +    }
        +  },
        +  "required": [
        +    "result"
        +  ],
        +  "title": "ydb_explain_queryOutput",
        +  "type": "object"
        +}
    • Changedydb_explain_query_with_params4 fields changed
      • addedInput schema / properties / params / anyOf
        Added value: +[
        +  {
        +    "type": "string"
        +  },
        +  {
        +    "additionalProperties": true,
        +    "type": "object"
        +  }
        +]
      • removedInput schema / properties / params / type
        Removed value: -"string"
      • changedInput schema / title
        Previous value: -"explain_query_with_paramsArguments"New value: +"ydb_explain_query_with_paramsArguments"
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "$defs": {
        +    "Annotations": {
        +      "additionalProperties": true,
        +      "properties": {
        +        "audience": {
        +          "anyOf": [
        +            {
        +              "items": {
        +                "enum": [
        +                  "user",
        +                  "assistant"
        +                ],
        +                "type": "string"
        +              },
        +              "type": "array"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Audience"
        +        },
        +        "priority": {
        +          "anyOf": [
        +            {
        +              "maximum": 1,
        +              "minimum": 0,
        +              "type": "number"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Priority"
        +        }
        +      },
        +      "title": "Annotations",
        +      "type": "object"
        +    },
        +    "TextContent": {
        +      "additionalProperties": true,
        +      "description": "Text content for a message.",
        +      "properties": {
        +        "_meta": {
        +          "anyOf": [
        +            {
        +              "additionalProperties": true,
        +              "type": "object"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Meta"
        +        },
        +        "annotations": {
        +          "anyOf": [
        +            {
        +              "$ref": "#/$defs/Annotations"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null
        +        },
        +        "text": {
        +          "title": "Text",
        +          "type": "string"
        +        },
        +        "type": {
        +          "const": "text",
        +          "title": "Type",
        +          "type": "string"
        +        }
        +      },
        +      "required": [
        +        "type",
        +        "text"
        +      ],
        +      "title": "TextContent",
        +      "type": "object"
        +    }
        +  },
        +  "properties": {
        +    "result": {
        +      "items": {
        +        "$ref": "#/$defs/TextContent"
        +      },
        +      "title": "Result",
        +      "type": "array"
        +    }
        +  },
        +  "required": [
        +    "result"
        +  ],
        +  "title": "ydb_explain_query_with_paramsOutput",
        +  "type": "object"
        +}
    • Changedydb_list_directory2 fields changed
      • changedInput schema / title
        Previous value: -"list_directoryArguments"New value: +"ydb_list_directoryArguments"
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "$defs": {
        +    "Annotations": {
        +      "additionalProperties": true,
        +      "properties": {
        +        "audience": {
        +          "anyOf": [
        +            {
        +              "items": {
        +                "enum": [
        +                  "user",
        +                  "assistant"
        +                ],
        +                "type": "string"
        +              },
        +              "type": "array"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Audience"
        +        },
        +        "priority": {
        +          "anyOf": [
        +            {
        +              "maximum": 1,
        +              "minimum": 0,
        +              "type": "number"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Priority"
        +        }
        +      },
        +      "title": "Annotations",
        +      "type": "object"
        +    },
        +    "TextContent": {
        +      "additionalProperties": true,
        +      "description": "Text content for a message.",
        +      "properties": {
        +        "_meta": {
        +          "anyOf": [
        +            {
        +              "additionalProperties": true,
        +              "type": "object"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Meta"
        +        },
        +        "annotations": {
        +          "anyOf": [
        +            {
        +              "$ref": "#/$defs/Annotations"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null
        +        },
        +        "text": {
        +          "title": "Text",
        +          "type": "string"
        +        },
        +        "type": {
        +          "const": "text",
        +          "title": "Type",
        +          "type": "string"
        +        }
        +      },
        +      "required": [
        +        "type",
        +        "text"
        +      ],
        +      "title": "TextContent",
        +      "type": "object"
        +    }
        +  },
        +  "properties": {
        +    "result": {
        +      "items": {
        +        "$ref": "#/$defs/TextContent"
        +      },
        +      "title": "Result",
        +      "type": "array"
        +    }
        +  },
        +  "required": [
        +    "result"
        +  ],
        +  "title": "ydb_list_directoryOutput",
        +  "type": "object"
        +}
    • Changedydb_query3 fields changed
      • removedInput schema / properties / params
        Removed value: -{
        -  "anyOf": [
        -    {
        -      "additionalProperties": true,
        -      "type": "object"
        -    },
        -    {
        -      "type": "null"
        -    }
        -  ],
        -  "default": null,
        -  "title": "Params"
        -}
      • changedInput schema / title
        Previous value: -"queryArguments"New value: +"ydb_queryArguments"
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "$defs": {
        +    "Annotations": {
        +      "additionalProperties": true,
        +      "properties": {
        +        "audience": {
        +          "anyOf": [
        +            {
        +              "items": {
        +                "enum": [
        +                  "user",
        +                  "assistant"
        +                ],
        +                "type": "string"
        +              },
        +              "type": "array"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Audience"
        +        },
        +        "priority": {
        +          "anyOf": [
        +            {
        +              "maximum": 1,
        +              "minimum": 0,
        +              "type": "number"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Priority"
        +        }
        +      },
        +      "title": "Annotations",
        +      "type": "object"
        +    },
        +    "TextContent": {
        +      "additionalProperties": true,
        +      "description": "Text content for a message.",
        +      "properties": {
        +        "_meta": {
        +          "anyOf": [
        +            {
        +              "additionalProperties": true,
        +              "type": "object"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Meta"
        +        },
        +        "annotations": {
        +          "anyOf": [
        +            {
        +              "$ref": "#/$defs/Annotations"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null
        +        },
        +        "text": {
        +          "title": "Text",
        +          "type": "string"
        +        },
        +        "type": {
        +          "const": "text",
        +          "title": "Type",
        +          "type": "string"
        +        }
        +      },
        +      "required": [
        +        "type",
        +        "text"
        +      ],
        +      "title": "TextContent",
        +      "type": "object"
        +    }
        +  },
        +  "properties": {
        +    "result": {
        +      "items": {
        +        "$ref": "#/$defs/TextContent"
        +      },
        +      "title": "Result",
        +      "type": "array"
        +    }
        +  },
        +  "required": [
        +    "result"
        +  ],
        +  "title": "ydb_queryOutput",
        +  "type": "object"
        +}
    • Changedydb_query_with_params4 fields changed
      • addedInput schema / properties / params / anyOf
        Added value: +[
        +  {
        +    "type": "string"
        +  },
        +  {
        +    "additionalProperties": true,
        +    "type": "object"
        +  }
        +]
      • removedInput schema / properties / params / type
        Removed value: -"string"
      • changedInput schema / title
        Previous value: -"query_with_paramsArguments"New value: +"ydb_query_with_paramsArguments"
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "$defs": {
        +    "Annotations": {
        +      "additionalProperties": true,
        +      "properties": {
        +        "audience": {
        +          "anyOf": [
        +            {
        +              "items": {
        +                "enum": [
        +                  "user",
        +                  "assistant"
        +                ],
        +                "type": "string"
        +              },
        +              "type": "array"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Audience"
        +        },
        +        "priority": {
        +          "anyOf": [
        +            {
        +              "maximum": 1,
        +              "minimum": 0,
        +              "type": "number"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Priority"
        +        }
        +      },
        +      "title": "Annotations",
        +      "type": "object"
        +    },
        +    "TextContent": {
        +      "additionalProperties": true,
        +      "description": "Text content for a message.",
        +      "properties": {
        +        "_meta": {
        +          "anyOf": [
        +            {
        +              "additionalProperties": true,
        +              "type": "object"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Meta"
        +        },
        +        "annotations": {
        +          "anyOf": [
        +            {
        +              "$ref": "#/$defs/Annotations"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null
        +        },
        +        "text": {
        +          "title": "Text",
        +          "type": "string"
        +        },
        +        "type": {
        +          "const": "text",
        +          "title": "Type",
        +          "type": "string"
        +        }
        +      },
        +      "required": [
        +        "type",
        +        "text"
        +      ],
        +      "title": "TextContent",
        +      "type": "object"
        +    }
        +  },
        +  "properties": {
        +    "result": {
        +      "items": {
        +        "$ref": "#/$defs/TextContent"
        +      },
        +      "title": "Result",
        +      "type": "array"
        +    }
        +  },
        +  "required": [
        +    "result"
        +  ],
        +  "title": "ydb_query_with_paramsOutput",
        +  "type": "object"
        +}
    • Changedydb_status2 fields changed
      • changedInput schema / title
        Previous value: -"get_connection_statusArguments"New value: +"ydb_statusArguments"
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "$defs": {
        +    "Annotations": {
        +      "additionalProperties": true,
        +      "properties": {
        +        "audience": {
        +          "anyOf": [
        +            {
        +              "items": {
        +                "enum": [
        +                  "user",
        +                  "assistant"
        +                ],
        +                "type": "string"
        +              },
        +              "type": "array"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Audience"
        +        },
        +        "priority": {
        +          "anyOf": [
        +            {
        +              "maximum": 1,
        +              "minimum": 0,
        +              "type": "number"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Priority"
        +        }
        +      },
        +      "title": "Annotations",
        +      "type": "object"
        +    },
        +    "TextContent": {
        +      "additionalProperties": true,
        +      "description": "Text content for a message.",
        +      "properties": {
        +        "_meta": {
        +          "anyOf": [
        +            {
        +              "additionalProperties": true,
        +              "type": "object"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null,
        +          "title": "Meta"
        +        },
        +        "annotations": {
        +          "anyOf": [
        +            {
        +              "$ref": "#/$defs/Annotations"
        +            },
        +            {
        +              "type": "null"
        +            }
        +          ],
        +          "default": null
        +        },
        +        "text": {
        +          "title": "Text",
        +          "type": "string"
        +        },
        +        "type": {
        +          "const": "text",
        +          "title": "Type",
        +          "type": "string"
        +        }
        +      },
        +      "required": [
        +        "type",
        +        "text"
        +      ],
        +      "title": "TextContent",
        +      "type": "object"
        +    }
        +  },
        +  "properties": {
        +    "result": {
        +      "items": {
        +        "$ref": "#/$defs/TextContent"
        +      },
        +      "title": "Result",
        +      "type": "array"
        +    }
        +  },
        +  "required": [
        +    "result"
        +  ],
        +  "title": "ydb_statusOutput",
        +  "type": "object"
        +}
  2. 2 tool updatesv1.0.0
    • Addedydb_explain_query
    • Addedydb_explain_query_with_params
  3. 5 tool updates
    • First observedydb_describe_path
    • First observedydb_list_directory
    • First observedydb_query
    • First observedydb_query_with_params
    • First observedydb_status

TDQS

B3.3/5.0
Disambiguation5/5

Each tool has a distinct purpose: describing a path, explaining queries (with or without params), listing directory contents, running queries (with or without params), and checking status. No overlap or confusion.

Naming Consistency5/5

All tools follow a consistent 'ydb_<verb>' pattern with snake_case. The verb is specific and the 'with_params' suffix is applied uniformly for parameterized variants.

Tool Count5/5

Seven tools is well-scoped for a database query server. It covers query execution, query explanation, schema exploration, and status without being too sparse or bloated.

Completeness4/5

The tool set covers core read operations (query, explain, describe, list) and status. Missing write operations like insert or update, which may be intentional for a read-only server, but slightly limits completeness for full database interaction.

Maintenance

ActivityMaintained
ResponsivenessUnresponsive

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
    A Model Context Protocol server that enables Large Language Models to seamlessly interact with ClickHouse databases, supporting resource listing, schema retrieval, and query execution.
    2
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    A Model Context Protocol server implementation that enables AI assistants to securely interact with GreptimeDB, allowing them to explore database schema, read data, and execute SQL queries through a controlled interface.
    13
    29
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for PostgreSQL, MySQL, and SQLite that gives AI assistants secure database access via the Model Context Protocol.
    67
    4
    MIT

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/ydb-platform/ydb-mcp'

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