Skip to main content
Glama

3gpp-mcp

Go 参考 Go 报告卡 CI codecov GitHub 发布

一个 MCP(模型上下文协议)服务器,使 3GPP 规范对 LLM 可访问。

背景

3GPP 规范是移动和电信工程的重要参考,但 LLM 难以有效处理它们:

  • 文档太多 - 跨多个系列存在数千份规范,难以找到正确的文档。

  • 单个文档太大 - 许多规范长达数百页,远超典型的上下文窗口。

  • 以 Word 文件形式分发 - 规范以 .docx / .doc 格式发布,需要转换才能进行文本处理。

  • 大量交叉引用 - 规范频繁相互引用;孤立地阅读单个文档会得到不完整的图景。

  • 信息集中在表格和图中 - 复杂的表格和流程图承载着关键细节。此工具将表格转换为 Markdown 并提取嵌入的图像供 LLM 查看。

  • 版本复杂性 - 同一规范存在于多个 3GPP 版本中,识别正确的版本很重要。

此工具通过解析 .docx 文件、按章节组织内容并将所有内容存储在带有全文搜索(FTS5)的 SQLite 数据库中来应对这些挑战。然后,一个 MCP 服务器公开用于搜索、按章节浏览和跟踪交叉引用的工具——让 LLM 像工程师一样浏览规范。

为什么不使用 RAG?

基于嵌入的 RAG 是提高文档问答准确性的常用方法,并且存在专门针对 3GPP 文档的 RAG 系统(Telco-RAG,TelcoAI)。此工具采用更简单的方法:不是在模型前构建检索管道,而是为模型提供搜索和导航工具,让它像工程师一样探索规范——全文搜索,然后跟踪章节层次结构和交叉引用。由于检索是对结构化章节的纯 FTS5 搜索,因此无需运行嵌入模型或向量数据库,所有内容都存在于一个 SQLite 文件中。

在 TeleQnA 上衡量,这使三个模型系列在 3GPP 标准问题上的准确率提高了 6.5 到 12.0 个百分点。其中大部分归功于拥有文本本身:对同一数据库的单个 BM25 查询贡献了 +7.8 到 +9.6 个百分点。该工具自身的搜索在回答距离首次检索到的段落不止一跳的问题时脱颖而出——在从规范本身生成的任务(协议代码、ASN.1 结构、5G SBI 模式)上,它回答并正确引用了 88-100%,在每种任务类型和每个模型上都比相同的 BM25 基线高出 +26 到 +88 个百分点。参见 BENCHMARK.md。

Related MCP server: mcp-docs

入门

1. 安装

# Homebrew
brew install higebu/tap/3gpp-mcp

# ...or with Go 1.26+
go install github.com/higebu/3gpp-mcp/cmd/3gpp-mcp@latest

预构建的二进制文件也可在发布页面上获取。LibreOffice 是可选的(需要用于 .doc 到 .docx 的转换以及 EMF/WMF 图像到 PNG 的转换)。

2. 构建数据库

下载并将规范导入数据库。每个规范处理完后临时文件会被删除,从而最大限度地减少磁盘使用。

# Download and import the latest version of every spec (all releases)
3gpp-mcp build --latest --db data/3gpp.db --convert-doc --convert-image

# ...or restrict to a single release
3gpp-mcp build --release 19 --db data/3gpp.db --convert-doc --convert-image

这将抓取 3GPP FTP 存档,下载 ZIP 文件,提取并解析 .docx 文件,并将结构化内容插入到 SQLite 数据库中。

3. 向您的 MCP 客户端注册

Claude Code

claude mcp add --scope user 3gpp -- 3gpp-mcp serve --db /path/to/data/3gpp.db

VS Code / GitHub Copilot

code --add-mcp '{"name":"3gpp","command":"3gpp-mcp","args":["serve","--db","/path/to/data/3gpp.db"]}'

GitHub Copilot CLI

添加到 ~/.config/github-copilot/cli-mcp.json(如果不存在则创建):

{
  "mcpServers": {
    "3gpp": {
      "command": "3gpp-mcp",
      "args": ["serve", "--db", "/path/to/data/3gpp.db"]
    }
  }
}

Codex CLI

codex mcp add --name 3gpp --command 3gpp-mcp --args serve --db /path/to/data/3gpp.db

Claude Desktop

添加到您的配置文件(macOS 上为 ~/Library/Application Support/Claude/claude_desktop_config.json,Windows 上为 %APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "3gpp": {
      "command": "3gpp-mcp",
      "args": ["serve", "--db", "/path/to/data/3gpp.db"]
    }
  }
}

4. Web 查看器(可选)

通过向 HTTP 传输添加 --web 在浏览器中浏览规范:

3gpp-mcp serve --db data/3gpp.db --transport http --addr :8080 --web
# MCP endpoint: http://localhost:8080/mcp/
# Web viewer:   http://localhost:8080/

功能:带筛选的规范列表、带目录侧边栏的章节查看器、带分页的全文搜索、历史版本浏览(每个规范的版本都会列出,并按需下载,类似于 MCP 工具)、版本比较(结构摘要和逐章节差异)、嵌入图像、交叉引用链接、带语法高亮的 OpenAPI 定义、转换器发出的 LaTeX 公式 的 KaTeX 渲染、深色模式、响应式设计。代码块按表示法进行语法高亮——ASN.1、Diameter、SIP/RTSP、SDP 和 XML(参见代码块)。

WebMCP

当浏览器提供 W3C WebMCP API(document.modelContext,截至 2026 年为 Chrome 源试用)时,查看器会在页面加载时将其所有 MCP 工具注册到浏览器,因此浏览器内代理可以直接查询规范数据库。注册是通过 /mcp/ 端点的轻量级同源直通——无需配置服务器端,没有该 API 的浏览器不受影响。在源试用期间,通过 Chrome 标志(chrome://flags)在本地启用它,或者对于共享部署,从代理服务器提供 Origin-Trial 标头。

部署

Streamable HTTP

HTTP 传输是无状态的:它支持 MCP 协议版本 2026-07-28(无初始化握手,无 Mcp-Session-Id),而较旧的客户端(2024-11-05 到 2025-11-25)通过每个请求的会话继续工作。

使用 HTTP 传输启动服务器:

3gpp-mcp serve --db data/3gpp.db --transport http --addr :8080

可选地启用 Bearer 令牌认证:

export THREEGPP_MCP_BEARER_TOKEN=$(openssl rand -hex 32)
3gpp-mcp serve --db data/3gpp.db --transport http --addr :8080

然后配置您的客户端通过 HTTP 连接:

{
  "mcpServers": {
    "3gpp": {
      "url": "http://your-server:8080",
      "headers": {
        "Authorization": "Bearer YOUR_SECRET_TOKEN"
      }
    }
  }
}

使用 --web 时,MCP 端点移至 /mcp/。

参见 examples/systemd/ 了解使用 systemd 的生产部署。

Docker

Dockerfile 是多阶段的,并直接为某个版本构建数据库,生成一个自包含的镜像,其中嵌入了 SQLite 数据库(章节、OpenAPI 定义和嵌入图像)。构建上下文中不需要预构建的数据库。

# Build an image with the latest version of every spec baked in (default)
docker build -t 3gpp-mcp:latest .

# ...or restrict the database to a single release
docker build --build-arg RELEASE=19 -t 3gpp-mcp:rel19 .

# ...or cap the newest release, keeping specs that have no version in it
docker build --build-arg MAX_RELEASE=19 -t 3gpp-mcp:max-rel19 .

# stdio transport (Claude Code / IDE integration)
docker run --rm -i 3gpp-mcp:latest

# HTTP transport
docker run --rm -p 8080:8080 3gpp-mcp:latest serve --db /3gpp.db --transport http --addr :8080

RELEASE 默认为 latest,它会嵌入所有版本中每个规范的最新版本。设置 --build-arg RELEASE=<n>(例如 19)以将数据库限制为单个版本,或设置 --build-arg MAX_RELEASE=<n> 以限制最新版本,而不删除其中没有该版本的规范。两者不能结合使用。

Cloud Run

要在 Cloud Run 上运行,请参见 cloudbuild.yaml(构建 + 推送 + 部署)和 service.yaml(Cloud Run 服务规范)。

工具

下面的每个工具也有一个 CLI 对应项(list_specs → 3gpp-mcp list-specs,依此类推),用于 shell 使用和脚本编写——请参阅命令参考中的查询命令。

浏览规范

工具

描述

关键参数

list_specs

列出可用的规范(分页)

series(可选):按系列编号筛选,例如 "23";query(可选):规范 ID 前缀,例如 "38.21";limit,offset

list_versions

列出规范的版本以及每个版本可读取的位置

spec_id(必需):例如 "TS 23.501"

get_toc

获取规范的目录

spec_id(必需),version

get_section

获取章节内容(分页)

spec_id,section_number(必需),version,include_subsections,offset,max_lines,max_chars

compare_versions

比较规范的两个版本:结构摘要或章节文本差异

spec_id,old_version(必需),new_version,section_number,include_subsections,context_lines,offset,max_lines,max_chars

每个 get_toc、get_section 和 search 结果都会在分页响应的每一页上命名其来源的规范和版本。

历史版本

数据库保存每个规范的一个版本。要读取另一个版本,请将 version 传递给 get_section 或 get_toc。version 接受点分形式(15.8.0)、存档令牌(f80)、版本选择器(Rel-15 或 15,选择该版本中最新的版本)或 latest。版本选择器和 latest 会针对 3GPP 存档进行解析,因此它们需要按需获取(它们在 --no-fetch 下不起作用)。compare_versions 的 old_version 和 new_version 接受相同的形式;new_version 默认为数据库中的版本。

不在数据库中的版本会从 3GPP 存档下载并在首次使用时进行转换。对于大型规范,这最多需要几分钟;如果在调用预算到期时仍在运行,工具会说明情况,稍后重复相同的调用将返回内容。结果保存在大小有限的缓存中(参见 serve),该缓存与主数据库分开,因此:

  • search 仅覆盖数据库中的版本——不支持跨版本的全文搜索

  • get_references 仅具有数据库中版本的数据,并且从存档版本读取的章节会在其标头中说明

  • get_image 和 list_images 也接受 version:存档版本的图像会在首次使用时单独下载(每个版本额外一次存档下载,具有相同的重试行为),并且当服务器上安装了 LibreOffice 时,EMF/WMF 图形会转换为 PNG

  • 章节编号在版本之间会移动;在读取旧版本的章节之前,请检查其 get_toc

搜索

工具

描述

关键参数

search

跨所有规范的全文搜索

query(必需),spec_ids(可选),limit,offset

search 工具支持 SQLite FTS5 查询语法:

  • 短语搜索:"service based interface"

  • 布尔运算符:AMF AND UE,AMF OR SMF,NOT deprecated

  • 肯定项后的排除:handover -conditional

  • 前缀匹配:handov*

  • 列筛选:title:authentication,content:handover

  • 邻近搜索:NEAR(AMF UE, 5)

包含连字符或点号的术语(IMS-AKA,38.101)会自动加引号,因此无需手动转义。

交叉引用

工具

描述

关键参数

get_references

获取规范与RFC之间的交叉引用

spec_id(必填),section_number("outgoing" 方向必填),direction("outgoing" 或 "incoming"),include_subsections,offset

OpenAPI 定义

工具

描述

关键参数

list_openapi

列出可用的 OpenAPI 定义

spec_id(可选):按规范过滤,例如 "TS 29.510"

get_openapi

获取 OpenAPI 定义(分页)

spec_id,api_name(必填),path,schema,offset,max_lines

search_openapi

跨 OpenAPI 定义进行全文搜索

query(必填),spec_ids,api_name,kind("schema" 或 "operation"),include_body,limit,offset

search_openapi 使用其自身的 FTS5 索引,与 search 使用的索引分开: search 覆盖规范条款文本,从不返回 OpenAPI 内容; search_openapi 仅覆盖 OpenAPI 内容。一次命中对应一个定义而非一个文档——来自 components.schemas 的 schema,或一个路径的一个 HTTP 方法(命名如 PUT /nf-instances/{nfInstanceID})——因此您可以找到数据类型或端点而无需知道是哪个 API 文档定义了它,然后通过 get_openapi 完整读取。查询为单个裸词时,会将名称完全匹配的定义排在首位,因此 NFProfile 会返回 NFProfile schema,排在仅引用它的 schema 之前。

schema 的索引文本携带一级 $ref 展开——通过 items 和 additionalProperties 以及直接引用,这正是 5G SBI 定义表述其大部分关系的方式——因此被引用类型的字段可从使用它的 schema 中搜索到;相隔两跳的类型不在该文本中。与 search 不同,此索引不应用词干提取——标识符按原样匹配——并且 -、. 和 _ 会分割 token,因此 Nnrf_NFManagement 也可通过 NFManagement 找到,/nf-instances 可通过 instances 找到。camelCase 不会被分割。

该索引在 build 和 update 结束时构建。import 和 import-dir 不处理它:YAML 文件随归档 zip 一起提供,因此导入 .docx 不会改变可索引的内容。在此工具存在之前构建的数据库没有索引;可通过 build-openapi-index 就地添加。

ASN.1 定义

工具

描述

关键参数

get_asn1

按名称获取 ASN.1 赋值——在单个规范或所有规范中——或列出规范的赋值名称

spec_id(可选;省略则在所有规范中解析 name),name(赋值名称,例如 AMF-UE-NGAP-ID;无 spec_id 时必填),version(需要 spec_id),offset,max_lines,max_chars

采用 ASN.1 规范的协议(RRC TS 38.331/36.331、NGAP TS 38.413、S1AP TS 36.413、XnAP、F1AP……)将其 ASN.1 写在 -- ASN1START / -- ASN1STOP 标记之间,转换器将其存储为 ```asn1 围栏(参见代码块)。get_asn1 从这些围栏中提取每个顶级赋值——类型、常量和信息对象。

使用 name 时,它返回该赋值的完整文本及其定义所在的章节,以便答案可被引用。这对于将所有 IE 定义在一个条款中的协议很重要:NGAP 的 IE 定义条款有数百 KB,远超一个 get_section 页面,而回答“ASN.1 在此处允许什么范围”的那个定义只有几行。匹配忽略大小写和分隔符,因此 IE 表中的 AMF UE NGAP ID 能找到 ASN.1 中的 AMF-UE-NGAP-ID;匹配不到任何内容的名称会得到相似名称的建议。多次定义的名称会返回每个定义,各自在其源行下。

当您不知道哪个规范定义了某个名称时,省略 spec_id:该名称会在数据库中所有规范中解析,使用数据库构建时构建的名称索引(build、update、import 和 import-dir 都会刷新它)。指定了错误规范的查找会被告知该名称实际定义的位置。在此工具存在之前构建的数据库没有索引——可通过 build-asn1-index 就地添加。跨规范解析仅覆盖数据库版本——传递 spec_id(以及可选的 version)以读取归档版本,具有与 get_section 相同的按需下载行为。

使用 spec_id 且无 name 时,它会列出每个赋值名称,按定义章节分组。

嵌入图片

工具

描述

关键参数

list_images

列出规范中的嵌入图片

spec_id(必填),version(可选)

get_image

获取嵌入图片为 LLM 可查看的 base64 数据

spec_id,name(必填):图片文件名,version(可选)

PNG/JPEG/GIF/WebP 图片可直接被 LLM 查看。EMF/WMF 图片(大多数 3GPP 图表使用此格式)默认存储为原始数据;使用 --convert-image 可在构建时通过 LibreOffice 将其转换为 PNG。

图表在章节文本中以单一符号引用,无论图片格式如何:正文中的 ![Figure](image://NAME?w=&h=) 和表格单元格内的 <img src="image://NAME?w=&h=" ...>。将该 NAME 传递给 get_image;原始文件名(image3.emf)和转换后的文件名(image3.png)均可解析。

代码块

章节文本带有标记的代码围栏,因此 LLM 和 Web 查看器都能区分符号:

围栏

内容

```asn1

-- ASN1START / -- ASN1STOP 标记之间的 ASN.1 模块

```diameter

Diameter 命令和分组 AVP 定义(RFC 6733 CCF)

```xml

XML 模式、XML 正文示例和 DTD

```sip

SIP/RTSP 消息示例

```sdp

独立的 SDP 会话描述

```latex

从 Word OMML 转换的独立方程

```

源文档样式化为代码的其他任何内容

公式

Word 公式(OMML)以三种符号转换为 LaTeX,因此公式无论是独立存在还是位于句子中都可读:

符号

位置

```latex 围栏

内容仅为方程式的段落。其方程编号保留为 \tag{7.3-1},渲染为右对齐的 (7.3-1)。

$$...$$

不能作为围栏块的显示方程——位于表格单元格或列表项内。

$...$

句子内的公式。

缩进

3GPP 文本通过缩进编码结构——嵌套的需求和条件列表、多级定义。正文段落的开头空白保留为不间断空格(U+00A0),源文档的一个制表符变为四个:字面制表符或 4 个以上前导空格会将行变为 Markdown 中的缩进代码块(其中像 <sub> 这样的 HTML 永远不会被解释),而不间断空格在任何渲染器中保持视觉嵌套,且不影响全文搜索。

提示

告知模型使用工具

附加服务器本身并不会使模型查阅它:在可以选择的情况下,一些模型会凭记忆回答 3GPP 问题。在基准测试中,Claude Sonnet 5 跳过了 40% 的 TeleQnA 问题的检索,GPT 5.6 Luna 跳过了 60%,而在这些问题上,工具毫无价值。客户端系统提示中的一句话消除了这种自由裁量权。经过测量的措辞:

不要凭记忆回答。首先搜索规范,并根据您检索到的文本给出答案,即使您确信自己已经知道答案。

这句话将 Luna 的跳过率降至零,其增益从 +5.9 分提高到 +12.0 分,对已经搜索每个问题的模型没有影响,并且如果没有附加工具则毫无价值——它强制检索而不是偷偷塞入答案。本着同样精神更严格的内部规则——关于 3GPP 的每个答案都基于通过这些工具检索到的条款文本,并引用该条款——是合理的,但只有上述句子是基准测试所测量的。

每个版本使用单独的数据库

对于跨版本的快速比较,compare_versions 和 version 参数无需额外设置。当您持续针对一个版本工作时,为每个版本构建单独的数据库仍然值得:全文 search、get_references 和 OpenAPI 定义仅覆盖数据库内置的版本,因此特定版本的数据库为您提供该版本的所有这三个功能,无需按需下载。

# Build databases for different releases
3gpp-mcp build --release 18 --db data/3gpp-rel18.db --convert-doc --convert-image
3gpp-mcp build --release 19 --db data/3gpp-rel19.db --convert-doc --convert-image

--release 仅保留在该确切版本中有版本的规范,因此冻结在早期版本中的规范(例如 TS 34.108)会完全从数据库中缺失。要固定版本而不丢失这些规范,请改为限制选择范围——每个规范都采用其不高于该限制的最新版本:

# Everything as of Release 19: specs with no Rel-19 version fall back to their
# newest older version rather than dropping out.
3gpp-mcp build --max-release 19 --db data/3gpp-rel19.db --convert-doc --convert-image

# Keep the cap when refreshing the database later.
3gpp-mcp update --max-release 19 --db data/3gpp-rel19.db --convert-doc

将它们注册为单独的 MCP 服务器:

claude mcp add --scope user 3gpp-rel18 -- 3gpp-mcp serve --db /path/to/data/3gpp-rel18.db
claude mcp add --scope user 3gpp-rel19 -- 3gpp-mcp serve --db /path/to/data/3gpp-rel19.db

保持规范最新

使用 update 命令检查数据库中已有规范的新版本:

3gpp-mcp update --db data/3gpp.db --convert-doc --convert-image

命令参考

serve

启动 MCP 服务器。

标志

描述

默认值

--db

SQLite 数据库路径

3gpp.db

--transport

传输类型:stdio 或 http(环境变量:THREEGPP_MCP_TRANSPORT;当设置了 PORT 时默认为 http)

stdio

--addr

HTTP 监听地址(环境变量:THREEGPP_MCP_ADDR,或 PORT 解释为 :$PORT)

:8080

--bearer-token

HTTP 认证的 Bearer 令牌(环境变量:THREEGPP_MCP_BEARER_TOKEN)

--web

在 MCP 服务器旁启用 Web 查看器(仅 HTTP 传输)

false

--no-fetch

禁用按需获取数据库中不存在的规范版本

false

--version-cache

按需版本缓存路径

$XDG_CACHE_HOME/3gpp-mcp/versions.db(未设置时为 ~/.cache/3gpp-mcp/versions.db)

--version-cache-mb

版本缓存大小限制(MB)。0 仅保留最近获取的版本,-1 为无限制(环境变量:THREEGPP_VERSION_CACHE_MB)

1024

--fetch-budget

工具调用等待按需获取完成的时间,超时后要求调用者重试(环境变量:THREEGPP_FETCH_BUDGET)

60s

版本缓存是一个独立的 SQLite 文件,因此主数据库保持只读,并且永远不会被额外版本污染。当无法创建缓存时(例如只读或临时文件系统,如基于 scratch 的容器镜像),服务器会记录警告并以禁用按需获取的方式运行;其他所有功能继续正常工作。一旦超出大小限制,缓存的版本将按最近最少使用(LRU)策略被驱逐。

HTTP 传输还暴露了 GET /health,该端点无需认证即可返回 200 OK。请使用此路径进行平台健康检查(Cloud Run、Sakura AppRun、Kubernetes 存活/就绪探针等)。

build

下载并将规范导入数据库(推荐用于初始设置)。别名:pipeline。

标志

描述

默认值

--db

输出 SQLite 数据库路径

3gpp.db

--release

处理特定版本的规范(例如 19)

--max-release

将选择限制在某个版本(例如 19):每个规范取其最新版本,且版本不超过该限制

--latest

选择每个规范的最新版本(当未提供其他选择器时使用)

false

--spec

处理特定规范(例如 23.501)

--series

按系列筛选,逗号分隔(例如 23,29)

--workers

并行工作线程数

NumCPU

--convert-doc

使用 LibreOffice 将 .doc 文件转换为 .docx

false

--convert-image

使用 LibreOffice 将 EMF/WMF 图像转换为 PNG

false

--spec-list

从文件读取规范列表,而不是从存档爬取(仍需要选择器)

--no-cache

禁用规范列表缓存

false

--scrape-workers

爬取规范列表的并发数(0 = 自动)

0

--timeout

HTTP 超时

30s

必须提供 --release、--max-release、--latest、--series 或 --spec 之一,包括 --spec-list 时:文件提供候选条目,选择器对其进行筛选。

--release 和 --max-release 的区别在于,当某个规范在指定版本中没有对应版本时:--release 19 会丢弃该规范,--max-release 19 则保留其低于该限制的最新版本。两者不能同时使用。

其他命令

  • download — 下载规范而不进行转换(--output-dir,默认为 specs)。需要提供 --release、--max-release、--latest、--series 或 --spec 之一,与 build 相同。

  • import — 将单个 .docx 文件导入数据库。别名:convert。用法:3gpp-mcp import --db data/3gpp.db path/to/spec.docx

  • import-dir — 将目录中的所有 .docx 文件导入数据库。别名:convert-dir。用法:3gpp-mcp import-dir --db data/3gpp.db ./specs

  • update — 将数据库中的规范更新到最新版本,或使用 --max-release 更新到某个上限。

  • build-openapi-index — 重建现有数据库的 OpenAPI 搜索索引。build 和 update 本身会执行此操作,因此该命令用于向在 search_openapi 存在之前构建的数据库添加索引:serve 以只读方式打开数据库,无法动态创建索引。

  • build-asn1-index — 重建现有数据库的 ASN.1 名称索引。build、update、import 和 import-dir 本身会执行此操作,因此该命令用于向在 get_asn1 存在之前构建的数据库添加索引。

  • completion — 打印 Shell 补全脚本:3gpp-mcp completion bash(或 zsh、fish)

上限不会存储在数据库中,因此使用 --max-release 19 构建的数据库在 update 时需要相同的标志——否则更新会将每个规范提升到存档中的最新版本。使用上限时,更新可以双向移动规范,因此它也会将已经构建的无上限数据库降低到上限;如果某个规范的所有版本都高于上限,则该规范会被删除,因为上限数据库中不应包含该规范的任何版本。如果某个规范在存档列表中缺失,则保持不变,因为失败的列表与已撤回的规范看起来相同。

查询命令

查询命令(list-specs、list-versions、get-toc、get-section、get-asn1、compare-versions、search、list-openapi、get-openapi、search-openapi、get-references、list-images、get-image)与 MCP 读取工具一一对应,因此可以在没有 MCP 客户端的情况下从 Shell 检查和编写数据库脚本:

3gpp-mcp search --db data/3gpp.db --limit 3 "AMF AND authentication" | jq '.results[].section_number'
3gpp-mcp get-section --db data/3gpp.db "TS 23.501" 5.15.2 | less

所有命令共享的约定:

  • 标志必须位于位置参数之前。

  • JSON 结果以缩进格式打印到标准输出,不进行分页——可以管道到 jq、head 或 less。警告和进度信息输出到标准错误,因此标准输出保持可解析。

  • 接受 --version(以及 compare-versions)的命令采用与 MCP 工具相同的版本格式(15.8.0、f80、Rel-15、latest),并等待按需下载完成,而不是要求您重试;使用 Ctrl-C 中断。它们共享 serve 的获取标志:--no-fetch、--version-cache、--version-cache-mb、--fetch-budget。未指定版本的查询永远不会创建版本缓存(list-versions 读取现有缓存以报告 cached 可用性,但不会创建缓存)。

  • 每个命令都接受 --db(默认为 3gpp.db)。

环境变量

变量

描述

THREEGPP_MCP_TRANSPORT

serve 的传输方式(stdio 或 http);被 --transport 覆盖

THREEGPP_MCP_ADDR

serve 的 HTTP 监听地址;被 --addr 覆盖

THREEGPP_MCP_BEARER_TOKEN

HTTP 传输认证的 Bearer 令牌

PORT

PaaS 约定(Cloud Run / Heroku);serve 默认在 :$PORT 上使用 HTTP 传输

THREEGPP_VERSION_CACHE_MB

按需版本缓存大小限制(MB)(默认 1024)

THREEGPP_FETCH_BUDGET

工具调用等待按需获取的时间(默认 60s)

THREEGPP_MAX_ZIP_SIZE_MB

最大 ZIP 下载大小(默认 512)

THREEGPP_CACHE_TTL_HOURS

规范列表缓存 TTL(小时)(默认 24)

THREEGPP_LISTING_RETRY_MS

存档列表获取尝试之间的初始退避时间(毫秒)(默认 1000)

XDG_CACHE_HOME

缓存目录根目录,根据 XDG 基本目录规范

Available Tools

13 tools
compare_versionsA

Compare two versions of a 3GPP specification. Without section_number, returns a structural summary: sections added, removed, renumbered, retitled, and whose content changed. With section_number, returns a line-level unified diff of that section's text. Use list_versions first to see which versions exist; a version not yet cached is downloaded and converted on first use — when the tool says a download is in progress, call it again with the same arguments.

ParametersJSON Schema
NameRequiredDescriptionDefault
offsetNoStart line number (0-based, default: 0)
spec_idYesrequired,Specification ID (e.g. TS 23.501)
max_charsNoMaximum number of characters to return (can be combined with max_lines)
max_linesNoMaximum number of lines to return (default: 200)
new_versionNoNewer version to compare to. Defaults to the version in the database.
old_versionYesrequired,Older version to compare from (e.g. 17.9.0). Also accepts an archive token (h90) or a release selector (Rel-17). Use list_versions to see what exists.
context_linesNoUnchanged lines shown around each change in a section diff (default: 3)
section_numberNoCompare only this section's text as a unified diff (e.g. 5.15.2). Omit for a structural summary of the whole specification.
include_subsectionsNoWith section_number: include subsections in the diff (default: false)

TDQS

A4.8/5.0
Behavior4/5

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

No annotations are provided, so the description must carry the full burden. It transparently discloses that uncached versions trigger a download that may require a second call. It also explains the two output modes. While it doesn't cover all potential edge cases (e.g., error handling), the key behavioral trait is well documented.

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 description is concise: four sentences covering two distinct modes, prerequisites, and first-use behavior. No redundant words. Information is front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 9 parameters and no output schema, the description is remarkably complete. It explains the two output modes, how to pick versions, and the caching behavior. The only minor gap is that it doesn't describe the format of the structural summary, but that's a niche detail. Overall, it provides sufficient context for correct tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. However, the description adds significant context beyond the schema: it explains how 'section_number' changes the output type (summary vs. diff), and gives concrete examples like '5.15.2'. The 'old_version' description also clarifies it accepts archive tokens and release selectors, which is not in the schema. This adds substantial semantic value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description starts with 'Compare two versions of a 3GPP specification', clearly defining the verb and resource. It then distinguishes two modes: without section_number (structural summary) and with section_number (line-level diff). This differentiates it from sibling tools like 'get_section' or 'list_versions'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use each mode and directs to use 'list_versions first to see which versions exist'. It also explains behavior on first use (download/conversion) and instructs to retry if a download is in progress. This is clear guidance on usage vs. alternatives.

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

get_asn1A

Get ASN.1 definitions from the 3GPP specifications. The protocol specifications (RRC TS 38.331/36.331, NGAP TS 38.413, S1AP TS 36.413, XnAP, F1AP, LPP TS 37.355, ...) write their ASN.1 between -- ASN1START / -- ASN1STOP markers, and this tool extracts every top-level assignment from those blocks. With name, it returns the full text of that assignment — type, constant or information object — together with the specification and section that define it, so the answer can be cited. Use it when you know a type, IE or constant name and need its definition or constraints: the defining clause can be hundreds of kilobytes, which get_section can only page through. If you do not know which specification defines the name, omit spec_id — the name is resolved across every specification in the database. Matching ignores case and separators, so an IE table title like 'AMF UE NGAP ID' finds AMF-UE-NGAP-ID. With a spec_id and no name, it lists every assignment name grouped by the section that defines it. Pass version (with spec_id) to read a past version, which is downloaded and converted on first use; call list_versions first to see which versions exist.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNoASN.1 assignment name (e.g. AMF-UE-NGAP-ID). Matching ignores case and separators, so an IE title like 'AMF UE NGAP ID' also resolves. Required when spec_id is omitted; with a spec_id, omit it to list every assignment name in the specification.
offsetNoStart line number (0-based, default: 0)
spec_idNoSpecification ID (e.g. TS 38.413). Omit it to look the name up across every specification in the database — use that when you do not know which specification defines the type.
versionNoSpecification version to read (e.g. 18.6.0). Also accepts an archive token (i60) or a release selector (Rel-18). Defaults to the version in the database, and requires spec_id. Use list_versions to see what exists.
max_charsNoMaximum number of characters to return (can be combined with max_lines)
max_linesNoMaximum number of lines to return (default: 200)

TDQS

A4.5/5.0
Behavior4/5

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

The description explains the scope of extraction (only top-level assignments from blocks between ASN1START/ASN1STOP markers), behavior with and without the name parameter, case-insensitive and separator-ignoring matching, and handling of past versions (downloaded and converted on first use). Since no annotations are provided, the description carries full burden, which it largely fulfills, though it could be more explicit about potential limitations (e.g., if the tool is destructive or read-only).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is moderately concise for the amount of information conveyed, but it is somewhat lengthy (multiple sentences). It is front-loaded with the core purpose, then progressively adds details on usage modes, matching behavior, and version handling. Every sentence adds value, but some redundancy could be trimmed (e.g., explaining matching behavior both in the main description and in the parameter description).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, multiple usage modes, no output schema), the description provides comprehensive guidance on how the tool behaves in different scenarios (with/without name, with/without spec_id, with version). It also addresses how to cite results and how to discover versions. The only gap is the lack of information about the return format or output structure, but since there is no output schema, the description could be more explicit about what the tool returns (e.g., structured text, markdown, etc.).

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 100%, so each parameter is already documented in the schema. The description adds extra context beyond the schema, such as the effect of omitting spec_id to search across all specs, the matching behavior (case-insensitive, separator-ignoring), and the fact that name is required when spec_id is omitted. It also explains the version parameter behavior and recommends list_versions. However, since schema coverage is complete, the description exceeds the baseline of 3 but does not substantially add new meaning for every parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool extracts ASN.1 definitions from 3GPP specifications, specifying verb ('Get', 'extracts') and resource ('ASN.1 definitions from the 3GPP specifications'). It distinguishes it from siblings like get_section by explaining that the defining clause can be hundreds of kilobytes, which get_section can only page through.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool (e.g., 'Use it when you know a type, IE or constant name and need its definition or constraints') and when to use alternatives (e.g., 'the defining clause can be hundreds of kilobytes, which get_section can only page through'). It also provides guidance on omitting spec_id when the specification is unknown, and directs users to call list_versions first to see available versions.

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

get_imageA

Get an embedded image from a 3GPP specification. Returns the image as base64-encoded data that can be directly viewed by the LLM. Use list_images to discover available images for a spec. Pass version to read a past version's image; the images of an archived version are downloaded on first use, which takes up to a few minutes.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesrequired,Image filename (e.g. image1.png)
spec_idYesrequired,Specification ID (e.g. TS 23.501)
versionNoSpecification version to read (e.g. 18.6.0). Also accepts an archive token (i60) or a release selector (Rel-18). Defaults to the version in the database. Use list_versions to see what exists.

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries full burden and excels: it states the output is base64-encoded, mentions a latency caveat for archived versions ('up to a few minutes'), and explains the default version behavior. This fully discloses behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, front-loaded with the main action and output, and each sentence adds unique value. Could be slightly more concise by combining the first two sentences, but no superfluous content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and 3 parameters, the description covers tool purpose, input semantics, latency behavior, and next steps via sibling links. It does not mention what happens if parameters are invalid or if an image doesn't exist, but the overall completeness is high for the context.

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 coverage is 100% and already explains each parameter well. The description adds value by clarifying `version` accepts both version strings and archive tokens, and defaults to the database version, which goes beyond the schema description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs ('Get an embedded image') and resource ('3GPP specification'), and clearly distinguishes this tool from siblings like `list_images` by stating its function and output format.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly points to `list_images` for discovering available images and `list_versions` for version discovery, providing clear guidance on when to use alternative tools. However, it does not mention when not to use this tool (e.g., for non-image content).

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

get_openapiA

Get OpenAPI definition content for 5G service-based interface APIs (TS 29.xxx series). Use this tool to look up HTTP request/response details, API paths, parameters, request bodies, response schemas, and data type definitions. Use the path parameter to filter by API endpoint (e.g. /nf-instances) or the schema parameter to filter by data type (e.g. NFProfile). Use list_openapi first to discover available API names.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoFilter by API path (e.g. /nf-instances)
offsetNoStart line number for pagination (0-based, default: 0)
schemaNoFilter by schema name (e.g. NFProfile)
spec_idYesrequired,Specification ID (e.g. TS 29.510)
api_nameYesrequired,API name (e.g. Nnrf_NFManagement)
max_linesNoMaximum lines to return (default: 200)

TDQS

A4.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries full burden. It describes the tool as a 'get' and 'look up' operation, implying it is read-only and non-destructive. However, it does not explicitly state that it is safe, nor does it mention pagination behavior (offset, max_lines) or what happens in edge cases like no results. The description is adequate but lacks explicit behavioral details beyond the verb choice.

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 description is three sentences long, front-loading the purpose in the first sentence and then elaborating on capabilities and usage. Every sentence contributes meaningful information without redundancy or fluff. It is compact and immediately informative.

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?

With 6 parameters, no output schema, and no annotations, the description should provide a thorough understanding of the tool. It covers the main purpose, prerequisite workflow, and parameter usage, but it does not describe the output format (e.g., JSON/YAML), the meaning of offset and max_lines for pagination, or error handling. This leaves gaps in what a user can expect from the tool's response.

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?

The input schema has 100% description coverage, so the baseline is 3. The description adds value by providing concrete examples for the path parameter ('/nf-instances') and schema parameter ('NFProfile'), and by explaining the intended workflow for spec_id and api_name (use list_openapi to discover). This goes beyond the schema's structural descriptions, though it does not cover offset or max_lines.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get OpenAPI definition content for 5G service-based interface APIs (TS 29.xxx series).' It distinguishes from siblings like list_openapi by specifying that it retrieves actual definition content, not just listing available APIs. The mention of looking up HTTP request/response details, paths, and schemas further clarifies the specific resource and action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises to 'Use list_openapi first to discover available API names,' providing a clear prerequisite and directing to an alternative tool. It also gives specific usage guidance for parameters: 'Use the path parameter to filter by API endpoint (e.g. /nf-instances) or the schema parameter to filter by data type (e.g. NFProfile).' This tells the user exactly when and how to use the tool.

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

get_referencesA

Get cross-references between 3GPP specifications and RFCs.

Directions:

  • outgoing (default): Find all specs/RFCs referenced by a given section. Requires spec_id and section_number. Use include_subsections to also gather refs from child sections.

  • incoming: Find all sections that reference a given spec (and optionally a specific section). Requires spec_id. section_number is optional.

Returns structured reference data including target spec, section, title (if available in DB), and context snippet. Responses are capped at 500 references; a separate notice reports the total, and offset pages through the rest.

ParametersJSON Schema
NameRequiredDescriptionDefault
offsetNoNumber of references to skip, for paging past a truncated response (default: 0)
spec_idYesrequired,Specification ID (e.g. TS 23.501)
directionNooutgoing (default): references FROM this section to other specs. incoming: references TO this spec/section from other specs.
section_numberNoSection number (e.g. 5.1.2). Required for outgoing direction.
include_subsectionsNoInclude subsections when collecting outgoing references (default: false)

TDQS

A4.8/5.0
Behavior4/5

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

With no annotations, the description fully handles behavioral disclosure. It reveals the 500-reference cap, pagination via offset, and that responses include structured data plus a total-count notice. It does not mention rate limits or authorization, but those are not critical for a read-only lookup tool.

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 description is well-structured with clear sections for each direction, uses bullet-style formatting for readability, and every sentence adds essential guidance. No fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (5 parameters, two modes), the description covers all necessary details: parameter requirements per mode, default behaviors, response structure, pagination limit, and output format. Without an output schema, it still describes the return data adequately.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. However, the description adds semantic value beyond the schema by explaining parameter roles in context (e.g., section_number is required for outgoing, optional for incoming) and linking params to use cases (include_subsections only relevant for outgoing).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: finding cross-references between 3GPP specs and RFCs. It distinguishes two modes (outgoing and incoming) with specific resource targets (specs, RFCs, sections), and the sibling context shows no other tool overlaps with this function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly explains when to use outgoing vs incoming direction, lists required vs optional parameters for each, and notes a default behavior ('outgoing (default)'). It also mentions a cap of 500 references with pagination, guiding the agent on handling large result sets.

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

get_sectionA

Get the markdown content of a specific section in a 3GPP specification. This tool is for reading specification document text (architecture, procedures, requirements). For API details such as HTTP request/response bodies, paths, and data models of 5G service-based interfaces (TS 29.xxx series), use get_openapi instead. Specify the section number with the section_number parameter (e.g. 5.1.2). Figures appear as ![...](image://NAME) links; fetch one with get_image and that NAME. Formulas are LaTeX: a standalone equation is a ```latex code block (its equation number kept as \tag{7.3-1}), and a formula inside a sentence or a table cell is delimited with $...$, or $$...$$ when the source sets it as a display equation. Pass version to read a past version, which is downloaded and converted on first use; call list_versions first to see which versions exist. Large sections are paginated (default 200 lines). Use offset and max_lines to navigate.

ParametersJSON Schema
NameRequiredDescriptionDefault
offsetNoStart line number (0-based, default: 0)
spec_idYesrequired,Specification ID (e.g. TS 23.501)
versionNoSpecification version to read (e.g. 18.6.0). Also accepts an archive token (i60) or a release selector (Rel-18). Defaults to the version in the database. Use list_versions to see what exists.
max_charsNoMaximum number of characters to return (can be combined with max_lines)
max_linesNoMaximum number of lines to return (default: 200)
section_numberYesrequired,Section number to retrieve (e.g. 5.1.2)
include_subsectionsNoInclude all subsections (default: false)

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries full responsibility. It transparently explains how figures appear as `![...](image://NAME)` links and how to fetch them with `get_image`, details LaTeX formula formatting (standalone vs. inline), describes version handling (first-use download/conversion), and reveals pagination behavior (default 200 lines). It does not cover error cases or what happens for invalid sections, but the behavioral disclosure is rich and helpful.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single paragraph of ~150 words, dense but well-organized. It front-loads the core purpose and sibling distinction, then covers output format, version handling, and pagination. While it could benefit from bullet points or more whitespace for scanning, every sentence adds value and there is no repetition. It is concise for the amount of information conveyed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 7 parameters, 2 required, no output schema, and no annotations, the description covers purpose, usage alternatives, output format (figures, formulas), version behavior, and pagination. It does not describe error handling (e.g., invalid section/spec) or the exact structure of the return value, but it provides enough context for an agent to use the tool effectively in most scenarios.

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 coverage is 100% (all 7 parameters have descriptions), so baseline is 3. The description adds extra meaning beyond the schema: e.g., for `section_number` it gives an example ('5.1.2'), for `version` it explains the first-use download behavior, and for `offset`/`max_lines` it contextualizes pagination. This additional context improves parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get the markdown content of a specific section in a 3GPP specification.' It also specifies the type of content (architecture, procedures, requirements) and explicitly distinguishes from the sibling tool `get_openapi` for API details. The verb 'get' and resource 'section' are specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides direct guidance on when to use this tool vs. `get_openapi` for API details. It advises to call `list_versions` first to check available versions and explains pagination with offset and max_lines. This explicit context helps the agent choose the correct tool and navigate parameters effectively.

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

get_tocA

Get the table of contents (section structure) of a 3GPP specification. Pass version to see the structure of a past version, which is downloaded and converted on first use; section numbers often move between releases, so check the table of contents before reading a section of an older version.

ParametersJSON Schema
NameRequiredDescriptionDefault
spec_idYesrequired,Specification ID (e.g. TS 23.501)
versionNoSpecification version to read (e.g. 18.6.0). Also accepts an archive token (i60) or a release selector (Rel-18). Defaults to the version in the database. Use list_versions to see what exists.

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries full responsibility for behavioral disclosure. It reveals that passing a 'version' triggers a download and conversion on first use, and notes that section numbers often change between releases. These are important behavioral traits. However, it does not state whether the operation is read-only or whether it has any side effects beyond the initial conversion (e.g., caching behavior). The transparency is good but not exhaustive.

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 description is two sentences long, with no wasted words. The first sentence defines the core purpose, and the second sentence adds targeted usage guidance and a behavioral note. Every sentence serves a clear function, and the structure is front-loaded with the most important information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 parameters, no output schema), the description is nearly complete. It explains what the tool does, the version behavior, and a typical use case. It could be improved by briefly describing the return format (e.g., list of section numbers and titles), but the phrase 'section structure' provides enough context for an agent to infer the output. The absence of an output schema increases the value of a description, and this one is sufficient but not exhaustive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The tool description adds minimal parameter-specific meaning beyond what the schema already provides. It mentions the 'version' parameter's purpose ('see the structure of a past version') and the conversion note, but the schema already describes the parameter's accepted formats and defaults. The description does not enrich the semantics of 'spec_id' beyond what is obvious.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('table of contents (section structure) of a 3GPP specification'). It distinguishes the purpose from siblings like 'get_section' (which reads a specific section) and 'list_versions' (which lists versions). The phrase 'check the table of contents before reading a section' further clarifies its role relative to sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context: use this tool to inspect the section structure, especially before reading an older version. It warns that section numbers move between releases, implying when to use this tool over others. While it does not explicitly name alternative tools (e.g., 'get_section'), the guidance is direct and actionable. The version parameter description (in schema) adds additional hints like using 'list_versions', which compensates slightly.

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

list_imagesA

List embedded images in a 3GPP specification. Returns image names, MIME types, and whether they are viewable by LLMs. Use get_image to retrieve a specific image. Pass version to list a past version's images; the images of an archived version are downloaded on first use, which takes up to a few minutes.

ParametersJSON Schema
NameRequiredDescriptionDefault
spec_idYesrequired,Specification ID (e.g. TS 23.501)
versionNoSpecification version to read (e.g. 18.6.0). Also accepts an archive token (i60) or a release selector (Rel-18). Defaults to the version in the database. Use list_versions to see what exists.

TDQS

A3.9/5.0
Behavior4/5

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

The description discloses important behavioral traits such as the latency for archived versions ('takes up to a few minutes') and the defaulting behavior of the version parameter. No annotations are provided, so the description carries the full burden and does so effectively, though it could mention if the list is paginated or has size limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (three sentences) and well-structured, with the main action upfront, followed by sibling tool reference, and version handling details. Every sentence adds value with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has only 2 parameters with full schema descriptions and no output schema, the description covers usage context well. It explains the version parameter's behavior and an edge case (archived version latency). A minor gap is not stating whether the returned list is complete or paginated, but overall it is sufficient for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage with descriptions for both parameters, so the baseline is 3. The description adds useful context for the 'version' parameter (e.g., about archive tokens and release selectors) beyond the schema's brief note, but does not add new info for 'spec_id'.

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 description clearly states the tool's action ('List embedded images in a 3GPP specification') and specifies what it returns ('image names, MIME types, and whether they are viewable by LLMs'). It distinguishes itself from sibling tools like 'get_image' by noting that 'list_images' lists images while 'get_image' retrieves a specific one.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear guidance on when to use this tool vs alternatives: 'Use get_image to retrieve a specific image.' It also explains how to handle versions, including past archived versions that may have a delay. However, it does not explicitly mention when not to use it or other exclusions beyond the sibling differentiation.

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

list_openapiA

List available OpenAPI definitions from 3GPP specifications (TS 29.xxx series). Use this to discover API names before calling get_openapi. Optionally filter by spec ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
spec_idNoFilter by specification ID (e.g. TS 29.510)

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the full burden. It describes the basic action (listing definitions) and optional filtering, but does not disclose any behavioral traits such as return format, pagination, authentication requirements, or performance implications. For a simple read-only list tool, this is minimally adequate but lacks depth.

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 description consists of two concise sentences. The first sentence defines the action and resource; the second provides usage context and an optional filter. Every phrase earns its place, with no redundancy or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity (one optional parameter, no output schema), the description is mostly complete. It links usage to get_openapi and mentions filtering. However, it does not explain the return data shape (e.g., list of API names) or differentiate from other sibling tools like list_specs or search_openapi. Slight room for improvement.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (the single parameter spec_id has a schema description). The description adds 'Optionally filter by spec ID,' which mirrors the schema. Since the schema already documents the parameter fully, the description adds minimal extra meaning, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List available OpenAPI definitions from 3GPP specifications (TS 29.xxx series).' It uses a specific verb ('list') and resource ('OpenAPI definitions'), and distinguishes from siblings like get_openapi (which gets a specific definition) and list_specs (which lists specs). The context 'discover API names before calling get_openapi' further clarifies its role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use the tool: 'Use this to discover API names before calling get_openapi.' It also mentions optional filtering by spec ID. While it does not explicitly state when not to use it or list alternatives (e.g., list_specs), the guidance is clear and contextually useful for an AI agent.

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

list_specsA

List available 3GPP specifications. Optionally filter by series number and/or by an ID prefix (query). Results are paginated (default 20 per page); use limit and offset to navigate.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return (default: 20)
queryNoFilter specs whose ID starts with this text (e.g. '38.21' matches 38.211, 38.212, 38.213)
offsetNoNumber of results to skip for pagination (default: 0)
seriesNoFilter by series number (e.g. 23 for TS 23.xxx)

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries full burden for behavioral disclosure. It adds pagination defaults and filter semantics beyond the schema, but does not mention authentication needs, output format, error behavior, or rate limits—leaving significant gaps for a tool with no annotations.

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?

Two efficient sentences: first states purpose, second covers filtering and pagination. No wordiness, front-loaded key 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?

For a listing tool with 4 optional parameters and no output schema, the description explains filters and pagination adequately but omits what the response looks like (e.g., fields returned, ordering). Without output schema, the description should hint at the return structure to be fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds context that filters can be combined and how pagination works (limit/offset navigation), but most parameter meaning is already clear from schema descriptions. The added value is modest.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb "List" and the resource "available 3GPP specifications." It mentions optional filtering by series and ID prefix, plus pagination—fully distinguishing this from sibling tools that list images, OpenAPI specs, or versions.

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?

The description explains optional filtering and pagination, so the agent knows how to use it. However, it does not provide any guidance on when NOT to use this tool vs. alternatives (e.g., search, get_section), missing the opportunity to prevent misuse.

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

list_versionsA

List the versions of a 3GPP specification, newest first.

Each entry reports where the version can be read from:

  • database: in the prebuilt database, covered by search, images and cross-references

  • cached: fetched on demand earlier, available immediately

  • archive: exists upstream; reading it downloads and converts it first, which takes up to a few minutes for a large specification

Pass a version from this list to get_section or get_toc to read a past version.

ParametersJSON Schema
NameRequiredDescriptionDefault
spec_idYesrequired,Specification ID (e.g. TS 23.501)

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description effectively discloses behavioral traits: newest-first order, the meaning of three statuses (database, cached, archive), and time cost for archive versions. No contradictions exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear purpose sentence, bulleted details, and a usage recommendation. It is concise with no redundant information, though slightly more compacting is possible.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having no output schema, the description fully explains the output (list of versions with status meanings) and connects to sibling tools, making the tool's usage context complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the description adds no meaning beyond the schema's own parameter description ('Specification ID (e.g. TS 23.501)'). Baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'List the versions of a 3GPP specification, newest first' – a specific verb and resource that clearly distinguishes from sibling tools like list_specs (list specifications) and list_images (list images).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit context for use: 'Pass a version from this list to get_section or get_toc to read a past version.' This guides when to use the tool, but does not explicitly exclude scenarios where it should not be used.

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

search_openapiA

Full-text search across the OpenAPI definitions of the 5G service-based interface APIs (TS 29.xxx series), using SQLite FTS5 syntax.

Use this when you need an API detail but do not know which API document holds it — searching for a data type (NFProfile, SmContextCreateData) or an endpoint (/nf-instances, subscriptions) finds it without guessing an api_name first. When you already know the document, get_openapi reads it directly.

This is a separate index from the search tool: search covers specification clause text and never returns OpenAPI content, and this tool covers OpenAPI content only.

Results:

  • One hit is one definition, not one document: either a schema (a data type from components.schemas) or an operation (one HTTP method of one path, named like "PUT /nf-instances/{nfInstanceID}").

  • A query that is a single bare term ranks a definition of exactly that name first, so searching NFProfile returns the NFProfile schema itself ahead of the schemas that merely reference it.

  • Each hit reports spec_id, api_name, kind, name and a snippet. Pass those to get_openapi (with its schema or path parameter) to read the full definition.

  • A schema's text carries one level of $ref expansion, so referenced field names are searchable, but a type two hops away is not. Follow it up with get_openapi.

  • Set include_body to get the matched definition's full text inline. It is much larger than a snippet.

Query syntax:

  • AND/OR/NOT: NFProfile AND heartbeat

  • Phrase: "nf instances"

  • Prefix: subscri*

  • Column filter: name:NFProfile or body:nfInstanceId or api_name:Nnrf_NFManagement

  • Hyphenated, dotted or underscored terms (e.g. nf-instances, 29.510, Nnrf_NFManagement) are auto-quoted to avoid FTS5 syntax errors.

Tokenization:

  • Unlike search, this index applies no stemming: identifiers are matched as written, and inflected English forms do not fold together.

  • '-', '.' and '_' split tokens, so Nnrf_NFManagement is indexed as "nnrf" and "nfmanagement" and /nf-instances as "nf" and "instances" — a partial name matches, but camelCase is not split (supportedFeatures is one token).

Pagination:

  • Results come as {results, total_count, limit, offset}; total_count is the full match count.

  • Use limit (default 10, max 200) and offset to page through matches beyond the first page.

ParametersJSON Schema
NameRequiredDescriptionDefault
kindNoLimit the search to one kind of definition: "schema" for data types or "operation" for endpoints. Both are searched when omitted.
limitNoMaximum number of results per page (default: 10, max: 200)
queryYesrequired,FTS5 query string. Hyphenated or dotted terms like nf-instances and 29.510 are auto-quoted. Use AND/OR/NOT operators and double-quoted phrases for exact matches.
offsetNoNumber of results to skip for pagination (default: 0). Combine with total_count in the response to page through all matches.
api_nameNoLimit the search to a single API document (e.g. Nnrf_NFManagement). Use list_openapi to see the available names.
spec_idsNoLimit the search to one or more specifications (e.g. ["TS 29.510", "TS 29.518"]).
include_bodyNoReturn the full text of each matching definition instead of a snippet (default: false). Costs many more tokens; prefer the default and follow up with get_openapi.

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries full burden. It comprehensively discloses behavior: result granularity (one definition per hit), ranking (exact name matches first), $ref expansion depth, include_body effect, query syntax (including auto-quoting for special characters), tokenization rules (no stemming, split on hyphens/dots/underscores, no camelCase split), and pagination details. No contradictory or missing behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections (Results, Query syntax, Tokenization, Pagination) and front-loaded with the main purpose. While it is long, every sentence provides necessary information given the tool's complexity. It could be slightly more concise, but it earns its length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (7 parameters, no output schema, multiple sibling tools), the description is complete. It explains the result structure, how to follow up with get_openapi, the difference from search, tokenization idiosyncrasies, and pagination. It addresses all likely agent questions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, but the description adds substantial value beyond the schema. It explains the query syntax in detail (operators, phrases, column filters, auto-quoting), the purpose and cost of include_body, how pagination uses limit/offset with total_count, and the meaning of kind (schema vs operation). The description makes the parameters much more usable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool performs full-text search on OpenAPI definitions of 5G APIs, using SQLite FTS5 syntax. It distinguishes from sibling tools by explicitly contrasting with 'search' (covers clause text, not OpenAPI) and 'get_openapi' (for when the document is already known).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance: 'Use this when you need an API detail but do not know which API document holds it.' It also gives a clear alternative: 'When you already know the document, get_openapi reads it directly.' Additionally, it contrasts with the sibling 'search' tool, specifying that search covers different content.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 13 tool updatesv0.1.0
    • First observedcompare_versions
    • First observedget_asn1
    • First observedget_image
    • First observedget_openapi
    • First observedget_references
    • First observedget_section
    • First observedget_toc
    • First observedlist_images
    • First observedlist_openapi
    • First observedlist_specs
    • First observedlist_versions
    • First observedsearch
    • First observedsearch_openapi

TDQS

A4.4/5.0

Scored across 13 tools

Disambiguation5/5

Every tool targets a distinct content type or operation: listing vs. retrieval, specification text vs. ASN.1 vs. OpenAPI vs. images vs. cross-references. The two search tools explicitly separate specification clauses from OpenAPI definitions, eliminating ambiguity.

Naming Consistency5/5

All tools use a consistent lowercase snake_case convention with a verb-noun pattern (list_*, get_*, search_*, compare_versions). No mixed conventions or irregular names, making it easy to infer functionality from the name.

Tool Count5/5

13 tools is a well-scoped set for a specification retrieval system. Each tool adds a distinct capability—discovery, reading, searching, comparison, images, ASN.1, OpenAPI, references—without redundancy or bloat.

Completeness5/5

The tool surface covers the full lifecycle of read-only specification access: discovery (list_specs, list_versions, list_openapi, list_images), retrieval (get_section, get_image, get_asn1, get_openapi), searching (search, search_openapi), comparison (compare_versions), and cross-references (get_references). No obvious gaps for the stated domain.

Maintenance

ActivityActive
ResponsivenessResponsive

Related MCP Connectors

  • Public MCP server for the LLM Search Engine

  • Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.

  • Hosted MCP server: convert PDFs to clean, LLM-ready Markdown with tables, formulas and OCR.

  • 3GPP Scout connects Cursor, Claude, Codex and other MCP clients to a hosted, continuously updated 3GPP search service. Search TS/TR specifications across Rel-15 through Rel-20, retrieve cited clauses, and search text, diagrams and figures. Explore recent RAN1, RAN2, RAN3, RAN4 and SA2 TDocs, company proposals and extracted meeting decisions, with source links. Connect using Streamable HTTP at https://api.3gppscout.com/mcp/ and sign in with OAuth 2.1. No local index or API key in the MCP configuration is required. Explorer includes 150 API/MCP requests per month; Founding Engineer includes 1,000 for $8/month. Hosted Scout chat is billed separately. 3GPP Scout is an independent product and is not affiliated with, endorsed or sponsored by 3GPP, ETSI or any 3GPP Organizational Partner. 3GPP™ is a trade mark of ETSI registered for the benefit of its Members and of the 3GPP Organizational Partners. Excerpts are quoted for reference and the official documents govern. Copyright, correction or removal requests: contact@3gppscout.com.

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    Enables AI assistants to access and search 3GPP telecommunications specifications through direct integration with the TSpec-LLM dataset. Provides real-time specification content, implementation requirements, and multi-spec comparisons for 3GPP standards development.
    4
    44 npm
    29
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Generic MCP server that exposes Markdown documentation to LLMs, enabling them to search and answer questions about any software documentation.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that indexes documents and serves relevant context to LLMs via Retrieval Augmented Generation (RAG).
    28 npm
    36
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    A local-first MCP server that ingests PDFs, extracts structure, and provides semantic search and sequential navigation tools for AI clients to query and learn from documents.
    10
    MIT