Skip to main content
Glama
MCP Server RAG

MCP Server RAG

by atengk

rag_index_url

Fetches an online page or document by URL, cleans HTML noise, and indexes its content into a vector knowledge base with fingerprint-based duplicate skipping.

Instructions

通过 HTTP 请求抓取在线网页或在线文档,清洗 HTML 视觉噪点并进行向量索引。

支持 SHA-256 内容指纹校验与幂等跳过,并具备网络超时与异常防护。

Args:
    kb_name: 目标知识库名称
    url: 目标网页或在线文档的完整 URL(必须以 http:// 或 https:// 开头)
    metadata: 可选的附加结构化元数据字典

Returns:
    dict[str, Any]: 索引结果状态字典

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "kb_name": "<kb_name>",
      "url": "<url>"
    },
    "name": "rag_index_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes
kb_nameYes
metadataNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden and does contribute real information: SHA-256 content fingerprinting with idempotent skip, plus network timeout and exception protection, and HTML noise cleaning. However, it omits several things an agent needs for a KB-mutating operation: whether an existing document with the same URL is overwritten, what the skip path returns, permission/auth requirements, and any rate limits or size limits on fetched pages.

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 body is two short lines of prose followed by a clean Args/Returns block, with the core action front-loaded. No filler sentences; every clause (fingerprint skip, timeout protection, URL format) adds distinct information.

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?

An output schema exists, so the vague 'Returns: dict[str, Any] 索引结果状态字典' line is a minor waste rather than a gap. But for a write-into-KB tool with zero annotations, the definition should still say what happens on the idempotent-skip path and whether the KB must pre-exist; those omissions leave the agent unsure about preconditions and outcomes.

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?

Schema description coverage is 0%, so the description must compensate, and it does: kb_name is identified as the target knowledge base, url is constrained to a full http(s) address, and metadata is described as an optional structured metadata dictionary. The only shortfall is that the metadata dict's expected keys are left unspecified.

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 first sentence names a specific verb chain and resource: fetch an online page/doc over HTTP, clean HTML visual noise, and build a vector index. That is far more than a restatement of the name. It implicitly separates itself from the file/directory/text siblings via '在线网页或在线文档', but never names them explicitly, so it stops short of a 5.

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?

Usage is only implied by the URL requirement — the agent can infer 'use this when you have a URL rather than raw text or a local path', but the definition never states when to prefer rag_index_file, rag_index_directory, or rag_index_text, nor any preconditions (e.g. whether the target KB must already exist). The http:// / https:// constraint is the only concrete boundary given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.