RAGmonsters Custom PostgreSQL MCP Server
Пользовательский сервер PostgreSQL MCP для RAGmonsters
Обзор
Этот репозиторий демонстрирует более продвинутый подход к интеграции больших языковых моделей (LLM) с базами данных с использованием Model Context Protocol (MCP). В то время как общие серверы MCP PostgreSQL позволяют LLM исследовать базы данных с помощью сырых SQL-запросов, этот проект использует другой подход, создавая настраиваемый сервер MCP , который предоставляет API, специфичный для домена, адаптированный к потребностям приложения.
В этой реализации используется FastMCP — высокопроизводительная реализация протокола контекста модели, которая обеспечивает повышенную эффективность и надежность инструментального взаимодействия с LLM.
Этот проект использует набор данных RAGmonsters в качестве своей основы. RAGmonsters — это проект с открытым исходным кодом, который предоставляет богатый, вымышленный набор данных монстров с различными атрибутами, способностями и отношениями — специально разработанный для демонстрации и тестирования систем Retrieval-Augmented Generation (RAG).
Проблема с общим доступом к базе данных MCP
Универсальные серверы MCP PostgreSQL предоставляют LLM-специалистам инструмент query , который позволяет им:
Изучите схемы баз данных
Формулируйте SQL-запросы на основе вопросов на естественном языке
Выполнить эти запросы к базе данных
Хотя этот подход работает, он имеет ряд ограничений для реальных приложений:
Когнитивная нагрузка : LLM должен понимать всю схему базы данных.
Неэффективность : для ответа на один вопрос часто требуется несколько SQL-запросов.
Проблемы безопасности : доступ к необработанному SQL-запросу требует тщательной разработки оперативных данных для предотвращения атак с использованием инъекций.
Производительность : Сложные запросы могут быть неэффективными, если LLM не понимает стратегию индексации базы данных.
Пробел в знаниях предметной области : LLM не понимает бизнес-правил и ограничений, специфичных для предметной области.
О наборе данных RAGmonsters
RAGmonsters — это открытый набор данных, специально разработанный для тестирования и демонстрации систем Retrieval-Augmented Generation (RAG). Он содержит информацию о вымышленных монстрах с богатыми атрибутами, способностями и отношениями, что делает его идеальным для демонстраций запросов на естественном языке.
Версия RAGmonsters для PostgreSQL предоставляет хорошо структурированную реляционную базу данных с несколькими таблицами и связями, включая:
Монстры с различными характеристиками (сила атаки, защита, здоровье и т. д.)
Способности, которыми могут обладать монстры
Элементы (огонь, вода, земля и т. д.) со сложными взаимоотношениями
Места обитания монстров
Эволюционные цепочки и взаимоотношения между монстрами
Этот богатый, взаимосвязанный набор данных идеально подходит для демонстрации возможностей API, специфичных для домена, по сравнению с общим доступом SQL.
Наше решение: API MCP для конкретных доменов
Этот проект демонстрирует, как создать пользовательский сервер MCP, который предоставляет API более высокого уровня, специфичный для домена, для набора данных RAGmonsters. Вместо того, чтобы выставлять возможности чистого SQL, наш сервер MCP предлагает специально созданные функции, которые:
Абстрактная сложность базы данных : скрыть базовую схему и детали SQL
Предоставляйте операции, специфичные для домена : предлагайте функции, которые соответствуют бизнес-концепциям
Оптимизация для распространенных запросов : внедрение эффективных шаблонов запросов для часто задаваемых вопросов.
Внедрение бизнес-правил : внедрение доменно-специфической логики и ограничений
Повышение безопасности : ограничение поверхности атаки путем удаления прямого доступа SQL.
Related MCP server: scopedb-mcp
Веб-интерфейс
Проект включает два основных интерфейса для взаимодействия с набором данных RAGmonsters:
Интерфейс проводника
Ориентированный на данные интерфейс для изучения и фильтрации набора данных RAGmonsters через API MCP:
Просмотрите всех монстров с фильтрацией по категории, среде обитания и редкости.
Посмотреть подробную информацию о каждом монстре
Интерактивный пользовательский интерфейс, созданный с помощью Bootstrap
Интерфейс чата
Интерфейс на естественном языке для взаимодействия с набором данных RAGmonsters:
Задавайте вопросы о монстрах на естественном языке
Получайте ответы в формате Markdown с расширенным форматированием
Работает на основе шаблона агента LangGraph ReAct
Полная интеграция с инструментами MCP

Этот интерфейс позволяет пользователям:
Просмотреть всех монстров в наборе данных
Фильтровать монстров по среде обитания, категории и редкости
Просматривайте подробную информацию о каждом монстре, включая его способности, возможности, сильные и слабые стороны.
Пример: API, специфичный для домена, и универсальный SQL
Универсальный подход MCP PostgreSQL:
User: "What are the top 3 monsters with the highest attack power that are vulnerable to fire?"
LLM: (Must understand schema, joins, and SQL syntax)
1. First query to understand the schema
2. Second query to find monsters with attack power
3. Third query to find vulnerabilities
4. Final query to join and filter resultsНаш индивидуальный подход к MCP-серверу:
User: "What are the top 3 monsters with the highest attack power that are vulnerable to fire?"
LLM: (Uses our domain-specific API)
1. Single call: getMonsters({ vulnerableTo: "fire", sortBy: "attackPower", limit: 3 })Структура проекта
├── .env.example # Example environment variables
├── package.json # Node.js project configuration
├── README.md # This documentation
├── img/ # Images for documentation
├── scripts/
│ ├── testMcpServer.js # Test script for the MCP server
│ └── testLogger.js # Logger for test script
├── src/
│ ├── index.js # Main application server
│ ├── mcp-server/ # Custom MCP server implementation with FastMCP
│ │ ├── index.js # Server entry point
│ │ ├── tools/ # Domain-specific tools
│ │ │ ├── index.js # Tool registration
│ │ │ └── monsters.js # Monster-related operations
│ │ └── utils/ # Helper utilities
│ │ └── logger.js # Logging functionality
│ ├── llm.js # LangChain integration for LLM
│ └── public/ # Web interface files
│ ├── index.html # Monster explorer interface
│ └── chat.html # Chat interface for LLM interactionsФункции
Пользовательский сервер MCP с FastMCP : высокопроизводительный API-интерфейс для домена данных RAGmonsters
Оптимизированные запросы : готовые эффективные операции с базой данных
Уровень бизнес-логики : правила и ограничения домена, встроенные в API
Структурированный формат ответа : последовательные ответы JSON для потребления LLM
Комплексное ведение журнала : подробное ведение журнала для отладки и мониторинга.
Тестовый набор : скрипты для проверки функциональности сервера и интеграции LLM
Интеграция LLM :
Интеграция LangChain.js с OpenAI и другими совместимыми поставщиками LLM
Шаблон агента LangGraph ReAct для эффективного использования инструмента
Автоматическая обработка вызовов и ответов инструментов
Веб-интерфейсы :
Интерфейс проводника для просмотра и фильтрации монстров
Интерфейс чата с поддержкой Markdown для взаимодействия на естественном языке
Функции
Интеграция LangChain.js : полностью интегрированное взаимодействие LLM с инструментами MCP
Веб-интерфейс : интерфейсы обозревателя и чата для взаимодействия с набором данных RAGmonsters
Готовность к развертыванию : настроено для простого развертывания на таких платформах, как Clever Cloud.
Преимущества этого подхода
Улучшенная производительность : оптимизированные запросы и стратегии кэширования.
Лучший пользовательский опыт : более точные и быстрые ответы
Сокращенное использование токенов : LLM не нужно обрабатывать сложную информацию SQL или схемы.
Повышенная безопасность : отсутствие прямого доступа к SQL означает снижение риска атак путем внедрения
Поддерживаемость : изменения в схеме базы данных не требуют переподготовки LLM.
Масштабируемость : может обрабатывать более крупные и сложные базы данных.
Начиная
Установка
Клонировать этот репозиторий
Установка зависимостей:
npm installСкопируйте
.env.exampleв.envи настройте строку подключения PostgreSQL и ключи LLM API.Запустите тестовый скрипт сервера MCP:
npm run testЗапустите скрипт интеграционного теста LLM:
npm run test:llmЗапустите сервер:
npm start
Доступные инструменты
Сервер MCP предоставляет следующие инструменты:
getMonsters — получение списка монстров с возможностью фильтрации, сортировки и разбиения на страницы
Параметры: фильтры (категория, местообитание, редкость), сортировка (поле, направление), лимит, смещение
Возвращает: Массив объектов-монстров с базовой информацией.
getMonsterById — получить подробную информацию о конкретном монстре по ID
Параметры: monsterId
Возвращает: Подробный объект-монстр со всеми атрибутами, силами, способностями, сильными и слабыми сторонами.
add - Простая утилита для сложения двух чисел (для тестирования)
Параметры: а, б
Возвращает: сумму двух чисел.
Архитектура интеграции LLM
В этом проекте используется современный подход к интеграции LLM с предметно-ориентированными инструментами:
Шаблон агента LangGraph ReAct
Приложение использует шаблон агента LangGraph ReAct (Reasoning and Acting), который:
Обрабатывает запросы пользователей для понимания намерений
Определяет, какие инструменты использовать на основе запроса
Автоматически запускает соответствующие инструменты
Синтезирует результаты в последовательный ответ
При необходимости выполняет многошаговые рассуждения
Тестирование интеграции LLM
Проект включает в себя тестовый скрипт, демонстрирующий, как использовать LangChain.js для интеграции LLM с сервером MCP:
npm run test:llmЭтот скрипт:
Подключается к серверу MCP с помощью StdioClientTransport
Загружает все доступные инструменты MCP с помощью адаптеров MCP LangChain
Создает агент LangChain с API OpenAI
Обрабатывает запросы на естественном языке о монстрах
Демонстрирует, как LLM вызывает инструменты для извлечения информации.
Регистрирует подробную информацию о взаимодействии
Вы можете изменить тестовые запросы в скрипте, чтобы исследовать различные возможности системы. Скрипт находится по адресу scripts/testLlmWithMcpServer.js .
Предпосылки
Node.js 23 или более поздняя версия
База данных PostgreSQL с данными RAGmonsters
Доступ к API LLM (например, OpenAI)
Пакет FastMCP (включен в зависимости)
Переменные среды
Создайте файл .env со следующими переменными:
# PostgreSQL connection string
POSTGRESQL_ADDON_URI=postgres://username:password@host:port/database
# LLM API configuration
LLM_API_KEY=your_openai_api_key
LLM_API_MODEL=gpt-4o-mini
LLM_API_URL=https://api.openai.com/v1Конфигурация LLM
LLM_API_KEY : Ваш ключ API OpenAI или ключ совместимого поставщика
LLM_API_MODEL : модель для использования (по умолчанию: gpt-4o-mini)
LLM_API_URL : конечная точка API (по умолчанию: конечная точка OpenAI)
Приложение поддерживает любой API, совместимый с OpenAI, включая самостоятельные модели и альтернативных поставщиков.
Развертывание в Clever Cloud
Использование Clever Cloud CLI
Установите Clever Cloud CLI:
npm install -g clever-toolsВойдите в свою учетную запись Clever Cloud:
clever loginСоздайте новую заявку:
clever create --type node <APP_NAME>Добавьте свой домен (необязательно, но рекомендуется):
clever domain add <YOUR_DOMAIN_NAME>Создайте дополнение PostgreSQL и свяжите его со своим приложением:
clever addon create <APP_NAME>-pg --plan dev clever service link-addon <APP_NAME>-pgЭто автоматически установит переменную среды
POSTGRESQL_ADDON_URIв вашем приложении.Установите необходимые переменные среды:
clever env set LLM_API_KEY "your-openai-api-key" clever env set LLM_API_MODEL "gpt-4o-mini" # Optional, defaults to gpt-4o-mini clever env set LLM_API_URL "https://api.your-llm-provider.com" # Optional, for alternative OpenAI-compatible providersРазверните свое приложение:
clever deployОткройте ваше приложение:
clever open
Использование консоли Clever Cloud
Вы также можете выполнить развертывание непосредственно из консоли Clever Cloud :
Создайте новое приложение в консоли
Выберите Node.js в качестве среды выполнения.
Создайте дополнение PostgreSQL и свяжите его со своим приложением
Задайте необходимые переменные среды в консоли:
LLM_API_KEY: Ваш ключ API OpenAILLM_API_MODEL: (Необязательно) модель для использования, по умолчанию gpt-4o-mini
Разверните свое приложение с помощью интеграции Git или GitHub
Важные примечания
Переменная среды
POSTGRESQL_ADDON_URIавтоматически устанавливается Clever Cloud, когда вы подключаете надстройку PostgreSQL к своему приложению.Для работы приложения требуется Node.js 20 или более поздней версии, доступной в Clever Cloud.
Приложение будет автоматически запущено на порту 8080, который является портом по умолчанию для приложений Node.js в Clever Cloud.
Лицензия
Данный проект лицензирован по лицензии MIT — подробности см. в файле LICENSE.
Благодарности
RAGmonsters для выборочного набора данных
Модель контекстного протокола для спецификации MCP
FastMCP для высокопроизводительной реализации MCP
Clever Cloud для возможностей хостинга
Available Tools
6 toolsaddA
Add two numbers
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. 'Add two numbers' accurately describes a pure, stateless, non-destructive operation. For such a simple arithmetic tool, this is sufficient transparency, though it could explicitly state that it has no side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that conveys the essential action without any unnecessary words. It is highly concise and structured effectively.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's extreme simplicity (add two numbers), the description is largely complete. It could mention the return value (the sum), but that is easily inferred. The lack of output schema does not significantly degrade completeness here.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% – the description does not explain the two parameters 'a' and 'b' or their roles beyond what the schema already provides. With no additional meaning added, this dimension is severely lacking.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Add two numbers', specifying the verb 'add' and the resource 'two numbers'. This distinguishes it from sibling tools like sub, mul, div, mod, and sqrt, which perform different operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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. For example, it does not explain when addition is preferred over subtraction or multiplication. The usage context is entirely implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getHabitatsB
Get a list of all available habitats in the database
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
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 retrieves a list but doesn't specify if it's read-only, safe, paginated, or has any side effects. 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's function without any fluff. It's appropriately sized and front-loaded, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. However, it lacks details on behavioral aspects like safety or output format, which would be helpful for an agent to use it correctly, especially without annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 no parameter documentation is needed. The description doesn't add param info, which is fine here, but it could hint at any implicit constraints (e.g., sorting or limits), though not required. Baseline is high due to no parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get') and resource ('list of all available habitats'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'getMonsterByHabitat' or 'getMonsters', which also retrieve data but with different scopes or filters, so it lacks sibling distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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 scenarios where this tool is preferred over siblings like 'getMonsterByHabitat' (which filters by habitat) or 'getMonsters' (which retrieves monsters instead of habitats), leaving the agent without usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getMonsterByHabitatA
Get monsters by habitat (exact match only). IMPORTANT: for best results, first call getHabitats to get a list of available habitats, then find the most appropriate one to use with this tool.
| Name | Required | Description | Default |
|---|---|---|---|
| habitat | Yes | Exact habitat name (must match exactly). For best results, first call getHabitats to get a list of available habitats, then find the most appropriate one to use with this tool. | |
| limit | No | Maximum number of results to return (default: 10) |
TDQS
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 mentions the 'exact match only' constraint, which is useful behavioral context beyond basic functionality. However, it lacks details on error handling, rate limits, authentication needs, or what the return format looks like (e.g., list of monsters with specific fields).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: two sentences that efficiently convey purpose and usage guidelines without wasted words. The first sentence states the core functionality, and the second provides critical procedural advice, both earning their place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
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 fairly complete. It covers purpose, usage guidelines, and a key behavioral constraint ('exact match only'). However, without annotations or an output schema, it could benefit from more details on return values or error cases, but it's adequate for basic use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters ('habitat' and 'limit') with descriptions. The description repeats the guidance about calling 'getHabitats' for the 'habitat' parameter but doesn't add new semantic meaning beyond what the schema provides. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
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 monsters by habitat (exact match only).' It specifies the verb ('Get'), resource ('monsters'), and constraint ('by habitat, exact match only'). However, it doesn't explicitly differentiate from siblings like 'getMonsters' (which might fetch all monsters) or 'getMonsterByName' (which filters by name rather than habitat).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidance: 'for best results, first call getHabitats to get a list of available habitats, then find the most appropriate one to use with this tool.' This tells the agent when to use this tool (after retrieving habitat list) and references a sibling tool ('getHabitats') as a prerequisite, offering clear alternatives and context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getMonsterByIdB
Get detailed information about a specific monster by ID
| Name | Required | Description | Default |
|---|---|---|---|
| monsterId | Yes | ID of the monster to retrieve |
TDQS
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 'detailed information' but doesn't specify what that includes (e.g., stats, abilities, weaknesses), whether it's a read-only operation, error handling for invalid IDs, or performance characteristics like rate limits. This leaves significant gaps for agent understanding.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple lookup tool with one parameter and no output schema, the description is minimally adequate. However, it lacks details on the returned data structure (e.g., what 'detailed information' entails) and behavioral aspects like error cases, which would help an agent use it correctly. The absence of annotations exacerbates these gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with the parameter 'monsterId' clearly documented as 'ID of the monster to retrieve'. The description adds no additional semantic context beyond what the schema provides, such as format examples or valid ranges. Given the high schema coverage, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get detailed information') and resource ('about a specific monster by ID'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'getMonsterByName' or 'getMonsterByHabitat', which also retrieve monster information but use different identifiers.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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 'getMonsterByName' (for name-based lookup) or 'getMonsterByHabitat' (for habitat-based filtering), nor does it specify prerequisites such as needing a valid monster ID.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getMonsterByNameA
Get monsters by name (partial match, returns up to 5 matches)
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the monster to search for (can be partial) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses key behavioral traits: partial matching and a limit of 5 results, which are valuable beyond basic 'get' functionality. However, it lacks details on error handling, authentication needs, or rate limits, leaving gaps 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise and front-loaded: a single sentence that efficiently conveys the core functionality and key constraints. Every word earns its place, with no wasted text or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
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 parameter, no output schema, no annotations), the description is minimally complete. It covers the basic operation and behavioral constraints but lacks details on output format or error cases. For a simple lookup tool, this is adequate but leaves room for improvement in contextual richness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents the 'name' parameter as 'Name of the monster to search for (can be partial).' The description adds no additional meaning beyond this, merely restating 'partial match.' Baseline 3 is appropriate as the schema handles parameter documentation adequately.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
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 monsters by name' specifies the verb (get) and resource (monsters). It distinguishes from siblings like getMonsterById and getMonsters by focusing on name-based retrieval. However, it doesn't explicitly differentiate from getMonsterByHabitat, which is a similar lookup but by different criteria.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context through 'partial match, returns up to 5 matches,' suggesting it's for fuzzy name searches with result limits. However, it doesn't explicitly state when to use this versus alternatives like getMonsterById (exact ID match) or getMonsters (full list). No guidance on prerequisites or exclusions is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getMonstersB
Get a list of monsters with optional filtering, sorting, and pagination
| Name | Required | Description | Default |
|---|---|---|---|
| filters | No | Optional filters for the query | |
| limit | No | Maximum number of results to return (default: 10) | |
| offset | No | Number of results to skip for pagination (default: 0) | |
| sort | No | Optional sorting parameters |
TDQS
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 mentions filtering, sorting, and pagination but doesn't describe important traits like whether this is a read-only operation, what happens with invalid filters, rate limits, authentication requirements, or the format of returned results. For a list retrieval tool 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose ('Get a list of monsters') and then succinctly lists the key capabilities. Every word earns its place with no redundancy or unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is incomplete for a tool with four parameters and nested objects. It doesn't explain what the returned list looks like, how errors are handled, or important behavioral aspects like default values or constraints. For a list retrieval tool with filtering capabilities, 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.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all four parameters thoroughly. The description adds minimal value by mentioning 'optional filtering, sorting, and pagination' which aligns with the schema but doesn't provide additional semantic context beyond what's already in the parameter descriptions. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get') and resource ('list of monsters'), making the purpose immediately understandable. It distinguishes itself from siblings like getMonsterById or getMonsterByName by indicating it returns a list rather than a single entity. However, it doesn't explicitly differentiate from getMonsterByHabitat which also involves filtering.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage through 'optional filtering, sorting, and pagination', suggesting this tool is for general queries rather than specific lookups. However, it doesn't explicitly state when to use this versus alternatives like getMonsterByHabitat or getMonsterById, nor does it provide any exclusions or prerequisites for usage.
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.
6 tool updates
v1.0.0- First observed
add - First observed
getHabitats - First observed
getMonsterByHabitat - First observed
getMonsterById - First observed
getMonsterByName - First observed
getMonsters
TDQS
Scored across 6 tools
Most tools have distinct purposes, but 'getMonsterByHabitat' and 'getMonsters' could cause confusion since both retrieve monsters with filtering capabilities. The descriptions clarify that 'getMonsterByHabitat' is for exact habitat matching while 'getMonsters' offers broader filtering, but agents might still misselect between them.
The naming is mixed with inconsistent patterns: 'add' uses a generic verb, 'getHabitats' and 'getMonsters' follow a verb_noun plural pattern, while 'getMonsterByHabitat', 'getMonsterById', and 'getMonsterByName' use a verb_noun_preposition format. This creates readability but lacks uniformity across all tools.
With 6 tools, the count is reasonable for a PostgreSQL-based monster database server. It covers core operations like adding data and querying monsters in various ways, though it might benefit from additional tools for updates or deletions to be fully scoped.
The tool set covers querying and adding data well, but there are notable gaps for a database server: no update or delete tools for monsters or habitats, and no tool for creating habitats. This limits full lifecycle management and could cause agent failures in more complex workflows.
Maintenance
Related MCP Connectors
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
- UnifAPIOAuthcom.unifapi
Hosted MCP server for live public-data APIs and Skills for AI agents.
The Grafbase MCP server sits in front of a GraphQL API and exposes an MCP protocol-compliant interface that allows AI agents and LLMs to explore and query GraphQL APIs using natural language. It provides tools to search schemas, introspect types and fields, and execute GraphQL queries while minimizing context bloat by returning only relevant schema subsets, with built-in support for authentication, authorization, and configurable access control.
Related MCP Servers
- -licenseNot gradedqualityCmaintenanceAn MCP server that bridges AI assistants with SQL databases, enabling natural language querying across multiple database types with built-in optimization and security.3-
- AlicenseNot gradedqualityDmaintenanceConfig-driven MCP server that gives AI scoped, auditable database access without exposing the entire database.5 npm6MIT
- AlicenseAqualityAmaintenanceA read-only MCP server that exposes SQL database access to LLMs, supporting multiple database types, compact columnar results, pagination, and file export.728 npmMIT
- AlicenseNot gradedqualityBmaintenanceMCP server for safely exposing SQL Server database capabilities to LLM clients, with read-only mode, security features, and observability.28MIT