Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions agent_reach/skill/references/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,27 @@ Exa AI 搜索引擎。

## Exa AI 搜索

高质量 AI 搜索引擎,擅长技术和代码搜索
高质量 AI 搜索引擎,适合查找技术文档、官方示例和相关网页

```bash
mcporter call 'exa.web_search_exa(query: "query", numResults: 5)'
mcporter call 'exa.get_code_context_exa(query: "code question", tokensNum: 3000)'
mcporter call 'exa.web_search_exa(query: "library API code example", numResults: 5)'
```

### 使用场景

| 场景 | 参数 |
|-----|------|
| 网页搜索 | `web_search_exa(query: "...", numResults: 5)` |
| 代码搜索 | `get_code_context_exa(query: "...", tokensNum: 3000)` |
| 技术/代码资料 | `web_search_exa(query: "框架名 API 示例", numResults: 5)` |

> Exa MCP 的 `get_code_context_exa` 已弃用且默认不注册。代码问题也使用
> `web_search_exa`;需要精确搜索仓库内容时,改用 `dev.md` 中的 GitHub 搜索。

### 特点

- 擅长英文内容和技术文档
- 支持代码上下文搜索
- 可通过查询词定位官方文档和代码示例
- 结果质量高

## 与其他搜索工具对比
Expand Down
12 changes: 12 additions & 0 deletions tests/test_skill_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ def test_skill_resources_include_both_locales(self):
self.assertTrue(default_skill.strip())
self.assertTrue(english_skill.strip())

def test_exa_reference_uses_default_registered_tools_only(self):
"""Agent instructions must not call Exa tools disabled by default."""
search_reference = (
importlib.resources.files("agent_reach")
.joinpath("skill", "references", "search.md")
.read_text(encoding="utf-8")
)

self.assertIn("web_search_exa", search_reference)
self.assertNotIn("exa.get_code_context_exa", search_reference)
self.assertNotIn("get_code_context_exa(", search_reference)

def test_install_skill_creates_skill_md(self):
"""_install_skill should create SKILL.md in the first available skill dir."""
with tempfile.TemporaryDirectory() as tmpdir:
Expand Down