save_literature_notes
Save PubMed search results as structured local wiki or Markdown notes with wikilinks and frontmatter for knowledge management.
Instructions
Save searched articles as guided local wiki/Foam/Markdown notes.
When to Use
After unified_search, persist the selected literature into a local note library.
Give agents a structured alternative to generic write_file calls.
Create wiki notes with Foam-compatible wikilinks, MedPaper-like reference notes, and frontmatter.
Use stable wiki/Foam link targets and return wiki_validation for unresolved-link checks.
Local Directory Resolution
output_dir argument, if provided
PUBMED_NOTES_DIR environment variable
PUBMED_WORKSPACE_DIR/references
PUBMED_DATA_DIR/references
Args: pmids: Articles to save. Accepts "last", comma-separated PMIDs, list, or int. output_dir: Optional target folder for notes. note_format: "wiki" (default, Foam-compatible), "foam", "markdown", or "medpaper". include_abstract: Include abstracts in article notes. overwrite: Overwrite existing per-article notes when filenames collide. create_index: Create a collection index note linking saved articles. collection_name: Optional title/file stem for the index note. template_file: Optional Markdown template with placeholders like {title}, {pmid}, {citation_key}. include_csl_json: Write references.csl.json beside notes for citation-manager handoff.
Returns: JSON with output_dir, written files, skipped files, index path, and wiki_validation.
Examples: save_literature_notes(pmids="last") save_literature_notes(pmids="last", note_format="medpaper", output_dir="./references") save_literature_notes(pmids="12345678,87654321", template_file="./ref-template.md")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pmids | No | last | |
| output_dir | No | ||
| note_format | No | wiki | |
| include_abstract | No | ||
| overwrite | No | ||
| create_index | No | ||
| collection_name | No | ||
| template_file | No | ||
| include_csl_json | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |