Skip to main content
Glama

prepare_export

Convert PubMed citations into RIS, BibTeX, Medline, or CSV formats for EndNote, Zotero, Mendeley, and LaTeX. Provide PMIDs or use 'last' to export previous search results.

Instructions

Export citations to reference manager formats.

╔═══════════════════════════════════════════════════════════════════╗ ║ RECOMMENDED: Use source="official" (default) for best quality ║ ╚═══════════════════════════════════════════════════════════════════╝

When to Use

  • Exporting references to EndNote, Zotero, Mendeley

  • Creating BibTeX for LaTeX documents

  • Generating citation lists for manuscripts

Source Options

Source

Formats

Quality

Speed

official

ris, medline, csl

★★★★★

Fast

local

ris, bibtex, csv, medline, json

★★★★

Fast

Format Selection Guide

  • ris: EndNote, Zotero, Mendeley (official recommended)

  • medline: NBIB format for PubMed tools

  • csl: JSON for programmatic citation styling

  • bibtex: LaTeX documents (local only)

  • csv: Data analysis, Excel (local only)

Args: pmids: Articles to export. Accepts: - "last" → results from previous search - "12345678,87654321" → comma-separated PMIDs - ["12345678", "87654321"] → list of PMIDs - "PMID:12345678" → with prefix format: Export format (default: "ris") - official API: ris, medline, csl - local only: bibtex, csv, json include_abstract: Include abstracts in output (default: True). False requires source="local"; official payloads are returned unmodified. source: Citation source (default: "official") - "official": NCBI Citation API (recommended, best quality) - "local": Local formatting (more formats, offline capable)

Returns: JSON with status and export_text containing formatted citations.

Examples: # Export last search results (recommended) prepare_export(pmids="last", format="ris")

# Export specific PMIDs to BibTeX
prepare_export(pmids="12345678,87654321", format="bibtex", source="local")

# Get CSL-JSON for programmatic use
prepare_export(pmids="last", format="csl", source="official")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pmidsYes
formatNoris
sourceNoofficial
include_abstractNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.7.2
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / format / enum
      Added value: +[
      +  "ris",
      +  "medline",
      +  "csl",
      +  "bibtex",
      +  "csv",
      +  "json"
      +]
    • changedInput schema / properties / pmids / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "items": {},
      -    "type": "array"
      -  },
      -  {
      -    "type": "integer"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 100000,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "maxLength": 512,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "maxItems": 1000,
      +    "minItems": 1,
      +    "type": "array"
      +  }
      +]
    • addedInput schema / properties / source / enum
      Added value: +[
      +  "official",
      +  "local"
      +]
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "prepare_exportOutput",
      -  "type": "object"
      -}New value: +null
  2. First observedv0.5.16

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description goes well beyond the annotations by disclosing source-specific behavior, format restrictions, and a critical constraint: setting include_abstract=False requires source='local', while official payloads are returned unmodified. It also states the return shape despite the lack of an output schema, providing the agent with essential runtime expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Although long, the description is well-organized with tables, section headings, and examples. Every section adds operational value, and the recommendation for source='official' is front-loaded. The length is justified by the tool's multiple interacting options and format-specific constraints.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with four parameters, no output schema, and format/source interactions, the description is remarkably complete. It covers input formats, format-by-source compatibility, return value shape, and includes three realistic examples. An agent has enough information to call this tool correctly in varied scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden. It thoroughly explains the pmids accepted forms ('last', comma-separated, list, 'PMID:' prefix), maps each format to its intended use, and clarifies source semantics. This adds substantial meaning beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Export citations to reference manager formats.' It clearly differentiates this tool from sibling search, retrieval, and analysis tools by listing concrete output formats such as RIS, BibTeX, and CSL, making its purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'When to Use' section explicitly names real-world scenarios like exporting to EndNote, Zotero, Mendeley, and generating BibTeX for LaTeX. It does not name alternatives to avoid, but the context is clear enough that an agent can infer when this tool is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.