tyc-cli 0.2.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -30,7 +30,7 @@
30
30
  - `tyc <group> <method>` 命令形态与 0.1.0 完全一致
31
31
  - `--pretty / --md / --verbose` 三种输出模式
32
32
  - tyc 英文 key 透传(由 MCP Server 保证)
33
- - 6 分类 / 167 工具全量覆盖
33
+ - 6 分类 / 164 工具全量覆盖
34
34
 
35
35
  ## [0.1.0] - 2026-04-25
36
36
 
package/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
  ## 📖 项目简介
13
13
 
14
14
  `tyc-cli` 是天眼查 MCP Server 的官方命令行客户端。通过 MCP 协议(JSON-RPC 2.0 over
15
- Streamable HTTP)调用天眼查 167 个业务语义聚合工具,覆盖企业工商、知产、司法风险、
15
+ Streamable HTTP)调用天眼查 164 个业务语义聚合工具,覆盖企业工商、知产、司法风险、
16
16
  董监高等全维度商业数据。
17
17
 
18
18
  **核心特点**:
@@ -22,7 +22,7 @@ Streamable HTTP)调用天眼查 167 个业务语义聚合工具,覆盖企业
22
22
  - 🔌 **即插即用**:默认连接官方 MCP 端点 `https://ai-mcp.tianyancha.com/mcp`;
23
23
  支持 `--url` 指向私有部署
24
24
  - 🔄 **Session 复用**:`Mcp-Session-Id` 本地缓存 24 小时,后续调用零 initialize 开销
25
- - 🎯 **6 大业务分类 / 167 个工具**:企业基础信息 · 风险合规 · 知识产权 · 经营与公示 · 历史信息 · 董监高
25
+ - 🎯 **6 大业务分类 / 164 个工具**:企业基础信息 · 风险合规 · 知识产权 · 经营与公示 · 历史信息 · 董监高
26
26
  - 🤖 **AI Agent 友好**:tyc 英文 key 透传 / 时间戳格式化 / `_summary / _empty / _warnings` 元数据
27
27
 
28
28
  ---
@@ -119,7 +119,7 @@ tyc executive personnel-dishonest "..." --humanName "张三"
119
119
 
120
120
  ## 📚 查询指令手册
121
121
 
122
- ### 企业基础信息(company,52)
122
+ ### 企业基础信息(company,50)
123
123
 
124
124
  ```bash
125
125
  tyc company registration-info "北京百度网讯科技有限公司" # 工商登记
@@ -298,7 +298,7 @@ tyc-cli/
298
298
  | 职责 | 命令树 · 参数透传 · 格式化输出 | 多源聚合 · 时间戳格式化 · 元数据注入 · Authorization 透传至 OpenAPI |
299
299
  | 运维 | 用户本地安装 | 官方托管 `ai-mcp.tianyancha.com`,或用户自建 |
300
300
 
301
- CLI 和 MCP Server 共享同一 167 工具清单;工具元数据从打包内的 `catalog.json`
301
+ CLI 和 MCP Server 共享同一 164 工具清单;工具元数据从打包内的 `catalog.json`
302
302
  读取,保证命令树冷启动零网络开销。
303
303
 
304
304
  ---
package/dist/catalog.json CHANGED
@@ -5,12 +5,12 @@
5
5
  {
6
6
  "group": "company",
7
7
  "name_zh": "企业基础信息",
8
- "tool_count": 52
8
+ "tool_count": 50
9
9
  },
10
10
  {
11
11
  "group": "risk",
12
12
  "name_zh": "风险合规",
13
- "tool_count": 36
13
+ "tool_count": 35
14
14
  },
15
15
  {
16
16
  "group": "intellectual_property",
@@ -40,15 +40,15 @@
40
40
  },
41
41
  {
42
42
  "layer": "L1",
43
- "count": 13
43
+ "count": 6
44
44
  },
45
45
  {
46
46
  "layer": "L2",
47
- "count": 53
47
+ "count": 58
48
48
  },
49
49
  {
50
50
  "layer": "L3",
51
- "count": 100
51
+ "count": 99
52
52
  }
53
53
  ],
54
54
  "tools": [
@@ -199,7 +199,7 @@
199
199
  {
200
200
  "name": "get_company_profile",
201
201
  "group": "company",
202
- "layer": "L1",
202
+ "layer": "L2",
203
203
  "cliMethod": "profile",
204
204
  "categoryNameZh": "企业基础信息",
205
205
  "description": "查询企业的简介信息,包括企业名称、简介,适用于企业画像构建、企业业务分析场景。",
@@ -231,7 +231,7 @@
231
231
  {
232
232
  "name": "get_company_scale",
233
233
  "group": "company",
234
- "layer": "L1",
234
+ "layer": "L2",
235
235
  "cliMethod": "scale",
236
236
  "categoryNameZh": "企业基础信息",
237
237
  "description": "查询企业规模相关指标,包括人员规模、参保人数、分支机构数量、对外投资数量等。",
@@ -247,7 +247,7 @@
247
247
  {
248
248
  "name": "get_company_tags",
249
249
  "group": "company",
250
- "layer": "L1",
250
+ "layer": "L2",
251
251
  "cliMethod": "tags",
252
252
  "categoryNameZh": "企业基础信息",
253
253
  "description": "查询企业标签,包括领域分类、主营业务、榜单等标签信息。",
@@ -292,38 +292,6 @@
292
292
  }
293
293
  ]
294
294
  },
295
- {
296
- "name": "get_enterprise_report_basic",
297
- "group": "company",
298
- "layer": "L1",
299
- "cliMethod": "enterprise-report-basic",
300
- "categoryNameZh": "企业基础信息",
301
- "description": "查询企业基础版信用报告,包括工商信息、分支机构、变更记录、主要人员、联系方式等。",
302
- "params": [
303
- {
304
- "name": "searchKey",
305
- "type": "string",
306
- "required": true,
307
- "description": "企业名称 或 统一社会信用代码"
308
- }
309
- ]
310
- },
311
- {
312
- "name": "get_enterprise_report_professional",
313
- "group": "company",
314
- "layer": "L1",
315
- "cliMethod": "enterprise-report-professional",
316
- "categoryNameZh": "企业基础信息",
317
- "description": "查询企业专业版信用报告,包括基础版所有字段 + 司法风险、经营风险、知识产权、经营信息、上市等全维度数据。",
318
- "params": [
319
- {
320
- "name": "searchKey",
321
- "type": "string",
322
- "required": true,
323
- "description": "企业名称 或 统一社会信用代码"
324
- }
325
- ]
326
- },
327
295
  {
328
296
  "name": "get_equity_ratio",
329
297
  "group": "company",
@@ -407,7 +375,7 @@
407
375
  {
408
376
  "name": "get_financial_summary",
409
377
  "group": "company",
410
- "layer": "L1",
378
+ "layer": "L2",
411
379
  "cliMethod": "financial-summary",
412
380
  "categoryNameZh": "企业基础信息",
413
381
  "description": "查询上市公司财务简析数据,包括营业收入、净利润、总资产、净资产、净利率、毛利率、资产负债率。",
@@ -903,7 +871,7 @@
903
871
  {
904
872
  "name": "verify_company_accuracy",
905
873
  "group": "company",
906
- "layer": "L1",
874
+ "layer": "L2",
907
875
  "cliMethod": "accuracy",
908
876
  "categoryNameZh": "企业基础信息",
909
877
  "description": "核实企业名称、法定代表人与统一社会信用代码的匹配性,适用于企业实名认证、准入资质初审及基础信息准确性校验。",
@@ -2443,22 +2411,6 @@
2443
2411
  }
2444
2412
  ]
2445
2413
  },
2446
- {
2447
- "name": "get_disciplinary_list",
2448
- "group": "risk",
2449
- "layer": "L3",
2450
- "cliMethod": "disciplinary-list",
2451
- "categoryNameZh": "风险合规",
2452
- "description": "查询企业被纳入惩戒/黑名单情况(数据来源:天眼查风险标签聚合)。",
2453
- "params": [
2454
- {
2455
- "name": "searchKey",
2456
- "type": "string",
2457
- "required": true,
2458
- "description": "企业名称 或 统一社会信用代码"
2459
- }
2460
- ]
2461
- },
2462
2414
  {
2463
2415
  "name": "get_dishonest_info",
2464
2416
  "group": "risk",
@@ -10,9 +10,9 @@ const LAYER_SPECS = [
10
10
  {
11
11
  layer: "L1",
12
12
  title: "Overview · 概要层",
13
- summary: "跨维度聚合、总览、评分、实体校验。Agent 拿到 USCC 后的第 1 跳,回包带 _summary + drill_down 线索。",
14
- trigger: '"这家公司是什么 / 整体怎么样 / 有没有风险 / 能不能信任"',
15
- contract: "不需要你提前知道维度;一次调用就能拿到 _summary + drill_down 线索。",
13
+ summary: "**6 个 facet 队长,每 facet 1 个总览**:company-base / 风险 / 知产 / 经营信用 / 历史 / 董监高 各 1 个 L1 工具,单次调用聚合该 facet 多子维度。",
14
+ trigger: '"这家公司整体怎么样 / 风险如何 / 知产实力 / 经营状况 / 历史变更 / 这个人是谁"',
15
+ contract: "Agent 按 facet 选 1 个 L1 调用即得 _summary + drill_down 线索;不需要你预先在 facet 内挑子维度。",
16
16
  },
17
17
  {
18
18
  layer: "L2",
@@ -115,11 +115,11 @@ function renderLayersText() {
115
115
  const total = getTotalCount();
116
116
  const defaultSurface = getLayerCount("L0") + getLayerCount("L1");
117
117
  const lines = [];
118
- lines.push("tyc-cli · Layered Tool Architecture (v5 §3.3 ①)");
118
+ lines.push("tyc-cli · Layered Tool Architecture");
119
119
  lines.push(`Total ${total} tools · L0=${getLayerCount("L0")} L1=${getLayerCount("L1")} L2=${getLayerCount("L2")} L3=${getLayerCount("L3")}`);
120
120
  lines.push("Rationale: LLM tool-selection accuracy collapses beyond 30 tools.");
121
121
  lines.push(` tyc carves L0 into a single entity-resolution tool, so the default LLM`);
122
- lines.push(` surface is L0 + L1 = ${defaultSurface} tools (≤ v5's 15-tool limit);`);
122
+ lines.push(` surface is L0 + L1 = ${defaultSurface} tools (≤ 15-tool exposure limit);`);
123
123
  lines.push(" L2/L3 are discovered on demand via _summary / drill_down_tools.");
124
124
  lines.push("");
125
125
  for (const s of LAYER_SPECS) {
@@ -145,7 +145,7 @@ function renderLayersMarkdown() {
145
145
  lines.push("# tyc-cli · Layered Tool Architecture");
146
146
  lines.push("");
147
147
  lines.push(`> Total **${getTotalCount()}** tools · **L0=${getLayerCount("L0")}** · **L1=${getLayerCount("L1")}** · **L2=${getLayerCount("L2")}** · **L3=${getLayerCount("L3")}** `);
148
- lines.push(`> Design rationale (v5 §3.3 ①): LLM tool-selection accuracy collapses above 30 tools; tyc carves L0 into a dedicated entity-resolution tool so the default LLM surface = L0 + L1 = ${defaultSurface} tools (≤ 15-tool limit), discovers L2/L3 on demand.`);
148
+ lines.push(`> Design rationale: LLM tool-selection accuracy collapses above 30 tools; tyc carves L0 into a dedicated entity-resolution tool so the default LLM surface = L0 + L1 = ${defaultSurface} tools (≤ 15-tool limit), discovers L2/L3 on demand.`);
149
149
  lines.push("");
150
150
  lines.push("| Layer | Tools | Summary | Trigger |");
151
151
  lines.push("|---|---:|---|---|");
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import { getCategories, getLayerCount, getTotalCount, } from "./registry.js";
7
7
  // 顶层 help:把"最懂 AI 的 CLI"落在 4 层架构 + 调用顺序 + 可发现性上。
8
8
  // Agent 看 tyc --help 时应立刻读懂"先 L0 锚定企业,再 L1 概览,再 L2 下钻,最后 L3 详情"这条主线。
9
9
  const helpText = `
10
- ARCHITECTURE — Layered Tool Discovery for LLM Agents (v5 §3.3 ①)
10
+ ARCHITECTURE — Layered Tool Discovery for LLM Agents
11
11
 
12
12
  Cognitive research shows LLM tool-selection accuracy collapses above
13
13
  30 tools (>95% at 10, ~70% at 30, <50% at 100+). tyc counters this with
@@ -15,7 +15,7 @@ ARCHITECTURE — Layered Tool Discovery for LLM Agents (v5 §3.3 ①)
15
15
  entity-resolution layer:
16
16
 
17
17
  ┌─ L0 Resolve ${pad(getLayerCount("L0"), 3)} tool entity resolution · 简称/曾用名/模糊名 → 精确企业
18
- ├─ L1 Overview ${pad(getLayerCount("L1"), 3)} tools cross-facet aggregation · scoring · entity-check
18
+ ├─ L1 Overview ${pad(getLayerCount("L1"), 3)} tools one captain per facet · returns _summary + drill_down
19
19
  ├─ L2 Drill-down ${pad(getLayerCount("L2"), 3)} tools one-hop into a specific data dimension
20
20
  └─ L3 Specialized ${pad(getLayerCount("L3"), 3)} tools id-based detail · search_* · vertical SKILLs
21
21
 
@@ -34,7 +34,7 @@ ARCHITECTURE — Layered Tool Discovery for LLM Agents (v5 §3.3 ①)
34
34
  Rule of thumb: the smaller the layer number, the higher the information
35
35
  density per token. L0 is MANDATORY — skipping it (without a USCC already
36
36
  in hand) wastes downstream calls on the wrong entity.
37
- Default LLM surface = L0 + L1 = ${getLayerCount("L0") + getLayerCount("L1")} tools (≤ v5's 15-tool limit).
37
+ Default LLM surface = L0 + L1 = ${getLayerCount("L0") + getLayerCount("L1")} tools (≤ 15-tool exposure limit).
38
38
 
39
39
  DISCOVER BY LAYER
40
40
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tyc-cli",
3
- "version": "0.2.0",
4
- "description": "天眼查 MCP CLI — 167 个业务语义聚合工具 · 命令行直达企业数据 · 通过 MCP Server 调用",
3
+ "version": "0.2.1",
4
+ "description": "天眼查 MCP CLI — 164 个业务语义聚合工具 · 命令行直达企业数据 · 通过 MCP Server 调用",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
7
  "tyc": "./dist/index.js"