Skip to main content
Glama

Pubmed Format Citations

pubmed_format_citations
Read-only

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. Retractions, errata, and expressions of concern NCBI links to an article come back in notices; Vancouver and APA also cite a retraction in the reference itself.

Input 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

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 changed
    • changedOutput schema / properties / citations / items / properties / citations / description
      Previous value: -"Citations keyed by style"New value: +"Citations keyed by style. APA and MLA are Markdown — the journal, volume and book title in *italics*, every other character of the record escaped so it renders as written; BibTeX, RIS and Vancouver are plain text."
  2. Changed1 schema field changed
    • addedOutput schema / properties / citations / items / properties / notices
      Added value: +{
      +  "description": "Retraction, erratum, and expression-of-concern notices NCBI links to this article, in NCBI's order. Vancouver notes each `RetractionIn` and `ErratumIn` after the reference and APA each `RetractionIn`; the other types, and MLA, BibTeX, and RIS, carry none, so check this before citing. Absent when NCBI links none.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "A linked notice that qualifies the cited article",
      +    "properties": {
      +      "note": {
      +        "description": "NCBI's note on the link, e.g. the correction an erratum makes. Absent when NCBI gives none.",
      +        "type": "string"
      +      },
      +      "pmid": {
      +        "description": "PMID of the notice — pass it to `pubmed_fetch_articles` to read it. Absent when the notice has no PMID, as with many errata.",
      +        "type": "string"
      +      },
      +      "refSource": {
      +        "description": "Citation of the notice as NCBI writes it (e.g. \"Lancet. 2010 Feb 6;375(9713):445. doi: 10.1016/S0140-6736(10)60175-4.\").",
      +        "type": "string"
      +      },
      +      "refType": {
      +        "description": "NCBI's `RefType` for the link: RetractionIn, RetractedandRepublishedIn, ExpressionOfConcernIn, ErratumIn, or CorrectedandRepublishedIn.",
      +        "enum": [
      +          "RetractionIn",
      +          "RetractedandRepublishedIn",
      +          "ExpressionOfConcernIn",
      +          "ErratumIn",
      +          "CorrectedandRepublishedIn"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "refType",
      +      "refSource"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  3. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `queue_full`: The local NCBI request queue shed the call — the queue is full, or the call cannot start before its total deadline (for example behind the cooldown that follows an NCBI 429). `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."New value: +"Machine-readable failure mode. Declared by this tool: `queue_full`: The local NCBI request queue shed the call — the queue is full, or the call cannot start before its total deadline (for example behind the cooldown that follows an NCBI 429). `ncbi_unreachable`: NCBI E-utilities failed on every attempt the retry budget allowed — retries ran out, or the next backoff would overrun the total deadline. `ncbi_rate_limited`: NCBI answered HTTP 429 (too many requests) and the call stopped on it — retries ran out, the next backoff would overrun the total deadline, or the Retry-After NCBI named outlasts the time left or the 30-second backoff cap. `ncbi_deadline_exceeded`: The total NCBI request deadline expired before NCBI answered successfully — mid-request, while queued, or during a retry backoff. `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."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "queue_full",
      -  "ncbi_unreachable",
      -  "ncbi_deadline_exceeded",
      -  "ncbi_invalid_response",
      -  "ncbi_resource_not_found"
      -]New value: +[
      +  "queue_full",
      +  "ncbi_unreachable",
      +  "ncbi_rate_limited",
      +  "ncbi_deadline_exceeded",
      +  "ncbi_invalid_response",
      +  "ncbi_resource_not_found"
      +]
  4. Changed1 schema field changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"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."New value: +"Machine-readable failure mode. Declared by this tool: `queue_full`: The local NCBI request queue shed the call — the queue is full, or the call cannot start before its total deadline (for example behind the cooldown that follows an NCBI 429). `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."
  5. Changed1 schema field changed
    • 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."
  6. Changed6 schema fields changed
    • 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"
      -]
  7. Changed3 schema fields changed
    • 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"
      +}
  8. Changed1 schema field changed
    • changedInput schema / properties / format / anyOf
      Previous value: -[
      -  {
      -    "enum": [
      -      "apa",
      -      "mla",
      -      "bibtex",
      -      "ris"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "items": {
      -      "enum": [
      -        "apa",
      -        "mla",
      -        "bibtex",
      -        "ris"
      -      ],
      -      "type": "string"
      -    },
      -    "minItems": 1,
      -    "type": "array"
      -  }
      -]New 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"
      +  }
      +]
  9. Changed2 schema fields changed
    • addedInput schema / properties / format
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "apa",
      +        "mla",
      +        "bibtex",
      +        "ris"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "items": {
      +        "enum": [
      +          "apa",
      +          "mla",
      +          "bibtex",
      +          "ris"
      +        ],
      +        "type": "string"
      +      },
      +      "minItems": 1,
      +      "type": "array"
      +    }
      +  ],
      +  "default": "apa",
      +  "description": "Citation format(s) to generate — single style as a string or multiple as an array. Allowed values: apa, mla, bibtex, ris."
      +}
    • removedInput schema / properties / styles
      Removed value: -{
      -  "default": [
      -    "apa"
      -  ],
      -  "description": "Citation styles to generate",
      -  "items": {
      -    "enum": [
      -      "apa",
      -      "mla",
      -      "bibtex",
      -      "ris"
      -    ],
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
  10. Changed1 schema field changed
    • addedOutput schema / properties / citations / items / description
      Added value: +"Citations for a single article"
  11. Changed4 schema fields changed
    • addedOutput schema / properties / totalFormatted
      Added value: +{
      +  "description": "Number of PMIDs successfully formatted",
      +  "type": "number"
      +}
    • addedOutput schema / properties / totalSubmitted
      Added value: +{
      +  "description": "Number of PMIDs submitted for citation formatting",
      +  "type": "number"
      +}
    • addedOutput schema / properties / unavailablePmids
      Added value: +{
      +  "description": "Requested PMIDs that did not return article metadata",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "citations"
      -]New value: +[
      +  "citations",
      +  "totalSubmitted",
      +  "totalFormatted"
      +]
  12. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, and the description adds behavior not in structured fields: NCBI-linked retractions, errata, and expressions of concern surface in a `notices` field, and Vancouver/APA embed retraction notices in the reference itself. This is real behavioral context beyond the annotations, though permission/rate-limit or failure behavior is not covered.

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

Conciseness4/5

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

Three sentences with no filler; the capability and the format-passing mechanics are front-loaded, and the notices caveat follows in a compact clause. Slight redundancy between the parenthetical style list and the array/string sentence keeps it from a 5.

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?

With an output schema present, the description needn't document return values, yet it volunteers the one non-obvious output field (`notices`) and how retractions appear in references. For a two-parameter read-only tool this covers what an agent needs to call it correctly, leaving only sibling-routing guidance unaddressed.

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 both parameters, including the exact enum values and the string-or-array anyOf. The description restates that alternation and the style list without adding syntax, defaulting, or interaction details beyond what the schema carries, so baseline 3 applies.

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

Purpose4/5

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

The description states a specific verb ('Get formatted citations') and resource ('PubMed articles') and enumerates the supported styles (apa, mla, bibtex, ris, vancouver). It does not, however, distinguish itself from the sibling pubmed_lookup_citation, which an agent could plausibly confuse with this tool.

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?

It explains how to invoke the format parameter (single string vs. array) but never says when this tool is preferred over pubmed_lookup_citation or pubmed_fetch_articles. Usage is implied by the purpose rather than stated, with no exclusions or alternative-routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.