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

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/Simonsms/readKnowledgeMcp'

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