io.github.FreyaBit/shanghai-library-open-data-mcp
This server provides 12 MCP tools that bridge the Shanghai Library Open Data platform and the Souyun poetry database, enabling AI assistants to query historical Chinese cultural data, genealogy, poetry, and more.
Shanghai Library Data (requires API key):
slc_era: Convert between Chinese historical dynasty/reign eras and Gregorian calendar years.slc_jiapu: Search genealogy records by family name or title.slc_building: Search historical buildings on Wukang Road by keyword.slc_red_event: Search red tourism and historical revolutionary events by date or keyword.slc_api: A generic dispatcher to call any of the 97+ official web APIs (ancient books, films, maps, calligraphy, etc.).slc_raw: Direct GET requests to any data1.library.sh.cn path.
Discovery & Info (no API key needed):
slc_endpoints: List all 99 available API endpoints with IDs, families, paths, and parameters; filterable by family.slc_datasets: View dataset overviews and third-party institutions.slc_sparql: Access SPARQL query capabilities.
Souyun Poetry Database (no API key needed, 1.99M poems):
souyun_poem: Search poems by author, title, verse, dynasty, genre, or rhyme.souyun_rhyme: Look up rhyme categories, allusions, and poetry examples for characters (useful for lyric writing).souyun_couplet: Find antithetical words for couplet composition.
The server integrates with AI tools like WorkBuddy, Cursor, and Claude Desktop via stdio or Streamable HTTP.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@io.github.FreyaBit/shanghai-library-open-data-mcp帮我查一下武康路有哪些历史建筑"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
上海图书馆开放数据 MCP
把上海图书馆开放数据平台的 99 个 webapi 接口 + 搜韵诗词库(199 万首,免 token)封装成 12 个 MCP 工具,可接入 WorkBuddy、Cursor、Claude Desktop 等任意 MCP 客户端。
这是啥? 一个把「上海图书馆开放数据」接进 AI 助手的桥。装好之后,你直接在 AI 工具里说"查武康路的历史建筑""找首写月亮的诗",AI 就会自动去上海图书馆的数据里查,再把结果讲给你听——不用懂接口、不用写代码。
你要准备什么? 两样:① 去上海图书馆开放数据平台免费注册,拿一把"钥匙"(APIKey);② 按下面的「快速开始」把项目接进你常用的 AI 编辑器(Cursor、Claude Desktop、VS Code、WorkBuddy 等都能用)。
为什么安全? 项目代码里不含任何钥匙,钥匙只在你自己的电脑 / 配置里,不会被别人看到。
数据源与致谢
上海图书馆开放数据平台(官方):https://opendata.library.sh.cn/opendata/ 衷心感谢上海图书馆官方开放数据平台提供权威、丰富且持续维护的历史文献与文脉数据接口。本项目的全部核心数据能力(99 个 webapi)均建立在上海图书馆开放数据之上,若无官方的开放与授权,本项目无从实现。
搜韵诗词:https://api.sou-yun.cn/open (199 万首诗词,免 token)
本仓库接口版权归各数据方所有,使用请遵守各平台开放数据的使用条款;调用方须使用自己在平台注册的 APIKey,本仓库不内置、不收集任何密钥。
本项目已发布至 PyPI、MCP 官方 Registry(
io.github.FreyaBit/shanghai-library-open-data-mcp)、Smithery、ModelScope 与 GitHub,便于各 MCP 客户端一键接入。
Related MCP server: Multi-MCPs
特性
🧩 12 个 MCP 工具:覆盖家谱 / 古籍 / 碑帖 / 武康路 / 书目 / 地名志 / 红色事件 / 纪年表 / 电影 / 舆图 / 手迹 / 人名库 / 戏单等 99 个官方接口 + 搜韵诗词
🔑 密钥由使用者提供:通过环境变量
SLC_API_KEY或工具参数key传入,代码不内置任何密钥🐍 零第三方依赖:仅用 Python 标准库(urllib + json),无需
pip install🎵 AIGC 歌词素材:
souyun_poem免 token 检索 199 万首诗词(按作者/标题/诗句/朝代/体裁/韵部),souyun_rhyme/souyun_couplet提供韵典和对仗词汇📚 RAG 骨架:
rag_kb.py纯标准库 TF-IDF 知识库,可离线灌入官方 ZIP 数据
工具总览
工具 | 说明 | 需要 Key |
| 列出全部 99 个接口(id/家族/路径/参数),发现能力 | ❌ |
| 通用分发器:调用任意 webapi 接口 | ✅ |
| 中国历史纪年表:朝代/年号 ↔ 公元年 | ✅ |
| 家谱谱目检索 | ✅ |
| 武康路历史建筑检索 | ✅ |
| 红色旅游/历史事件检索 | ✅ |
| 任意 data1 路径 GET 兜底调用 | ✅ |
| 数据集总览 / SPARQL 说明 | ❌ |
| 搜韵诗词检索(199 万首,免 token) | ❌ |
| 韵典:查字所属韵部、典故、诗例 | ❌ |
| 对仗词汇 | ❌ |
接口家族:近代城市文化(20)、古籍循证(15)、国漫革命文献(7)、武康路历史(7)、纪年表关联数据(5)、韬奋纪念馆(4)、书目数据(4)、家谱(4)、地名纪年(4)、竞赛PDF文献(3)、知识图谱人物(2)、文化总库机构(2)、舆图(2)、手迹(2)、红色旅游事件(2)、地名志(2)、纪年(2)、人名规范库(1)、机构名录(1)、戏单(2)、其他(8)。
快速开始
本地 stdio 接入
# 1. 克隆仓库
git clone https://github.com/FreyaBit/OpenSH-mcp.git
cd OpenSH-mcp
# 2. 设置你的 APIKey(在上海图书馆开放数据平台获取)
export SLC_API_KEY='你的上图书APIKey' # macOS/Linux
# $env:SLC_API_KEY='你的上图书APIKey' # Windows PowerShell
# 3. 运行端到端自测
python3 tests/test_stdio.py在你的 MCP 客户端里配置 stdio 服务:
{
"mcpServers": {
"上海图书馆开放数据": {
"command": "python3",
"args": ["/绝对路径/slc_mcp_server.py"],
"env": { "SLC_API_KEY": "你的上图书APIKey" }
}
}
}通过 PyPI / uvx 安装(推荐,跨客户端通用)
发布到 PyPI 后,任意支持 MCP 的客户端都能用一条命令拉起,无需克隆仓库:
uvx shanghai-library-open-data-mcp # 本地 stdio(默认)
uvx shanghai-library-open-data-mcp --transport http --port 8080 # Streamable HTTP 远程(进阶可选)客户端配置只需:command: uvx, args: ["shanghai-library-open-data-mcp"]。
Streamable HTTP 传输(进阶,可选)
除 stdio 外,本服务原生支持 Streamable HTTP(slc_mcp_http.py,纯标准库实现):
POST /mcp处理 JSON-RPC(initialize 时签发Mcp-Session-Id,通知类返回 202)GET /mcp提供 SSE 流已开启 CORS,便于网页端 / 远程网络调用
适合网页版 AI、手机端,或多人共用同一服务;需自行把服务跑在可访问的地址上。个人在编辑器本地使用,stdio 已足够,无需此模式。
客户端配置示例
三种客户端本质都是同一段 mcpServers JSON,区别只在配置文件路径。下面的示例用 uvx 拉起(免克隆仓库);想用本地脚本,把 command/args 换成 ["python3","/绝对路径/slc_mcp_server.py"] 即可。
WorkBuddy(本机已配置过一份)
配置文件:~/.workbuddy/mcp.json。本机已存在一份指向本地脚本 + Key 的配置,只需在连接器管理界面对「上海图书馆开放数据」点击 信任 即可在本会话启用;也可替换成下面的 uvx 写法。
{
"mcpServers": {
"上海图书馆开放数据": {
"command": "uvx",
"args": ["shanghai-library-open-data-mcp"],
"env": { "SLC_API_KEY": "你的上图书APIKey" }
}
}
}Cursor
配置文件:项目根目录 .cursor/mcp.json 或全局 ~/.cursor/mcp.json(同一段 JSON)。
Claude Desktop / Claude Code
Claude Desktop:把上面的
mcpServers合并进%APPDATA%\Claude\claude_desktop_config.json(Windows)或~/Library/Application Support/Claude/claude_desktop_config.json(macOS)。Claude Code 命令行:
claude mcp add 上海图书馆开放数据 -- uvx shanghai-library-open-data-mcp
说明:12 个工具里
souyun_poem/souyun_rhyme/souyun_couplet/slc_endpoints免 Key 开箱即用,其余 8 个需要SLC_API_KEY。已发布到 PyPI、MCP 官方 Registry(io.github.FreyaBit/shanghai-library-open-data-mcp)、Smithery、ModelScope、GitHub,均可一键拉起。
APIKey 说明
上海图书馆开放数据平台要求每个调用者使用自己的 APIKey(在平台注册后获取)。
本仓库不包含任何 Key,也不记录、不收集你的 Key。
Key 读取优先级:工具参数
key> 环境变量SLC_API_KEY。调用需要 Key 的工具时,把 Key 放在工具参数里:
{ "endpoint": "building_list", "params": { "freetext": "武康路" }, "key": "你的上图书APIKey" }免 Key 工具(
souyun_poem/souyun_rhyme/souyun_couplet/slc_endpoints)开箱即用。⚠️ 请勿把你的 Key 配置到公开服务的环境变量里(等于公开给所有调用者)。
目录结构
OpenSH-mcp/
├── README.md # 本文件
├── pyproject.toml # PyPI 打包配置(uvx 入口)
├── slc_mcp_server.py # MCP 服务主程序(stdio,纯标准库)
├── slc_mcp_http.py # Streamable HTTP 传输层(纯标准库,进阶可选)
├── slc_endpoints.py # 99 个 webapi 接口注册表(自动生成)
├── gen_endpoints.py # 接口注册表生成器(从官方 API 文档解析)
├── souyun_poem.py # 搜韵诗词/韵典/对仗采集(免 token)
├── rag_kb.py # RAG 知识库骨架(纯标准库 TF-IDF)
├── mcp.json.template # MCP 客户端配置模板(不含 Key)
└── tests/ # 测试(从环境变量读 Key,缺失会提示)
├── test_stdio.py # stdio 端到端(协议 + 真实调用)
├── test_live.py # handler 级实测(GET/POST/搜韵)
└── test_mcp.py # 协议冒烟测试Available Tools
12 toolsslc_apiA
通用分发器:调用 api_2025 注册的全部 webapi 接口(家谱/古籍/盛档/人名库/碑帖/电影/期刊/舆图/书目/地名志/武康路 等 97 个)。endpoint 填接口 id;params 填查询参数(JSON);path_args 填路径占位{0}{1};key 填自己的上海图书馆开放数据 APIKey(必填)。先用 slc_endpoints 查 id。
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | 上海图书馆开放数据 APIKey(必填) | |
| params | No | 查询参数,如 freetext=江南, pageNum=1 | |
| endpoint | Yes | 接口 id 或 家族名(取该家族首个接口) | |
| path_args | No | 路径占位 {0}{1} 的取值列表 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the full burden of behavioral disclosure. It mentions the required API key (authentication), path_args usage, and endpoint ID, but fails to indicate whether operations are read-only, how errors are handled, or what the response format looks like. Given that this tool can invoke 97 different APIs, these omitted traits are significant.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and well-structured with semicolons, placing the purpose first, then parameter guidance, then a usage hint. Every sentence adds value, though the long list of domains could be trimmed without losing essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (universal dispatcher for 97 APIs) and absence of output schema and annotations, the description covers purpose, parameter roles, authentication, and a discovery workflow. Missing details about return format and error behavior are notable, but the universal nature makes them less critical; overall it is fairly complete for a dispatcher.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description repeats parameter roles but introduces a contradiction: it states key is required (必填), while the input schema lists only endpoint as required. This conflicting information reduces the usefulness of the description and misleads the agent, so the score is lowered to 2.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies it as a universal dispatcher calling all webapi interfaces registered in api_2025, listing specific content domains and the count (97). This verb-resource pairing distinguishes it from sibling tools, and the instruction to use slc_endpoints for ID lookup reinforces its role as the generic access point.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly instructs users to first use slc_endpoints to find the interface ID, which serves as a prerequisite and names an alternative tool. It does not explicitly state when to avoid this tool in favor of specialized siblings, but the context makes it clear this is the generic dispatcher for all registered APIs.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
slc_buildingC
武康路历史建筑检索(已验证可用)
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | 上海图书馆开放数据 APIKey(必填) | |
| keyword | Yes | 路名/建筑关键词,如 武康路 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description was expected to disclose behavioral traits. It only states that the tool is 'verified available' and describes a search, but does not mention authentication requirements (despite the API key parameter in the schema), data scope, or return behavior. This is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely short, consisting of a single phrase with an annotation-like note. While it is concise, it is under-specified and does not front-load critical information such as the tool's general purpose or usage context. It reads more like a placeholder than a well-structured description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has two parameters, no annotations, and no output schema, the description is incomplete. It fails to mention the need for an API key, the nature of the response, or any constraints. The schema documents parameters but the description does not provide the contextual glue needed for an agent to select and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already describes both parameters completely (key for API key, keyword for road/building name), achieving 100% coverage. The description adds no extra semantic value, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description says '武康路历史建筑检索' (Wukang Road historical building search), which indicates a search over historical buildings but incorrectly narrows the scope to Wukang Road, whereas the schema's keyword parameter implies a broader road/building keyword search. It distinguishes from sibling tools by focusing on buildings, but the specificity is misleading.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No usage guidance is provided. There is no mention of when to use this tool versus siblings like slc_era or slc_jiapu, nor any exclusions or prerequisites. The 'verified available' note is a status indicator, not a usage guideline.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
slc_datasetsB
数据集与第三方机构总览
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the subject matter without describing output format, read-only nature, or any side effects. The term 'overview' implies a safe, read-only operation, but no specifics are given.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise phrase that immediately conveys the tool's purpose. It is front-loaded with '总览' and contains no unnecessary words or redundancy. This is an optimally compact structure.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema and annotations, the description should explain what the tool returns. It only identifies the subject (datasets and third-party organizations) but does not specify the output structure, format, or level of detail. This leaves the agent uncertain about the result of invoking the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and an empty schema, so there is nothing to explain. The baseline for zero-parameter tools is 4, and the description adds no parameter information because none is required. The schema coverage is trivially 100%, so no gaps exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description '数据集与第三方机构总览' clearly indicates an overview of datasets and third-party organizations. It implies a listing or summary function, distinguishing it from specific lookup tools like slc_endpoints or souyun_rhyme. A more explicit verb like 'list' would improve clarity, but the current phrasing is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool versus alternatives. It does not mention any exclusions or sibling tool relationships. The intended usage is only implied by the term '总览' (overview), suggesting it serves as a starting point for exploring available data.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
slc_endpointsA
列出全部可用 webapi 接口(id/家族/路径/参数),可按 family 过滤。用于发现能力。
| Name | Required | Description | Default |
|---|---|---|---|
| family | No | 可选:按家族过滤,如 古籍循证 / 武康路历史 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. The description discloses the output fields (id/家族/路径/参数) and the optional filter, but it does not explicitly mention that the operation is read-only or non-destructive. Since 'list' naturally implies a read operation, it is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that front-loads the main purpose ('列出全部可用 webapi 接口'), then specifies the fields and filter capability, and ends with the intended use. Every phrase earns its place without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one optional parameter, no output schema, no annotations), the description is complete: it states what is returned and the filter option. It lacks some details like return format or pagination, but for a discoverability tool, this is adequate. The sibling context reinforces that this is a meta-tool for finding other APIs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with the one parameter 'family' already described in detail, including examples. The description only says '可按 family 过滤' (can filter by family), adding no new semantic information beyond the schema. Thus, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: '列出全部可用 webapi 接口' (list all available web API endpoints), and specifies the resource (webapi interfaces) and the action (list). It also distinguishes itself from siblings by indicating it provides discovery of endpoints, while siblings are specific data tools like souyun_rhyme and slc_datasets.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description includes '用于发现能力' (for discovering capabilities), which implies when to use this tool: when the agent needs to know what APIs are available. It also mentions filtering by family, but it does not explicitly state alternatives or scenarios where this tool should not be used. This is sufficient for a discovery tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
slc_eraA
中国历史纪年表:输入朝代/年号返回公元年范围,或反之。例:明 -> 1368~1644。请传入 key(自己的上海图书馆开放数据 APIKey)。
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | 上海图书馆开放数据 APIKey(必填) | |
| term | Yes | 朝代/年号/公元年,如 明、洪武、1369 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the responsibility. It discloses the need for an API key, but does not describe error handling, rate limits, or the exact output format beyond the example. This is 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with an illustrative example. It is front-loaded with the tool name and functionality, with no unnecessary filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
This is a simple lookup tool, and the description explains the core conversion direction and provides an example. However, there is no output schema and no mention of edge cases, reverse conversion specifics, or error conditions, leaving some gaps for a fully complete understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already documents both parameters with clear descriptions (100% coverage), so the baseline is 3. However, the description states 'key' is required ('必填') while the schema's required array includes only 'term', creating a direct contradiction that could mislead the agent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool converts Chinese historical dynasty/reign era names to AD year ranges and vice versa, using the example '明 -> 1368~1644'. This specific verb+resource pairing distinguishes it from sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides clear usage context: input a dynasty/reign term or an AD year, and it returns the corresponding range or era. The example illustrates the expected input/output. However, it does not explicitly mention alternatives or when not to use this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
slc_jiapuB
家谱谱目检索(data1)。可按谱名/姓氏检索
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | 上海图书馆开放数据 APIKey(必填) | |
| title | No | ||
| familyname | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full responsibility for disclosing behavioral traits, but it only states the search action. It does not mention read-only nature, authentication requirements (the API key is only in the schema), output format, pagination, error handling, or any side effects. This is a significant gap for an agent assessing safety and expected behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no redundant words. It conveys the core purpose and the two search fields efficiently. Every word contributes value, making it appropriately concise for a simple search tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no annotations and no output schema, so the description must be more self-sufficient. It does not explain what the tool returns, the scope of the 'data1' dataset, how to use the API key, or how this tool relates to sibling search tools. An agent would have to infer or seek additional information to invoke it correctly, making the description incomplete for a tool of even moderate complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds some meaning to the undocumented title and familyname parameters by explicitly stating they are search criteria. However, it does not explain matching behavior (exact, partial, pinyin), whether both can be combined, or required formats. The key parameter is described in the schema but nothing extra is provided in the description. Overall, the description partially compensates for the low schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool as a genealogy catalog search ('家谱谱目检索'), which is a specific resource and action. It distinguishes itself from sibling tools such as poetry, couplets, and other collection-specific searches by naming the exact domain. The verb '检索' (search) is precise and the scope is evident.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies that this tool should be used when searching for genealogy records, and it mentions the searchable fields (title/surname). However, it provides no explicit guidance on when to choose this over sibling tools like slc_datasets or slc_sparql, nor does it state any prerequisites or exclusions. The usage context is present but implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
slc_rawA
任意 data1.library.sh.cn 路径的 GET 兜底调用
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | 上海图书馆开放数据 APIKey(必填) | |
| path | Yes | 路径,如 /webapi/beitie/search | |
| params | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full disclosure burden. It does add behavioral context beyond the name: the GET method implies read-only, and the host scope (data1.library.sh.cn) is specified. However, it does not disclose response format, error behavior, whether the API key is always required, or rate limits — notable gaps for a raw/fallback tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single tight sentence that front-loads the core purpose (fallback GET call) and host scope with zero filler or redundancy. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 3-param tool with a nested params object, no annotations, and no output schema, the one-sentence description is minimally adequate but leaves uncertainty about return values and error handling. The intentional fallback nature partially justifies brevity, but the description does not state what kind of raw response the agent should expect.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already describes key and path (67% coverage), and the description adds no parameter-level detail beyond the 'GET' hint, which loosely implies params become query string parameters. The 'params' object parameter remains undocumented, and the description does not compensate for that gap or clarify what it should contain.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'GET 兜底调用' for '任意 data1.library.sh.cn 路径' (any path on data1.library.sh.cn). The term '兜底' (fallback) positions it as the catch-all tool, distinguishing it from specific sibling tools like slc_endpoints and slc_api. It is clear but slightly terse, not earning a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The word '兜底' (fallback) implies this tool should be used when no more specific path-specific tool matches, giving implicit usage context. However, there is no explicit when-to-use guidance, nor are alternatives like slc_endpoints or slc_api named as preferred options.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
slc_red_eventC
红色旅游/历史事件检索
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | 上海图书馆开放数据 APIKey(必填) | |
| date | No | 年份,如 1940 | |
| keyword | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of disclosing behavioral traits. It does not mention whether the operation is read-only, requires special permissions, returns data in a particular format, or has any rate limits or side effects. The scant phrase 'retrieval' implies a read operation, but without specifics it is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely brief, consisting of a single noun phrase. While this is concise and front-loaded, it is under-specified to the point of not providing adequate information. It does not waste words, but the lack of structure and detail makes it less effective than a well-structured two-sentence description would be.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with three parameters, no output schema, and no annotations, this description is far from complete. It does not explain what the tool returns, how the parameters interact, or any context around 'red tourism/historical events'. The concise phrase leaves the agent guessing about invocation details, making it inadequate for effective tool selection and usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers 67% of parameters (key and date have descriptions), but the description itself adds nothing about the parameters. The 'keyword' parameter is undocumented in the schema and the description gives no hint about its meaning or usage. The description fails to compensate for the coverage gap, offering no added semantics beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description '红色旅游/历史事件检索' (red tourism/historical event retrieval) clearly states the tool's function: retrieving red tourism or historical events. It includes a specific resource and an action (检索/search). While it does not explicitly distinguish from sibling tools like slc_era or slc_building, the focus on red tourism/historical events is a distinct subject area, so it is clear enough.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives, nor any context about prerequisites like the API key. The description only names the function and provides no usage scenarios, exclusions, or alternatives, leaving the agent to infer when it should be selected.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
slc_sparqlC
SPARQL 图查询说明(该平台 Key 仅网页端可用)
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits, but it only mentions the platform key availability for web use. It fails to indicate whether the tool performs read-only queries, any side effects, return formats, or error behavior, leaving significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely short, but it is under-specified rather than appropriately concise. The single sentence does not earn its place because it fails to communicate the tool's function, making it more a fragment than a useful explanation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema, no annotations, and a bare-bones description. For a complex operation like SPARQL graph querying, this is severely incomplete. It lacks critical information about return values, usage conditions, and alternates, making it inadequate for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so the baseline for this dimension is 4. There are no parameter definitions to clarify, and the description does not need to compensate for missing parameter info. It adds no parameter semantics, but none are required.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'SPARQL 图查询说明(该平台 Key 仅网页端可用)' is vague; it reads as an explanatory note rather than a clear action like 'execute SPARQL query'. It does not differentiate from sibling tools such as slc_api or slc_endpoints, leaving the tool's exact function ambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The only context is a platform key limitation, which addresses authentication but not usage scenarios, prerequisites, or complementary tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
souyun_coupletA
搜韵对仗词汇:返回与输入字/词对仗的词汇(免token),写对仗句用
| Name | Required | Description | Default |
|---|---|---|---|
| word | Yes | 字或词,如 人间/月 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the full burden. It discloses the core behavior (returning antithetical vocabulary) and adds a useful cost note about being token-free ('免token'). It does not, however, specify output format, limits, or error conditions, leaving some uncertainty for a tool with no output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, compact sentence that packs the essential information: purpose, input, output, and cost. It is front-loaded with the tool's name and function, with no filler or redundancy. This is an exemplary concise description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (one parameter, no output schema, no annotations), the description covers the essential aspects: what it does, what input it needs, and why to use it. The main gap is the lack of any detail about the output format beyond 'vocabulary', which could be ambiguous. Overall, it is sufficiently complete for a simple lookup tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides a description for the 'word' parameter (including an example), and the overall schema description coverage is 100%. The main tool description adds no additional parameter semantics beyond what is in the schema, so it meets the baseline of 3. The example in the schema is helpful for understanding the expected input format.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: it returns antithetical (对仗) vocabulary for a given character or word. It distinguishes itself from sibling tools like souyun_rhyme by focusing on couplet alignment rather than rhyme, and it specifies the use case of writing couplets. The verb '返回' and resource '对仗词汇' are precise.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear usage context: '写对仗句用' (for writing antithetical sentences), which tells the agent when to invoke this tool. However, it does not explicitly mention alternatives or when not to use it, though the distinct purpose implicitly separates it from rhyming or poem tools. The guidance is clear but lacks explicit exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
souyun_poemA
搜韵诗词检索(免token):按作者/标题/诗句/朝代/体裁/韵部查诗词,服务 AIGC 歌词。
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | 体裁,如 QiLv/WuJue | |
| rhyme | No | 韵部,如 江/尤 | |
| scope | No | All/Author/Title/Sentence | |
| pageno | No | ||
| dynasty | No | 如 Tang/Song | |
| keyword | Yes | 关键词或诗ID,如 王之涣 / 登鹳雀楼 / 7734 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It only adds the '免token' (no token needed) detail, but does not explain the return format, pagination behavior, error handling, or any limitations. The query dimensions are functional parameters, not 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, compact sentence that conveys the tool's purpose, query dimensions, and intended use case. It is front-loaded with the tool's name and avoids unnecessary verbiage; every phrase earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 6 parameters, no output schema, and no annotations, the description is not fully complete. It does not explain return values, how parameters combine, or page number semantics. However, the schema covers most parameters, and the core purpose is clear, so it is a minimal viable description with gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 83%, so the schema already documents most parameters. The description adds mapping of keyword to author/title/verse and mentions rhyme/dynasty/genre, but does not elaborate on pageno or scope nuances. It adds some value beyond the schema but not enough to exceed the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly names the tool as '搜韵诗词检索' (Souyun poem search) and lists queryable dimensions (author/title/verse/dynasty/genre/rhyme), clearly distinguishing it from sibling tools like souyun_rhyme and souyun_couplet. The verb '检索' (search) plus the resource '诗词' (poems) makes the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions the use case '服务 AIGC 歌词' (serving AIGC lyrics), implying when to use it, but does not explicitly state when to prefer this tool over alternatives or when not to use it. No exclusions or alternative tool references are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
souyun_rhymeA
搜韵韵典:查字所属韵部、词末/词首典故、句末诗例(免token)
| Name | Required | Description | Default |
|---|---|---|---|
| char | Yes | 韵字,如 天/月 | |
| qtype | No | 0全部 1韵目 2词末典故 3词首 4词末 5句末诗例 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the transparency burden. It adds the behavioral trait '免token' (token-free), and enumerates the query categories, but does not disclose return format, error behaviors, or rate limits, leaving gaps for a tool with no output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, compact sentence that front-loads the tool name and core function, with zero filler words. It efficiently communicates the tool's scope despite using slashes to compress multiple features.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema or annotations, so the description must explain return values and usage context. It does not mention the output shape or how the various qtype modes manifest in results, and it lacks alternate-tool guidance, leaving the agent under-informed for invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with both 'char' and 'qtype' described in detail, including the qtype enum values. The description adds limited semantic value beyond the schema—it names the functions but does not clarify parameter formats or edge cases, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with '搜韵韵典:查字所属韵部、词末/词首典故、句末诗例' which clearly specifies a lookup action (查) on the rhyme dictionary resource, and lists three distinct, specific functions (rhyme category, word-boundary allusions, line-end examples), differentiating it from sibling poetry tools like souyun_poem and souyun_couplet.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use when rhyme-related information is needed ('查字所属韵部') but provides no explicit guidance on when to use this tool versus alternatives, no exclusions, and no mention of prerequisites. The 'qtype' parameter is documented in the schema, but the description does not direct the agent to specific qtype values.
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. Dates show when Glama detected each change.
12 tool updates
v1.3.0- First observed
slc_api - First observed
slc_building - First observed
slc_datasets - First observed
slc_endpoints - First observed
slc_era - First observed
slc_jiapu - First observed
slc_raw - First observed
slc_red_event - First observed
slc_sparql - First observed
souyun_couplet - First observed
souyun_poem - First observed
souyun_rhyme
TDQS
Most tools have distinct purposes (e.g., souyun_rhyme vs souyun_couplet), but slc_api and slc_raw both provide generic access to library data, and slc_sparql is documentation rather than a query tool. This creates some boundary confusion.
All names use lowercase with underscores and follow a prefix_noun pattern (souyun_* and slc_*). The convention is consistent, though not verb-noun based, and the mix of prefixes is acceptable.
12 tools is within the typical well-scoped range, but includes a few near-redundant access methods (slc_api, slc_raw, slc_endpoints) and a documentation-only tool (slc_sparql). Slightly heavy but reasonable for the combined library/poetry scope.
The library domain is nearly complete thanks to the generic slc_api dispatcher covering 97 endpoints, plus dedicated tools for key resources. The poetry tools cover rhyme, couplet, and poem search. Minor gaps exist (e.g., no direct SPARQL execution), but agents can work around them.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Read-only MCP tools for AI agent discovery, structured resources, and NIULAI information.
Discover and call 10,000+ production APIs from one MCP server. Pay-per-call billing for AI agents.
Free public MCP for AI agents — 193 tools, 44 workflows. No API key.
100+ MCP tools for AI agents: content metadata, trade intelligence, business-expertise analysis.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceA comprehensive MCP server that provides full integration with LightRAG API, offering 22 tools across document management, querying, knowledge graph operations, and system management.37MIT
- AlicenseCqualityDmaintenanceAggregates multiple third-party APIs into unified MCP tools, providing out-of-the-box access to 10 popular services including OpenWeather, Google Maps, GitHub, Notion, Spotify, and more. Enables users to interact with weather data, search places, manage repositories, create content, and access various web services through a single MCP server.34MIT
- FlicenseAqualityDmaintenanceExposes two MCP tools (discover and execute) that enable agents to query an OpenAPI schema via natural language and execute matched API operations.2-
- AlicenseAqualityCmaintenanceExposes Xiaofenshen's public read-only APIs as MCP tools, enabling agents to read shared content, list image prompt templates, and fetch product documentation.3MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/FreyaBit/OpenSH-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server