Spring Boot + MyBatis(-Plus) framework semantic MCP Server that extracts framework call chains from Java source code and provides tools for tracing calls, finding SQL, analyzing impact, and managing project maps.
ContextGate has 5 tools with Chinese descriptions and basic schemas. Tool names are action-oriented (trace_call, find_sql, impact, list_maps, refresh_map), but descriptions are lengthy (200-300 chars) and written in Chinese, limiting LLM comprehension in English-first environments. Input schemas are present but minimal: most parameters lack type constraints (no enums, ranges, or patterns). Output schemas are completely undocumented, callers cannot predict response structure. Error handling is generic (FileNotFoundError, KeyError) with no recovery guidance. The trace_call tool shows promise with detailed logic, but parameter descriptions are vague (e.g., 'query' accepts both HTTP routes and method names without clear format guidance). No tool annotations (readOnlyHint, destructiveHint) despite clear risk profiles (refresh_map is WRITE, others are READ_ONLY).
反查 SQL:Mapper 方法名或 SQL 片段 → SQL 全文 + 表 + 列 + 上游路由。输入 Mapper 方法名(如 "UserMapper#selectById")或 SQL 片段(如 "SELECT * FROM users"),返回完整 SQL 文本、涉及的表和列、以及调用该 SQL 的上游路由。
影响面:改实体/字段 → 波及的 SQL、路由、事务内写操作。输入实体名和字段名(如 "User.nickname"),返回所有涉及该字段的 SQL、调用这些 SQL 的路由、以及事务内的写操作。
列出地图目录里已注册的项目地图(多项目模式)。返回当前已加载的所有项目地图的列表。
重新运行分析器刷新地图(代码改动后调一次)。指定项目根目录,重新运行 framework_map.py 分析器生成或更新框架地图。
正向追踪调用链。输入一个 HTTP 路由(如 "POST /orders/my")或方法名(如 "BizOrderServiceImpl#create" 或裸方法名 "create"),返回完整的框架调用链树:Controller → Service → Mapper → SQL,含事务标记。project: 多项目模式下的项目名(不传=当前活跃项目)。
No output schemas documented. Callers cannot predict response structure (e.g., does trace_call return a tree, JSON, or plain text?). LLMs cannot plan downstream operations without knowing field names and types.
Descriptions are in Chinese and exceed 200 chars, making them hard for English-first LLMs to parse. 'query' parameter in trace_call and find_sql accepts both 'POST /orders/my' and 'BizOrderServiceImpl#create' without clear format constraints or examples of what each format returns.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). refresh_map is marked WRITE but has no destructiveHint. trace_call, find_sql, impact, list_maps are READ_ONLY but lack readOnlyHint. LLMs cannot infer safety properties.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 44 | 2026-07-28+ | v2 |
Parameter 'project' is optional but behavior is underdocumented. Descriptions say 'defaults to current active project' but do not explain how 'current active project' is determined or what happens if none is set. Multi-project mode is conditional on CODECONTEXT_MAPS_DIR env var, not discoverable from tool alone.
Error handling returns raw Python exceptions (FileNotFoundError, KeyError) with no recovery guidance. 'No matching routes found' does not suggest calling list_maps or checking project name. Agents cannot self-correct.