Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
RAG_TABLEYesThe table containing the knowledge vectors to inspect. Must match /^[a-zA-Z_][a-zA-Z0-9_]*$/ (identifier whitelist validation), e.g. t_knowledge_vector.
DATABASE_URLYesPostgreSQL / PgVector connection URL, e.g. postgres://postgres:<your-password>@127.0.0.1:5432/xwagent. All tools run their queries in read-only transactions against this database.
EMBEDDING_MODELNoEmbedding model name, e.g. text-embedding-v4.
EMBEDDING_API_KEYNoAPI key for the embedding endpoint. If not set, the server automatically switches to deterministic_fallback mode to generate normalized vectors for offline structural diagnosis and EXPLAIN index validation.
EMBEDDING_API_URLNoEmbedding API endpoint used to embed queries, e.g. https://dashscope.aliyuncs.com/compatible-mode/v1/embeddings.
EMBEDDING_DIMENSIONSNoEmbedding vector dimensions, e.g. 1536.
RAG_MAX_SNIPPET_CHARSNoMaximum characters of long text snippets returned in context windows; longer text is truncated (original length metadata is preserved). Default is 280.280

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
inspect_retrievalA

只读排查 PostgreSQL/PgVector 企业级 RAG 检索链路:对比单路向量检索分数与关键词/FTS 分数、展示 RRF 融合排名及多租户 Pre-filtering 结果和耗时,定位漏召回或排序偏低问题。

view_chunk_contextB

根据 chunk_id 只读查看同一文档版本号内前后相邻窗口切片,并自动诊断 Markdown 表格跨块劈断、段落截断或标题层级缺失等切片边界问题。

explain_vector_queryA

在只读事务中对带 Pre-filtering 条件的向量检索 SQL 执行 EXPLAIN ANALYZE(FORMAT JSON),解析是否命中 HNSW 索引、过滤淘汰行数与缓存块命中,给出针对性索引调优建议。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 3 tools

Disambiguation5/5

Each tool targets a clearly distinct concern: retrieval scoring/fusion diagnostics, chunk-boundary context inspection, and SQL query-plan analysis. An agent can easily choose between them based on whether the problem is recall/ranking, chunking, or index performance.

Naming Consistency5/5

All three names follow a consistent snake_case verb_object pattern (inspect_retrieval, view_chunk_context, explain_vector_query). No convention mixing or vague verbs.

Tool Count4/5

Three tools is on the lean side but each covers a distinct, necessary step in a focused read-only RAG debugging workflow. The scope is narrow enough that this is reasonable rather than padding.

Completeness4/5

The core debugging loop is covered: diagnose retrieval scores, inspect chunk boundaries, and analyze the query plan. Minor gaps exist (e.g., no way to list documents or discover chunk_ids without another tool), but agents can work around these via inspect_retrieval output.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues