sciverse-mcp-server 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/generated/tools.d.ts +1 -1
- package/dist/generated/tools.js +11 -6
- package/dist/tools.js +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -217,7 +217,7 @@ Token / endpoint 解析顺序:MCP 配置里显式 `env` → `SCIVERSE_API_TOKE
|
|
|
217
217
|
|---|---|
|
|
218
218
|
| `search_papers` | 结构化元数据检索(作者 / 年份 / 期刊 / 学科) |
|
|
219
219
|
| `semantic_search` | 自然语言语义检索(RAG 用) |
|
|
220
|
-
| `read_content` |
|
|
220
|
+
| `read_content` | 按 Unicode 码点区间读文献原文 |
|
|
221
221
|
| `list_catalog` | 字段 introspection(返回所有字段名 + 枚举值样本,agent 接入时建议先调一次学 schema) |
|
|
222
222
|
| `get_resource` | 取文献附属图片字节流;MCP server 包装为 `image` content block + base64 + mimeType,多模态模型(如 Claude)可直接读图 |
|
|
223
223
|
|
package/dist/generated/tools.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Auto-generated by scripts/gen-tools.mjs. Do not edit.
|
|
2
2
|
// Source of truth: openapi.yaml
|
|
3
|
-
export const TOOLS_VERSION = "0.14.
|
|
3
|
+
export const TOOLS_VERSION = "0.14.1";
|
|
4
4
|
export const TOOLS = [
|
|
5
5
|
{
|
|
6
6
|
"name": "search_papers",
|
|
@@ -167,9 +167,10 @@ export const TOOLS = [
|
|
|
167
167
|
},
|
|
168
168
|
"page_size": {
|
|
169
169
|
"type": "integer",
|
|
170
|
-
"default":
|
|
170
|
+
"default": 25,
|
|
171
171
|
"minimum": 1,
|
|
172
|
-
"maximum": 50
|
|
172
|
+
"maximum": 50,
|
|
173
|
+
"description": "每页条数。省略时为服务端默认 25(SDK / MCP 不注入默认值);工具层上限 50。"
|
|
173
174
|
}
|
|
174
175
|
}
|
|
175
176
|
}
|
|
@@ -330,7 +331,7 @@ export const TOOLS = [
|
|
|
330
331
|
},
|
|
331
332
|
{
|
|
332
333
|
"name": "read_content",
|
|
333
|
-
"description": "Read a
|
|
334
|
+
"description": "Read a range of a paper's original text addressed in Unicode code\npoints (offset/limit count characters like Python len(), not bytes).\nTypically used with a doc_id/offset returned by semantic_search to\nexpand context (read more text before or after a chunk).\nReturns: text fragment, bytes_returned (UTF-8 byte length of text, for\nreference only), next_offset (code-point offset of the next fragment —\npage with it, never with bytes_returned), more (boolean).\nServer behaviour: limit above 524288 is silently clamped; omitting\noffset returns the whole document ignoring limit — the SDKs / MCP\nserver send offset=0 and limit=4096 by default, so pass offset\nexplicitly when calling the HTTP API directly.",
|
|
334
335
|
"inputSchema": {
|
|
335
336
|
"type": "object",
|
|
336
337
|
"properties": {
|
|
@@ -341,13 +342,17 @@ export const TOOLS = [
|
|
|
341
342
|
"offset": {
|
|
342
343
|
"type": "integer",
|
|
343
344
|
"format": "int64",
|
|
344
|
-
"default": 0
|
|
345
|
+
"default": 0,
|
|
346
|
+
"minimum": 0,
|
|
347
|
+
"description": "起始 Unicode 码点偏移,直接使用 semantic_search 返回的 offset。默认 0。"
|
|
345
348
|
},
|
|
346
349
|
"limit": {
|
|
347
350
|
"type": "integer",
|
|
348
351
|
"format": "int64",
|
|
349
352
|
"default": 4096,
|
|
350
|
-
"
|
|
353
|
+
"minimum": 1,
|
|
354
|
+
"maximum": 524288,
|
|
355
|
+
"description": "最多返回的 Unicode 码点数。默认 4096;服务端上限 524288(超出静默钳制)。LLM 场景建议 ≤ 16384,避免撑爆上下文。"
|
|
351
356
|
}
|
|
352
357
|
},
|
|
353
358
|
"required": [
|
package/dist/tools.js
CHANGED
|
@@ -209,7 +209,10 @@ export async function executeTool(config, name, args) {
|
|
|
209
209
|
content: [{ type: "text", text: JSON.stringify({ error: "doc_id is required" }) }],
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
|
-
|
|
212
|
+
// 后端未传 offset 时返回整篇全文并忽略 limit;这里始终显式传两者,避免把整篇论文灌进模型上下文。
|
|
213
|
+
return call(config, "GET", endpoint.path, {
|
|
214
|
+
query: { doc_id, offset: offset ?? 0, limit: limit ?? 4096 },
|
|
215
|
+
});
|
|
213
216
|
}
|
|
214
217
|
case "get_resource": {
|
|
215
218
|
const { file_name } = args;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sciverse-mcp-server",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "Sciverse MCP server — exposes academic paper retrieval (search_papers / semantic_search / read_content) to MCP-compatible coding agents (Claude Code, Cursor, Codex CLI, Windsurf, ...).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/opendatalab/Sciverse-Agent-Tools/tree/main/packages/mcp",
|