Skip to main content
Glama
Simonsms

TiDB RAG MCP Server

by Simonsms

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
USE_MOCKNoSet to 'true' to use mock data without database, 'false' to use TiDB databasetrue
TIDB_HOSTNoTiDB host address (required when USE_MOCK=false)
TIDB_PORTNoTiDB port (required when USE_MOCK=false)
TIDB_USERNoTiDB user (required when USE_MOCK=false)
TIDB_DATABASENoTiDB database name (required when USE_MOCK=false)
TIDB_PASSWORDNoTiDB password (required when USE_MOCK=false)

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
tidb_list_knowledgeA

List knowledge entries from TiDB RAG knowledge base with pagination.

This tool retrieves knowledge entries from the database, supporting filtering by category and pagination.

Args:

  • limit (number): Maximum results to return, 1-100 (default: 20)

  • offset (number): Number of results to skip for pagination (default: 0)

  • category (string, optional): Filter by category

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: For JSON format: { "total": number, // Total entries matching criteria "count": number, // Entries in this response "offset": number, // Current pagination offset "items": [...], // Array of knowledge entries "has_more": boolean, // Whether more results exist "next_offset": number // Offset for next page (if has_more) }

Examples:

  • List first 10 entries: { "limit": 10 }

  • Filter by category: { "category": "技术文档", "limit": 20 }

  • Paginate: { "limit": 20, "offset": 20 }

tidb_get_knowledgeA

Get a single knowledge entry by ID from TiDB RAG knowledge base.

This tool retrieves the full content of a specific knowledge entry.

Args:

  • id (string): Knowledge entry ID (e.g., "kb-001")

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: For JSON format: { "id": string, "title": string, "content": string, "category": string | null, "metadata": object | null, "created_at": string, "updated_at": string }

Examples:

  • Get by ID: { "id": "kb-001" }

  • Get as JSON: { "id": "kb-001", "response_format": "json" }

tidb_search_knowledgeA

Search knowledge entries by keyword in TiDB RAG knowledge base.

This tool searches for knowledge entries matching a query string in title or content.

Args:

  • query (string): Search query string (1-500 characters)

  • limit (number): Maximum results to return, 1-100 (default: 20)

  • offset (number): Number of results to skip for pagination (default: 0)

  • category (string, optional): Filter by category

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: For JSON format: { "total": number, // Total matching entries "count": number, // Entries in this response "offset": number, // Current pagination offset "items": [...], // Array of matching knowledge entries "has_more": boolean, // Whether more results exist "next_offset": number // Offset for next page (if has_more) }

Examples:

  • Simple search: { "query": "MCP" }

  • Search with category filter: { "query": "向量", "category": "数据库" }

  • Paginated search: { "query": "RAG", "limit": 10, "offset": 10 }

tidb_vector_searchA

Search knowledge entries by vector similarity in TiDB (requires vector embeddings).

NOTE: This is a placeholder for future TiDB vector search functionality. Currently returns a not-implemented message.

Args:

  • embedding (number[]): Query embedding vector

  • top_k (number): Number of similar results to return, 1-100 (default: 10)

  • threshold (number): Minimum similarity threshold, 0-1 (default: 0.7)

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: Vector search results with similarity scores.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 4 tools

Disambiguation5/5

The four tools have clear, non-overlapping purposes: paginated listing, single-item retrieval by ID, keyword search, and vector similarity search. Even though list and search both return multiple entries, one is for browsing and the other requires a query, so an agent can reliably distinguish them.

Naming Consistency4/5

Three tools follow a consistent tidb_verb_noun pattern: tidb_list_knowledge, tidb_get_knowledge, and tidb_search_knowledge. tidb_vector_search breaks the verb-first convention somewhat, but the shared prefix and parallel structure keep the naming readable.

Tool Count5/5

Four tools is a well-scoped size for a read-focused knowledge base server. Each tool earns its place by covering a distinct retrieval need without unnecessary redundancy.

Completeness2/5

List, get, and keyword search form a functional read path, but the only semantic retrieval tool is explicitly a placeholder that always returns a not-implemented message. For a server claiming RAG capabilities, the missing working vector search and the lack of knowledge-entry management operations are significant gaps.

Maintenance

ActivityInactive
ResponsivenessNo issues