Skip to main content
Glama
cyanheads

pubmed-mcp-server

by cyanheads

Pubmed Format Citations

pubmed_format_citations
Read-only

Generate formatted citations for PubMed articles in APA, MLA, BibTeX, RIS, or Vancouver by passing PubMed IDs. Supports single or multiple citation styles.

Instructions

Get formatted citations for PubMed articles in one or more formats (apa, mla, bibtex, ris, vancouver). Pass a single format as a string or multiple as an array.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pmidsYesPubMed IDs to cite
formatNoCitation format(s) to generate — single style as a string or multiple as an array. Allowed values: apa, mla, bibtex, ris, vancouver.apa

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNoOptional guidance when no citations were produced — points to discovery tools. Absent when at least one citation was produced.
citationsNoCitations per article
totalFormattedNoNumber of PMIDs successfully formatted
totalSubmittedNoNumber of PMIDs submitted for citation formatting
unavailablePmidsNoPMIDs PubMed returned no record for, so nothing could be cited for them. That is all this reports: PubMed omits a PMID it does not recognize silently, with no error and no reason, so the absence says nothing about whether the PMID exists. Use `pubmed_search_articles` to find PMIDs that do resolve.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.10.12
    • changedOutput schema / properties / unavailablePmids / description
      Previous value: -"Requested PMIDs that did not return article metadata"New value: +"PMIDs PubMed returned no record for, so nothing could be cited for them. That is all this reports: PubMed omits a PMID it does not recognize silently, with no error and no reason, so the absence says nothing about whether the PMID exists. Use `pubmed_search_articles` to find PMIDs that do resolve."
  2. Changed6 schema fields changedv2.10.4
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "citations",
      +      "totalSubmitted",
      +      "totalFormatted"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `queue_full`: Local NCBI request queue is at capacity. `ncbi_unreachable`: NCBI E-utilities is unreachable after all retry attempts. `ncbi_deadline_exceeded`: Total request deadline expired before NCBI returned a response. `ncbi_invalid_response`: NCBI returned a body that could not be parsed (invalid XML/JSON). `ncbi_resource_not_found`: NCBI returned a structured \"not found\" error for the requested ID(s). Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "queue_full",
      +            "ncbi_unreachable",
      +            "ncbi_deadline_exceeded",
      +            "ncbi_invalid_response",
      +            "ncbi_resource_not_found"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "citations",
      -  "totalSubmitted",
      -  "totalFormatted"
      -]
  3. Changed3 schema fields changedv2.9.1
    • changedInput schema / properties / format / anyOf
      Previous value: -[
      -  {
      -    "description": "Single citation style. One of: apa, mla, bibtex, ris.",
      -    "enum": [
      -      "apa",
      -      "mla",
      -      "bibtex",
      -      "ris"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "description": "Multiple citation styles to generate. Each entry: apa, mla, bibtex, or ris.",
      -    "items": {
      -      "enum": [
      -        "apa",
      -        "mla",
      -        "bibtex",
      -        "ris"
      -      ],
      -      "type": "string"
      -    },
      -    "minItems": 1,
      -    "type": "array"
      -  }
      -]New value: +[
      +  {
      +    "description": "Single citation style. One of: apa, mla, bibtex, ris, vancouver.",
      +    "enum": [
      +      "apa",
      +      "mla",
      +      "bibtex",
      +      "ris",
      +      "vancouver"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "description": "Multiple citation styles to generate. Each entry: apa, mla, bibtex, ris, or vancouver.",
      +    "items": {
      +      "enum": [
      +        "apa",
      +        "mla",
      +        "bibtex",
      +        "ris",
      +        "vancouver"
      +      ],
      +      "type": "string"
      +    },
      +    "minItems": 1,
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / format / description
      Previous value: -"Citation format(s) to generate — single style as a string or multiple as an array. Allowed values: apa, mla, bibtex, ris."New value: +"Citation format(s) to generate — single style as a string or multiple as an array. Allowed values: apa, mla, bibtex, ris, vancouver."
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Optional guidance when no citations were produced — points to discovery tools. Absent when at least one citation was produced.",
      +  "type": "string"
      +}
  4. Addedv2.7.6
  5. Removedv2.7.4
  6. Addedv2.3.2

TDQS

A3.8/5.0
Behavior3/5

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

Annotations declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered structurally. The description adds the format-selection flexibility (single vs array), which is useful, but does not disclose whether output is a string, dict keyed by format, pagination, or error behavior for invalid PMIDs. Adequate but thin for a networked lookup.

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?

Two sentences, no waste, front-loaded with the primary purpose followed immediately by the format flexibility. Every clause earns its place.

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

Completeness4/5

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

An output schema exists, so return shape need not be explained, and annotations cover the safety profile. The description is complete enough to invoke correctly, though it omits any note about when to prefer this tool over pubmed_lookup_citation.

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

Parameters3/5

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

Schema description coverage is 100% and the schema already documents pmids, format enum values, and the anyOf string/array flexibility in detail. The description restates the same single-vs-array pattern the schema already specifies, so it adds no meaning beyond structured fields. Baseline 3 is correct.

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?

States a specific verb (Get formatted citations) and resource (PubMed articles) with the exact formats supported. An agent can distinguish this from siblings like pubmed_lookup_citation (which likely does the reverse – citation to PMID) without opening the schema.

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

Usage Guidelines3/5

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

The description implies usage (get formatted citations for given PMIDs) but offers no explicit when-to-use guidance or mention of alternatives. In a crowded sibling set including pubmed_lookup_citation, the lack of routing guidance is a clear gap.

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