Skip to main content
Glama
cyanheads

pubmed-mcp-server

by cyanheads

Pubmed Lookup Citation

pubmed_lookup_citation
Read-only

Convert partial bibliographic citations—journal, year, volume, page, or author—into PubMed IDs (PMIDs) using deterministic citation matching. Include at least a journal or year for a match.

Instructions

Look up PubMed IDs from partial bibliographic citations. Useful when you have a reference (journal, year, volume, page, author) and need the PMID — deterministic citation matching, more reliable than free-text search for structured references. Each citation must include at least journal or year (ECitMatch primary-keys on journal+volume+page; author-only or volume-only inputs guarantee no match); more fields = better match accuracy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
citationsYesCitations to look up, 1–25, each matched independently. More fields = better match accuracy.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
resultsNoMatch results, one per input citation
totalMatchedNoNumber of citations with PMID matches
totalWarningsNoNumber of matched citations that carry at least one warning
totalSubmittedNoNumber of citations submitted

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv2.10.19
    • removedInput schema / properties / citations / anyOf
      Removed value: -[
      -  {
      -    "description": "Up to 25 citations, each matched independently.",
      -    "items": {
      -      "description": "Citation to match against PubMed. Must include at least journal or year — ECitMatch primary-keys on journal+volume+page, so author-only or volume-only inputs guarantee no match.",
      -      "properties": {
      -        "authorName": {
      -          "description": "Author name, typically \"lastname initials\" (e.g., \"mann bj\"). Cannot contain a pipe (\"|\") or a line break.",
      -          "pattern": "^[^|\\r\\n]*$",
      -          "type": "string"
      -        },
      -        "firstPage": {
      -          "description": "First page number. Cannot contain a pipe (\"|\") or a line break.",
      -          "pattern": "^[^|\\r\\n]*$",
      -          "type": "string"
      -        },
      -        "journal": {
      -          "description": "Journal title or ISO abbreviation (e.g., \"proc natl acad sci u s a\"). Cannot contain a pipe (\"|\") or a line break.",
      -          "pattern": "^[^|\\r\\n]*$",
      -          "type": "string"
      -        },
      -        "key": {
      -          "description": "Arbitrary label to track this citation in results. Auto-assigned if omitted. Echoed back unchanged and never sent to NCBI, so any character is accepted here.",
      -          "type": "string"
      -        },
      -        "volume": {
      -          "description": "Volume number. Cannot contain a pipe (\"|\") or a line break.",
      -          "pattern": "^[^|\\r\\n]*$",
      -          "type": "string"
      -        },
      -        "year": {
      -          "description": "Publication year (e.g., \"1991\"). Cannot contain a pipe (\"|\") or a line break.",
      -          "pattern": "^[^|\\r\\n]*$",
      -          "type": "string"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "maxItems": 25,
      -    "minItems": 1,
      -    "type": "array"
      -  },
      -  {
      -    "description": "Citation to match against PubMed. Must include at least journal or year — ECitMatch primary-keys on journal+volume+page, so author-only or volume-only inputs guarantee no match.",
      -    "properties": {
      -      "authorName": {
      -        "description": "Author name, typically \"lastname initials\" (e.g., \"mann bj\"). Cannot contain a pipe (\"|\") or a line break.",
      -        "pattern": "^[^|\\r\\n]*$",
      -        "type": "string"
      -      },
      -      "firstPage": {
      -        "description": "First page number. Cannot contain a pipe (\"|\") or a line break.",
      -        "pattern": "^[^|\\r\\n]*$",
      -        "type": "string"
      -      },
      -      "journal": {
      -        "description": "Journal title or ISO abbreviation (e.g., \"proc natl acad sci u s a\"). Cannot contain a pipe (\"|\") or a line break.",
      -        "pattern": "^[^|\\r\\n]*$",
      -        "type": "string"
      -      },
      -      "key": {
      -        "description": "Arbitrary label to track this citation in results. Auto-assigned if omitted. Echoed back unchanged and never sent to NCBI, so any character is accepted here.",
      -        "type": "string"
      -      },
      -      "volume": {
      -        "description": "Volume number. Cannot contain a pipe (\"|\") or a line break.",
      -        "pattern": "^[^|\\r\\n]*$",
      -        "type": "string"
      -      },
      -      "year": {
      -        "description": "Publication year (e.g., \"1991\"). Cannot contain a pipe (\"|\") or a line break.",
      -        "pattern": "^[^|\\r\\n]*$",
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  }
      -]
    • changedInput schema / properties / citations / description
      Previous value: -"Citations to look up — an array of up to 25, or a single citation object. More fields = better match accuracy."New value: +"Citations to look up, 1–25, each matched independently. More fields = better match accuracy."
    • addedInput schema / properties / citations / items
      Added value: +{
      +  "description": "Citation to match against PubMed. Must include at least journal or year — ECitMatch primary-keys on journal+volume+page, so author-only or volume-only inputs guarantee no match.",
      +  "properties": {
      +    "authorName": {
      +      "description": "Author name, typically \"lastname initials\" (e.g., \"mann bj\"). Cannot contain a pipe (\"|\") or a line break.",
      +      "pattern": "^[^|\\r\\n]*$",
      +      "type": "string"
      +    },
      +    "firstPage": {
      +      "description": "First page number. Cannot contain a pipe (\"|\") or a line break.",
      +      "pattern": "^[^|\\r\\n]*$",
      +      "type": "string"
      +    },
      +    "journal": {
      +      "description": "Journal title or ISO abbreviation (e.g., \"proc natl acad sci u s a\"). Cannot contain a pipe (\"|\") or a line break.",
      +      "pattern": "^[^|\\r\\n]*$",
      +      "type": "string"
      +    },
      +    "key": {
      +      "description": "Arbitrary label to track this citation in results. Auto-assigned if omitted. Echoed back unchanged and never sent to NCBI, so any character is accepted here.",
      +      "type": "string"
      +    },
      +    "volume": {
      +      "description": "Volume number. Cannot contain a pipe (\"|\") or a line break.",
      +      "pattern": "^[^|\\r\\n]*$",
      +      "type": "string"
      +    },
      +    "year": {
      +      "description": "Publication year (e.g., \"1991\"). Cannot contain a pipe (\"|\") or a line break.",
      +      "pattern": "^[^|\\r\\n]*$",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / citations / maxItems
      Added value: +25
    • addedInput schema / properties / citations / minItems
      Added value: +1
    • addedInput schema / properties / citations / type
      Added value: +"array"
    • 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"
      +]
  2. Changed7 schema fields changedv2.10.18
    • addedInput schema / properties / citations / anyOf
      Added value: +[
      +  {
      +    "description": "Up to 25 citations, each matched independently.",
      +    "items": {
      +      "description": "Citation to match against PubMed. Must include at least journal or year — ECitMatch primary-keys on journal+volume+page, so author-only or volume-only inputs guarantee no match.",
      +      "properties": {
      +        "authorName": {
      +          "description": "Author name, typically \"lastname initials\" (e.g., \"mann bj\"). Cannot contain a pipe (\"|\") or a line break.",
      +          "pattern": "^[^|\\r\\n]*$",
      +          "type": "string"
      +        },
      +        "firstPage": {
      +          "description": "First page number. Cannot contain a pipe (\"|\") or a line break.",
      +          "pattern": "^[^|\\r\\n]*$",
      +          "type": "string"
      +        },
      +        "journal": {
      +          "description": "Journal title or ISO abbreviation (e.g., \"proc natl acad sci u s a\"). Cannot contain a pipe (\"|\") or a line break.",
      +          "pattern": "^[^|\\r\\n]*$",
      +          "type": "string"
      +        },
      +        "key": {
      +          "description": "Arbitrary label to track this citation in results. Auto-assigned if omitted. Echoed back unchanged and never sent to NCBI, so any character is accepted here.",
      +          "type": "string"
      +        },
      +        "volume": {
      +          "description": "Volume number. Cannot contain a pipe (\"|\") or a line break.",
      +          "pattern": "^[^|\\r\\n]*$",
      +          "type": "string"
      +        },
      +        "year": {
      +          "description": "Publication year (e.g., \"1991\"). Cannot contain a pipe (\"|\") or a line break.",
      +          "pattern": "^[^|\\r\\n]*$",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "maxItems": 25,
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "description": "Citation to match against PubMed. Must include at least journal or year — ECitMatch primary-keys on journal+volume+page, so author-only or volume-only inputs guarantee no match.",
      +    "properties": {
      +      "authorName": {
      +        "description": "Author name, typically \"lastname initials\" (e.g., \"mann bj\"). Cannot contain a pipe (\"|\") or a line break.",
      +        "pattern": "^[^|\\r\\n]*$",
      +        "type": "string"
      +      },
      +      "firstPage": {
      +        "description": "First page number. Cannot contain a pipe (\"|\") or a line break.",
      +        "pattern": "^[^|\\r\\n]*$",
      +        "type": "string"
      +      },
      +      "journal": {
      +        "description": "Journal title or ISO abbreviation (e.g., \"proc natl acad sci u s a\"). Cannot contain a pipe (\"|\") or a line break.",
      +        "pattern": "^[^|\\r\\n]*$",
      +        "type": "string"
      +      },
      +      "key": {
      +        "description": "Arbitrary label to track this citation in results. Auto-assigned if omitted. Echoed back unchanged and never sent to NCBI, so any character is accepted here.",
      +        "type": "string"
      +      },
      +      "volume": {
      +        "description": "Volume number. Cannot contain a pipe (\"|\") or a line break.",
      +        "pattern": "^[^|\\r\\n]*$",
      +        "type": "string"
      +      },
      +      "year": {
      +        "description": "Publication year (e.g., \"1991\"). Cannot contain a pipe (\"|\") or a line break.",
      +        "pattern": "^[^|\\r\\n]*$",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / citations / description
      Previous value: -"Citations to look up. More fields = better match accuracy."New value: +"Citations to look up — an array of up to 25, or a single citation object. More fields = better match accuracy."
    • removedInput schema / properties / citations / items
      Removed value: -{
      -  "description": "Citation to match against PubMed. Must include at least journal or year — ECitMatch primary-keys on journal+volume+page, so author-only or volume-only inputs guarantee no match.",
      -  "properties": {
      -    "authorName": {
      -      "description": "Author name, typically \"lastname initials\" (e.g., \"mann bj\"). Cannot contain a pipe (\"|\") or a line break.",
      -      "pattern": "^[^|\\r\\n]*$",
      -      "type": "string"
      -    },
      -    "firstPage": {
      -      "description": "First page number. Cannot contain a pipe (\"|\") or a line break.",
      -      "pattern": "^[^|\\r\\n]*$",
      -      "type": "string"
      -    },
      -    "journal": {
      -      "description": "Journal title or ISO abbreviation (e.g., \"proc natl acad sci u s a\"). Cannot contain a pipe (\"|\") or a line break.",
      -      "pattern": "^[^|\\r\\n]*$",
      -      "type": "string"
      -    },
      -    "key": {
      -      "description": "Arbitrary label to track this citation in results. Auto-assigned if omitted. Echoed back unchanged and never sent to NCBI, so any character is accepted here.",
      -      "type": "string"
      -    },
      -    "volume": {
      -      "description": "Volume number. Cannot contain a pipe (\"|\") or a line break.",
      -      "pattern": "^[^|\\r\\n]*$",
      -      "type": "string"
      -    },
      -    "year": {
      -      "description": "Publication year (e.g., \"1991\"). Cannot contain a pipe (\"|\") or a line break.",
      -      "pattern": "^[^|\\r\\n]*$",
      -      "type": "string"
      -    }
      -  },
      -  "type": "object"
      -}
    • removedInput schema / properties / citations / maxItems
      Removed value: -25
    • removedInput schema / properties / citations / minItems
      Removed value: -1
    • removedInput schema / properties / citations / type
      Removed value: -"array"
    • 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."
  3. Changed11 schema fields changedv2.10.12
    • changedInput schema / properties / citations / items / properties / authorName / description
      Previous value: -"Author name, typically \"lastname initials\" (e.g., \"mann bj\")"New value: +"Author name, typically \"lastname initials\" (e.g., \"mann bj\"). Cannot contain a pipe (\"|\") or a line break."
    • addedInput schema / properties / citations / items / properties / authorName / pattern
      Added value: +"^[^|\\r\\n]*$"
    • changedInput schema / properties / citations / items / properties / firstPage / description
      Previous value: -"First page number"New value: +"First page number. Cannot contain a pipe (\"|\") or a line break."
    • addedInput schema / properties / citations / items / properties / firstPage / pattern
      Added value: +"^[^|\\r\\n]*$"
    • changedInput schema / properties / citations / items / properties / journal / description
      Previous value: -"Journal title or ISO abbreviation (e.g., \"proc natl acad sci u s a\")"New value: +"Journal title or ISO abbreviation (e.g., \"proc natl acad sci u s a\"). Cannot contain a pipe (\"|\") or a line break."
    • addedInput schema / properties / citations / items / properties / journal / pattern
      Added value: +"^[^|\\r\\n]*$"
    • changedInput schema / properties / citations / items / properties / key / description
      Previous value: -"Arbitrary label to track this citation in results. Auto-assigned if omitted."New value: +"Arbitrary label to track this citation in results. Auto-assigned if omitted. Echoed back unchanged and never sent to NCBI, so any character is accepted here."
    • changedInput schema / properties / citations / items / properties / volume / description
      Previous value: -"Volume number"New value: +"Volume number. Cannot contain a pipe (\"|\") or a line break."
    • addedInput schema / properties / citations / items / properties / volume / pattern
      Added value: +"^[^|\\r\\n]*$"
    • changedInput schema / properties / citations / items / properties / year / description
      Previous value: -"Publication year (e.g., \"1991\")"New value: +"Publication year (e.g., \"1991\"). Cannot contain a pipe (\"|\") or a line break."
    • addedInput schema / properties / citations / items / properties / year / pattern
      Added value: +"^[^|\\r\\n]*$"
  4. 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": [
      +      "results",
      +      "totalMatched",
      +      "totalSubmitted",
      +      "totalWarnings"
      +    ]
      +  },
      +  {
      +    "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: -[
      -  "results",
      -  "totalMatched",
      -  "totalSubmitted",
      -  "totalWarnings"
      -]
  5. Changed1 schema field changedv2.9.1
    • changedInput schema / properties / citations / items / description
      Previous value: -"Citation to match against PubMed. Must include at least one bibliographic field (journal, year, volume, firstPage, or authorName)."New value: +"Citation to match against PubMed. Must include at least journal or year — ECitMatch primary-keys on journal+volume+page, so author-only or volume-only inputs guarantee no match."
  6. Addedv2.7.6
  7. Removedv2.7.4
  8. Addedv2.3.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnlyHint, openWorldHint), and the description adds real behavioral depth: ECitMatch's journal+volume+page keying, the guarantee that author-only/volume-only inputs return no match, and that more fields improve accuracy. Return values are covered by the output schema, so nothing essential is missing.

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 dense sentences, front-loaded with purpose and followed by the differentiating rationale and input constraints. There is minor overlap between the description and the nested schema description ('more fields = better match accuracy'), but no wasted prose.

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 single-parameter batch lookup with 100% schema coverage and an output schema, the description supplies everything needed: purpose, alternatives comparison, hard input requirements, and batch semantics. Nothing an agent needs to invoke it correctly is absent.

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

Parameters4/5

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

Schema coverage is 100% and each subfield is documented, so the baseline is 3; the description goes further by explaining the matching semantics — which field combinations are required versus which guarantee failure — adding meaning not visible from the schema alone.

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 (look up) and resource (PubMed IDs / PMIDs) from structured bibliographic citations, and explicitly differentiates itself from free-text alternatives ('more reliable than free-text search for structured references'), which maps to siblings like pubmed_search_articles.

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?

Gives a clear triggering condition ('when you have a reference (journal, year, volume, page, author) and need the PMID') and states the input prerequisite (at least journal or year). It contrasts with free-text search but does not name sibling tools such as pubmed_search_articles or pubmed_convert_ids directly.

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