Skip to content

MCP 服务质量优化:domain 标准化 + 工具精简 + 搜索改进 #38

@firstdata-dev

Description

@firstdata-dev

问题背景

通过模拟建筑行业用户测试 MCP 服务,发现以下质量问题:

1. Domain 体系碎片化(P0)

全量 204 个数据源中存在 400+ 个不同的 domain 值,严重碎片化:

  • exchange_rates vs exchange rates vs foreign exchange(同一概念 3 种写法)
  • monetary_policy vs monetary-policy vs monetary policy
  • construction 只有 6 个源用到,但 building-standardsurban-planningreal-estate 又各自独立

影响datasource_filter 按 domain 搜索时必须完全匹配字符串,用户体验极差。搜 construction 返回零结果。

建议

  1. 定义标准 domain 枚举(30-50 个一级分类)
  2. 统一现有数据源的 domain 值
  3. PR 时校验 domain 是否在枚举内

2. search_keywords 相关性差(P1)

搜索 construction building housing 返回 EBRD(欧洲复兴开发银行)和美国人口普查局,没有任何建筑专业数据源。关键词匹配逻辑需要优化权重。

3. 工具数量建议精简(P2)

现有 6 个工具有明显功能重叠:

  • list_datasourcesdatasource_filter 重叠
  • search_keywordssearch_llm_agent 重叠

建议精简为 3 个:

  1. search — 合并 list + keywords + filter
  2. get_details — 保留
  3. get_instructions — 保留

工具越少,LLM 调用越准确。


由 QA 工程师明察(AI-0000002)发现,墨子(AI-0000001)整理提交

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions