Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
KB_TENANT_IDYesTenant ID (UUID) from Supabase auth.users
SUPABASE_URLYesSupabase project URL
SILICONFLOW_API_KEYYesSiliconFlow API key for embeddings
SUPABASE_SERVICE_ROLE_KEYYesSupabase service role key

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_knowledge_baseA

语义检索知识库,返回与查询最相关的若干片段(含相似度与所属文档标题)。

何时使用:用户提问涉及具体业务、产品、政策等知识库内容时,先调用本工具拿到
相关片段再作答,并在回答中标注片段来源文档。

参数:
- query(必填):用户原话或主题关键词
- top_k(默认 5):返回片段数,上限 20(超过会被自动钳制)
list_documentsA

列出当前知识库的全部文档及元数据(id、标题、类型、状态、片段数、创建时间)。

何时使用:用户询问"知识库里有什么"、需要清单概览,或在调用 get_document_content
前需要先获取 document_id 时。无参数。
get_document_contentA

按 document_id 拉取并拼接单篇文档全文。

何时使用:用户要看某文档完整内容,或 search 命中后需要更完整上下文时。
参数 document_id 必须是合法 UUID(可从 list_documents 或 search_knowledge_base
的返回中获取)。超 8000 字符会自动截断并在末尾标注原始字符数。

Prompts

Interactive templates invoked by user choice

NameDescription
kb_qa知识库问答提示词模板:把用户原始问题包装成"先检索后作答 + 标注来源"的指令。 用法:在 Desktop "Prompts" 面板选择 kb_qa,填入 question,即发送为一条用户消息。

Resources

Contextual data attached and managed by the client

NameDescription
documents_snapshot知识库文档清单的只读快照(JSON 字符串)。 与 list_documents tool 的区别: - Resource:**客户端主动读取**的上下文数据,Desktop 用户可在"附件/资源"面板里 手动挂载;模型不会自动调用,适合作为对话起手的背景资料 - Tool:**模型决策调用**,模型在需要时自行触发(如用户问"知识库有什么") 返回与 list_documents 同结构的 JSON;空清单返回中文文案。

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/code-runner-xx/kb-mcp-server'

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