Skip to main content
Glama
LostInBrittany

RAGmonsters Custom PostgreSQL MCP Server

RAGmonsters를 위한 맞춤형 PostgreSQL MCP 서버

개요

이 저장소는 모델 컨텍스트 프로토콜(MCP)을 사용하여 대용량 언어 모델(LLM)을 데이터베이스와 통합하는 더욱 발전된 접근 방식을 보여줍니다. 일반 MCP PostgreSQL 서버를 사용하면 LLM이 원시 SQL 쿼리를 통해 데이터베이스를 탐색할 수 있지만, 이 프로젝트는 애플리케이션의 요구에 맞춰 도메인별 API를 제공하는 맞춤형 MCP 서버를 구축하여 다른 접근 방식을 취합니다.

이 구현에서는 LLM과의 도구 기반 상호작용에 대한 효율성과 안정성을 개선하는 모델 컨텍스트 프로토콜의 고성능 구현인 FastMCP를 사용합니다.

이 프로젝트는 RAGmonsters 데이터셋을 기반으로 합니다. RAGmonsters는 다양한 속성, 능력, 관계를 가진 몬스터들의 풍부한 가상 데이터셋을 제공하는 오픈소스 프로젝트로, 특히 검색 증강 생성(RAG) 시스템을 시연하고 테스트하기 위해 설계되었습니다.

일반 MCP 데이터베이스 액세스의 문제점

일반 MCP PostgreSQL 서버는 LLM에 다음을 수행할 수 있는 query 도구를 제공합니다.

  • 데이터베이스 스키마 탐색

  • 자연어 질문을 기반으로 SQL 쿼리를 공식화합니다.

  • 데이터베이스에 대해 해당 쿼리를 실행합니다.

이러한 접근 방식은 효과적이지만 실제 응용 프로그램에는 몇 가지 제한 사항이 있습니다.

  • 인지 부하 : LLM은 전체 데이터베이스 스키마를 이해해야 합니다.

  • 비효율성 : 하나의 질문에 답하기 위해 종종 여러 개의 SQL 쿼리가 필요합니다.

  • 보안 문제 : 원시 SQL 액세스에는 주입 공격을 방지하기 위한 신중하고 신속한 엔지니어링이 필요합니다.

  • 성능 : LLM이 데이터베이스의 인덱싱 전략을 이해하지 못하는 경우 복잡한 쿼리는 비효율적일 수 있습니다.

  • 도메인 지식 격차 : LLM은 비즈니스 규칙과 도메인별 제약에 대한 이해가 부족합니다.

RAGmonsters 데이터세트에 대하여

RAGmonsters는 검색 증강 생성(RAG) 시스템의 테스트 및 시연을 위해 특별히 설계된 오픈 데이터셋입니다. 풍부한 속성, 능력, 관계를 가진 가상 몬스터에 대한 정보를 포함하고 있어 자연어 쿼리 시연에 적합합니다.

RAGmonsters의 PostgreSQL 버전은 다음을 포함하여 여러 테이블과 관계를 갖춘 잘 구성된 관계형 데이터베이스를 제공합니다.

  • 다양한 속성(공격력, 방어력, 체력 등)을 가진 몬스터

  • 몬스터가 가질 수 있는 능력

  • 복잡한 관계를 가진 요소(불, 물, 흙 등)

  • 괴물이 발견되는 서식지

  • 진화 사슬과 몬스터 간의 관계

이 풍부하고 상호 연결된 데이터 세트는 도메인별 API와 일반 SQL 액세스의 힘을 비교하는 데 이상적입니다.

당사 솔루션: 도메인별 MCP API

이 프로젝트는 RAGmonsters 데이터세트에 대한 상위 수준의 도메인별 API를 제공하는 맞춤형 MCP 서버를 구축하는 방법을 보여줍니다. MCP 서버는 원시 SQL 기능을 노출하는 대신, 다음과 같은 특수 목적 함수를 제공합니다.

  1. 추상 데이터베이스 복잡성 : 기본 스키마 및 SQL 세부 정보 숨기기

  2. 도메인별 작업 제공 : 비즈니스 개념에 맞는 기능 제공

  3. 일반적인 질문에 대한 최적화 : 자주 묻는 질문에 대한 효율적인 쿼리 패턴 구현

  4. 비즈니스 규칙 적용 : 도메인별 논리 및 제약 조건 포함

  5. 보안 강화 : SQL 직접 액세스를 제거하여 공격 표면을 제한합니다.

Related MCP server: scopedb-mcp

웹 인터페이스

이 프로젝트에는 RAGmonsters 데이터 세트와 상호 작용하기 위한 두 가지 주요 인터페이스가 포함되어 있습니다.

탐색기 인터페이스

MCP API를 통해 RAGmonsters 데이터 세트를 탐색하고 필터링하기 위한 데이터 중심 인터페이스:

  • 카테고리, 서식지, 희귀도별로 필터링하여 모든 몬스터를 찾아보세요

  • 각 몬스터에 대한 자세한 정보를 확인하세요

  • Bootstrap으로 구축된 대화형 UI

채팅 인터페이스

RAGmonsters 데이터 세트와 상호 작용하기 위한 자연어 인터페이스:

  • 자연어로 괴물에 대한 질문을 하세요

  • 다양한 서식을 사용하여 마크다운 형식의 응답을 받으세요

  • LangGraph의 ReAct 에이전트 패턴으로 구동됨

  • MCP 도구와의 원활한 통합

RAGmonsters Explorer 스크린샷

이 인터페이스를 통해 사용자는 다음을 수행할 수 있습니다.

  • 데이터 세트의 모든 몬스터를 탐색합니다

  • 서식지, 범주 및 희귀도에 따라 몬스터 필터링

  • 각 몬스터의 능력, 강점, 약점을 포함한 자세한 정보를 확인하세요.

예: 도메인별 API 대 일반 SQL

일반 MCP PostgreSQL 접근 방식:

지엑스피1

맞춤형 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

특징

  • FastMCP를 사용한 맞춤형 MCP 서버 : RAGmonsters 데이터를 위한 고성능 도메인별 API

  • 최적화된 쿼리 : 미리 구축된 효율적인 데이터베이스 작업

  • 비즈니스 로직 계층 : API에 내장된 도메인 규칙 및 제약 조건

  • 구조화된 응답 형식 : LLM 사용을 위한 일관된 JSON 응답

  • 포괄적 로깅 : 디버깅 및 모니터링을 위한 자세한 로깅

  • 테스트 모음 : 서버 기능 및 LLM 통합을 검증하는 스크립트

  • LLM 통합 :

    • OpenAI 및 기타 호환 LLM 공급자와 LangChain.js 통합

    • 효율적인 도구 사용을 위한 LangGraph ReAct 에이전트 패턴

    • 도구 호출 및 응답의 자동 처리

  • 웹 인터페이스 :

    • 몬스터 탐색 및 필터링을 위한 탐색기 인터페이스

    • 자연어 상호 작용을 위한 마크다운 렌더링을 사용한 채팅 인터페이스

특징

  • LangChain.js 통합 : MCP 도구와 완벽하게 통합된 LLM 상호 작용

  • 웹 인터페이스 : RAGmonsters 데이터 세트와 상호 작용하기 위한 탐색기 및 채팅 인터페이스

  • 배포 준비 완료 : Clever Cloud와 같은 플랫폼에 쉽게 배포할 수 있도록 구성됨

이 접근 방식의 이점

  1. 향상된 성능 : 최적화된 쿼리 및 캐싱 전략

  2. 더 나은 사용자 경험 : 더욱 정확하고 빠른 응답

  3. 토큰 사용량 감소 : LLM은 복잡한 SQL이나 스키마 정보를 처리할 필요가 없습니다.

  4. 강화된 보안 : SQL에 직접 접근하지 않으므로 주입 공격 위험이 줄어듭니다.

  5. 유지 관리성 : 데이터베이스 스키마 변경으로 인해 LLM 재교육이 필요하지 않습니다.

  6. 확장성 : 더 크고 복잡한 데이터베이스를 처리할 수 있습니다.

시작하기

설치

  1. 이 저장소를 복제하세요

  2. 종속성 설치: npm install

  3. .env.example``.env 로 복사하고 PostgreSQL 연결 문자열과 LLM API 키를 구성합니다.

  4. MCP 서버 테스트 스크립트를 실행합니다: npm run test

  5. LLM 통합 테스트 스크립트를 실행합니다: npm run test:llm

  6. 서버를 시작합니다: npm start

사용 가능한 도구

MCP 서버는 다음과 같은 도구를 제공합니다.

  1. getMonsters - 필터링, 정렬, 페이지 매김 등의 선택적 기능을 갖춘 몬스터 목록을 가져옵니다.

    • 매개변수: 필터(범주, 서식지, 희귀도), 정렬(필드, 방향), 제한, 오프셋

    • 반환: 기본 정보가 포함된 몬스터 객체 배열

  2. getMonsterById - ID로 특정 몬스터에 대한 자세한 정보를 가져옵니다.

    • 매개변수: monsterId

    • 반환: 모든 속성, 힘, 능력, 강점 및 약점을 갖춘 자세한 몬스터 객체

  3. add - 두 숫자를 더하는 간단한 유틸리티(테스트용)

    • 매개변수: a, b

    • 반환: 두 숫자의 합

LLM 통합 아키텍처

이 프로젝트에서는 도메인별 도구와 LLM을 통합하는 현대적인 접근 방식을 사용합니다.

LangGraph ReAct 에이전트 패턴

이 애플리케이션은 LangGraph의 ReAct(추론 및 행동) 에이전트 패턴을 사용합니다.

  1. 의도를 이해하기 위해 사용자 쿼리를 처리합니다.

  2. 쿼리에 따라 사용할 도구를 결정합니다.

  3. 자동으로 적절한 도구를 실행합니다

  4. 결과를 일관된 응답으로 종합합니다.

  5. 필요할 때 여러 단계의 추론을 처리합니다.

LLM 통합 테스트

이 프로젝트에는 LangChain.js를 사용하여 LLM을 MCP 서버와 통합하는 방법을 보여주는 테스트 스크립트가 포함되어 있습니다.

npm run test:llm

이 스크립트:

  1. StdioClientTransport를 사용하여 MCP 서버에 연결합니다.

  2. LangChain의 MCP 어댑터를 사용하여 사용 가능한 모든 MCP 도구를 로드합니다.

  3. OpenAI API를 사용하여 LangChain 에이전트를 생성합니다.

  4. 몬스터에 대한 자연어 쿼리를 처리합니다.

  5. LLM이 정보를 검색하기 위해 도구 호출을 수행하는 방법을 보여줍니다.

  6. 상호작용에 대한 자세한 정보를 기록합니다.

스크립트의 테스트 쿼리를 수정하여 시스템의 다양한 기능을 살펴볼 수 있습니다. 스크립트는 scripts/testLlmWithMcpServer.js 에 있습니다.

필수 조건

  • Node.js 23 이상

  • RAGmonsters 데이터가 포함된 PostgreSQL 데이터베이스

  • LLM API(예: 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 : OpenAI API 키 또는 호환 공급자 키

  • LLM_API_MODEL : 사용할 모델(기본값: gpt-4o-mini)

  • LLM_API_URL : API 엔드포인트(기본값: OpenAI의 엔드포인트)

이 애플리케이션은 자체 호스팅 모델과 대체 공급자를 포함한 모든 OpenAI 호환 API를 지원합니다.

Clever Cloud에 배포

Clever Cloud CLI 사용

  1. Clever Cloud CLI를 설치하세요:

    npm install -g clever-tools
  2. Clever Cloud 계정에 로그인하세요:

    clever login
  3. 새로운 애플리케이션을 만드세요:

    clever create --type node <APP_NAME>
  4. 도메인을 추가하세요(선택 사항이지만 권장):

    clever domain add <YOUR_DOMAIN_NAME>
  5. PostgreSQL 애드온을 만들고 애플리케이션에 연결합니다.

    clever addon create <APP_NAME>-pg --plan dev
    clever service link-addon <APP_NAME>-pg

    이렇게 하면 애플리케이션에서 POSTGRESQL_ADDON_URI 환경 변수가 자동으로 설정됩니다.

  6. 필요한 환경 변수를 설정하세요.

    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
  7. 애플리케이션을 배포하세요.

    clever deploy
  8. 신청서를 엽니다:

    clever open

Clever Cloud Console 사용

Clever Cloud Console 에서 직접 배포할 수도 있습니다.

  1. 콘솔에서 새 애플리케이션을 만듭니다.

  2. 런타임으로 Node.js를 선택하세요

  3. PostgreSQL 애드온을 생성하고 애플리케이션에 연결하세요

  4. 콘솔에서 필요한 환경 변수를 설정합니다.

    • LLM_API_KEY : OpenAI API 키

    • LLM_API_MODEL : (선택 사항) 사용할 모델이며 기본값은 gpt-4o-mini입니다.

  5. Git 또는 GitHub 통합을 사용하여 애플리케이션 배포

중요 참고 사항

  • POSTGRESQL_ADDON_URI 환경 변수는 PostgreSQL 애드온을 애플리케이션에 연결할 때 Clever Cloud에서 자동으로 설정됩니다.

  • 이 애플리케이션에는 Clever Cloud에서 사용 가능한 Node.js 20 이상이 필요합니다.

  • 이 애플리케이션은 Clever Cloud의 Node.js 애플리케이션에 대한 기본 포트인 포트 8080에서 자동으로 실행됩니다.

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

감사의 말

Available Tools

6 tools
addA

Add two numbers

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

TDQS

A3.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. '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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters1/5

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.

Purpose5/5

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.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. 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

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it 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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so 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.

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 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.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention 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.

ParametersJSON Schema
NameRequiredDescriptionDefault
habitatYesExact 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.
limitNoMaximum number of results to return (default: 10)

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It 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.

Conciseness5/5

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.

Completeness4/5

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

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is 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.

Parameters3/5

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.

Purpose4/5

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

The description clearly states the tool's purpose: 'Get 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.

Usage Guidelines5/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
monsterIdYesID of the monster to retrieve

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

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 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.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like '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)

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesName of the monster to search for (can be partial)

TDQS

A3.5/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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

Given the tool's low complexity (1 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.

Parameters3/5

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.

Purpose4/5

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

The description clearly states the tool's purpose: 'Get 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.

Usage Guidelines3/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
filtersNoOptional filters for the query
limitNoMaximum number of results to return (default: 10)
offsetNoNumber of results to skip for pagination (default: 0)
sortNoOptional sorting parameters

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It 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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

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 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.

Usage Guidelines3/5

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.

  1. 6 tool updatesv1.0.0
    • First observedadd
    • First observedgetHabitats
    • First observedgetMonsterByHabitat
    • First observedgetMonsterById
    • First observedgetMonsterByName
    • First observedgetMonsters

TDQS

B3.2/5.0

Scored across 6 tools

Disambiguation4/5

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.

Naming Consistency3/5

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.

Tool Count4/5

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.

Completeness3/5

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

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that bridges AI assistants with SQL databases, enabling natural language querying across multiple database types with built-in optimization and security.
    3
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Config-driven MCP server that gives AI scoped, auditable database access without exposing the entire database.
    5 npm
    6
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    A read-only MCP server that exposes SQL database access to LLMs, supporting multiple database types, compact columnar results, pagination, and file export.
    7
    28 npm
    MIT