Skip to main content
Glama
kmaneesh

BioPython MCP Server

by kmaneesh

pubmed_fetch

Retrieve open access full-text articles from PubMed Central by providing a PMC ID. Supports XML or plain text format for structured data extraction or simplified reading. Ideal for accessing scientific literature programmatically.

Instructions

Fetch full-text article from PubMed Central (PMC).

This function retrieves open access full-text articles from PMC using the PMC OAI service. Only works for open access articles that have a PMC ID.

Args: pmc_id: PMC identifier (with or without 'PMC' prefix, e.g., "PMC123456" or "123456") format: Output format - "xml" for structured XML or "text" for plain text (default: "xml") timeout: Request timeout in seconds (default: 30)

Returns: Dictionary containing the full-text article and metadata: - success (bool): Whether fetch was successful - pmc_id (str): The PMC identifier - format (str): Format of returned content - content (str): Full-text article content - content_length (int): Length of content in characters - error (str): Error message if unsuccessful

Examples: >>> result = pubmed_fetch("PMC3539452") >>> if result["success"]: ... print(result["content"][:100])

>>> result = pubmed_fetch("3539452", format="text")
>>> print(result["content"])

Note: - Only works for open access articles - Articles without PMC IDs cannot be fetched - Rate limiting applies (use with entrez_rate_limit context manager) - XML format preserves structure (sections, figures, tables, references) - Text format provides simplified plain text extraction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pmc_idYes
formatNoxml
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the OAI service dependency, open access requirement, rate limiting, and return format (success/error dictionary). It could be more specific about rate limits or automatic error handling, but covers essential behavioral traits.

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?

The description is well-structured with introduction, Args, Returns, Examples, and Note sections. It is front-loaded with the core purpose. Every sentence adds value, with no filler.

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?

Given 3 parameters, no annotations, and existing output schema, the description is complete. It covers all essential aspects: what it fetches, prerequisites, parameters with examples, return structure, and limitations. The output schema is effectively described in the Returns section.

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 coverage is 0%, so the description must fully explain parameters. It does: pmc_id accepts with/without 'PMC' prefix, format specifies 'xml' or 'text', timeout in seconds. It also explains return fields. This compensates completely for the lack of schema descriptions.

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 clearly states the tool fetches full-text articles from PubMed Central (PMC) using the PMC OAI service, specifying it works only for open access articles with a PMC ID. This distinguishes it from siblings like pubmed_search (search) and entrez_fetch (generic fetch), giving a specific verb and resource.

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 description provides clear context: only for open access articles with PMC IDs, with rate limiting. Examples show usage. However, it does not explicitly compare to alternatives like entrez_fetch for other databases or pubmed_search for metadata, missing explicit when-not-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kmaneesh/biopython-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server