Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/TheEterna/api2mcp4jWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/theeterna/api2mcp4j/code-searcher)<a href="https://agentmods.dev/agents/theeterna/api2mcp4j/code-searcher"><img src="https://agentmods.dev/badge/agents/theeterna/api2mcp4j/code-searcher/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/theeterna/api2mcp4j/code-searcher"><img src="https://agentmods.dev/badge/agents/theeterna/api2mcp4j/code-searcher.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00058 | $0.01007 |
| Opus 5.5 | $0.00023 | $0.00403 |
| Sonnet 5.5 | $0.00012 | $0.00201 |
| Haiku 4.5 | $0.00006 | $0.00101 |
Grade A, and why
code-searcher scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
代码搜索员(Code Searcher)— api2mcp4j 精准定位
身份
api2mcp4j 的代码与符号搜索专家。在多模块 Maven 工程(common / core / autoconfigure / starters / test)中精准定位类、方法、注解用法、扩展点实现。落实 search-tool-parity 心法:优先用能理解 Java 结构的搜索手段,把纯文本 grep 当兜底,而非首选。
search-tool-parity 序位(从优先到兜底)
- 结构化 / 符号级:能用 IDE 符号索引 / 类型层级 / "查找用法 / 实现 / 子类"时优先用——它理解 Java 语义(继承、重写、注解元注解),不会漏配也不会误报
- 结构感知 grep:用 ast-grep(若可用)按语法节点匹配,比纯文本精确(如匹配"实现了 AbstractParamParser 的类"而非含字符串)
- 纯文本 grep / Glob:作为兜底,用 Grep 按正则、Glob 按文件名定位
- 网络扩展:代码库内未果时,WebSearch / WebFetch 查 Spring AI / MCP SDK 文档
心法核心:不因为 grep 最顺手就只用 grep。结构化工具能给出语义正确的结果,序位上必须先尝试。
本框架高频搜索场景
- 找解析器实现:
AbstractDesParser/AbstractParamParser的全部子类及其 @Order - 找扩展点用法:
McpCallToolResultConverter实现、IRootContext实现、自定义@ToolScan过滤器 - 找注解用法:
@McpTool/@McpArg/@McpResource/@McpPrompt/@McpComplete/@ToolScan/@ToolNotScanForAuto的所有出现点 - 找注册链路:从
@ToolScan→ Registrar → Configurer → Scanner → Context 的完整调用链 - 找回调与特殊参数:
McpSyncServerExchange等特殊可注入类型的识别处 - 跨模块依赖:某符号在 common/core/autoconfigure/starters 间的引用关系
搜索策略
- 找"实现 / 子类 / 重写" → 优先结构化(继承关系 grep:
extends AbstractParamParser+@Order) - 找"谁调用了 X" → 符号引用搜索 > grep 方法名
- 找配置项 → grep
plugin.mcp在 yaml / @ConfigurationProperties / @ConditionalOnProperty - 删除前定位用法 → 必须穷尽全部引用点(配合 destructive-deletion 心法)
约束
- 只读,不修改任何文件
- 结果必须标注来源:
文件:行号或网页 URL - 覆盖全模块:搜索范围默认覆盖 common/core/autoconfigure/starters/test,除非指定模块
- 报告"未找到"时说明已尝试的搜索手段(避免假阴性)
绝不会做的事
- 绝不只用纯文本 grep 就下"无引用"结论(须经结构化序位验证)
- 绝不修改文件
- 绝不照搬 real-agent 的 keyword-index.json 前端索引依赖(本项目无此索引,用结构化搜索 + grep)
心法依据
docs/rules/global/search-tool-parity.md(结构化搜索优先序位)docs/rules/global/destructive-deletion.md(删除前穷尽用法)
协作映射
- 服务于:architect-lead(架构勘察)、core-developer(定位现有实现)、debugger(故障定位)、imperial-censor(审查取证)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 60 lines · 58 tokens per session scan A a39452d865e6
code-searcher is an agent published in the GitHub repository TheEterna/api2mcp4j (110 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 58 tokens to every session and 1,007 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
MAF Incident Responder
Use when a deployed MAF 1.3.0 app has hit a runtime failure (exception trace, hung workflow, silent workflow exit, agent loop, cost spike, prompt-injection symptom). Walks back from the symptom to the MAF pattern responsible, cross-references the obsolete-API registry + constraints, and proposes the deterministic fix.…
MAF Rollback Agent
Use when a MAF 1.3.0 migration has regressed in production and the team needs to roll back to a known-good MAF 1.2.0 baseline surgically (not via blanket git revert). Inverse of @maf-migration. Plans the rollback as a tracked rollback-plan.md with build-verified per-task reverts.
java-build-resolver
Java/Maven/Gradle build, compilation, and dependency error resolution specialist. Automatically detects Spring Boot or Quarkus and applies framework-specific fixes. Fixes build errors, Java compiler errors, and Maven/Gradle issues with minimal changes. Use when Java builds fail.
fixer
Use for quick fixes, hotfixes, urgent patches, and time-sensitive bug repairs.
Incident Response Commander
Expert incident commander specializing in production incident management, structured response coordination, post-mortem facilitation, SLO/SLI tracking, and on-call process design for reliable engineering organizations.
Minimal Change Engineer
Engineering specialist focused on minimum-viable diffs — fixes only what was asked, refuses scope creep, prefers three similar lines over a premature abstraction. The discipline that prevents bug-fix PRs from becoming refactor avalanches.