Overview
Use the Agent's parallel calling capability to accelerate literature search and improve coverage.
Core Concepts:
- Default search strategy (dates, exclusion terms, article types)
- Strategy tool returns multiple sets of search syntax (automatically integrates strategy settings)
- Agent calls search tools in parallel
- Merge tool integrates results
Available Tools
🔍 pubmed-search MCP search tools
| Tool | Purpose | Key Parameters |
|---|---|---|
generate_search_queries |
Generate MeSH + synonym material from a topic | topic, strategy, check_spelling |
search_literature |
Execute PubMed search (can be run multiple times in parallel) | query, limit, min_year, article_type |
merge_search_results |
Merge multiple sets of search results and deduplicate | results_json |
expand_search_queries |
Expand search when results are insufficient | topic, expansion_type |
parse_pico |
Parse PICO clinical questions | description or p, i, c, o |
📊 Result Processing Tools
| Tool | Purpose | Key Parameters |
|---|---|---|
fetch_article_details |
Get complete article information | pmids (comma-separated) |
get_citation_metrics |
Get iCite citation metrics (RCR) | pmids, sort_by, min_rcr |
find_related_articles |
Find similar articles | pmid |
find_citing_articles |
Find studies citing this article | pmid |
💾 Session Management Tools
| Tool | Purpose | Description |
|---|---|---|
get_session_pmids |
Get PMIDs in the session | search_index=-1 get most recent search |
get_session_summary |
View session status | Confirm cache and search history |
list_search_history |
List search history | Trace past searches |
📚 Literature Saving Tools (⚠️ Note priority)
| Tool | Data Source | When to Use |
|---|---|---|
save_reference_mcp |
pubmed-search HTTP API | Always prioritize ✅ |
save_reference |
Agent passes | Fallback only when API is unavailable ⚠️ |
Workflow
Step 0: (Optional) Set search strategy
呼叫:configure_search_strategy(criteria_json={
"date_range": "2019-2024",
"exclusions": ["animal", "review"],
"article_types": ["Clinical Trial", "Randomized Controlled Trial"]
})
Step 1: Generate search strategy
呼叫:generate_search_queries(
topic="remimazolam ICU sedation",
strategy="comprehensive",
use_saved_strategy=True
)
Returns 5 sets of queries, with the strategy already automatically integrated.
Step 2: Agent executes searches in parallel
After seeing the instruction, the Agent will call in parallel:
<parallel_tool_calls>
<tool_call id="1">
<name>search_literature</name>
<args>{"query": "...", "limit": 20}</args>
</tool_call>
<tool_call id="2">
<name>search_literature</name>
<args>{"query": "...", "limit": 20}</args>
</tool_call>
<!-- ... 更多並行呼叫 ... -->
</parallel_tool_calls>
Step 3: Merge results
呼叫:merge_search_results(results_json='[
{"query_id": "q1_title", "pmids": ["123", "456"]},
{"query_id": "q2_tiab", "pmids": ["456", "012"]}
]')
Returns deduplicated results, marking highly relevant literature (appearing in multiple searches).
Iterative Search Expansion
When the initial search results are insufficient:
Phase 1: 初始搜尋
→ generate_search_queries(topic="...")
→ 並行執行 5 組查詢
→ merge_search_results → 只找到 15 篇,不夠!
Phase 2: 擴展搜尋
→ expand_search_queries(
topic="...",
existing_query_ids="q1,q2,q3,q4,q5",
expansion_type="synonyms"
)
→ 並行執行新查詢
→ merge_search_results → 共 32 篇
Phase 3: 如果還不夠
→ expand_search_queries(..., expansion_type="related")
→ 繼續...
Expansion Type Selection Guide
| Situation | expansion_type | Expected Effect |
|---|---|---|
| Worried about missing different terms | synonyms |
sedation → conscious sedation |
| Want to find similar comparative studies | related |
remimazolam → propofol |
| Too few results | broader |
Use OR, remove restrictions |
| Too many results | narrower |
Limit to RCTs, last 2 years |
Flowchart
generate_search_queries(topic)
│ 5 組查詢
▼
並行執行 search_literature
│
▼
merge_search_results
│
▼
┌───────┴───────┐
│ 結果足夠嗎? │
└───────┬───────┘
│ No
▼
expand_search_queries(type=...)
│ 新查詢
▼
並行執行新查詢
│
▼
merge(含所有結果)
│
└──→ 重複直到足夠
Advantages
- Faster: multiple searches execute simultaneously
- More comprehensive: keyword combinations from different angles
- Traceable: know which search each piece of literature came from
- Reproducible: strategy is recorded
- Strategy integration: date/exclusion terms are automatically applied
Save references after searching
After completing the search and filtering, save the selected references:
# ✅ PRIMARY:使用 MCP-to-MCP 驗證(永遠優先)
呼叫:save_reference_mcp(
pmid="12345678",
agent_notes="Key paper on parallel search methodology"
)
# ⚠️ FALLBACK:僅當 pubmed-search API 不可用時
呼叫:save_reference(article={完整 metadata dict})
Why is save_reference_mcp preferred?
save_reference_mcp: mdpaper retrieves verified data directly from the pubmed-search API, so the Agent cannot tamper with itsave_reference: The Agent passes metadata, which may be modified or hallucinated
Session tool usage tips
Search results are automatically cached in the session, so you do not need to remember all PMIDs:
# 取得最近搜尋的 PMID
呼叫:get_session_pmids(search_index=-1)
# 取得前一次搜尋的 PMID
呼叫:get_session_pmids(search_index=-2)
# 在其他工具中使用 "last" 快捷方式
呼叫:get_citation_metrics(pmids="last", sort_by="relative_citation_ratio")
呼叫:prepare_export(pmids="last", format="ris")
Related skills
literature-review- Complete literature review workflowconcept-development- Develop concepts after searching