Skip to main content
Glama

get_abstract

Retrieve the full abstract of a PubMed article using its PMID.

Instructions

Retrieve full abstract for a given PubMed ID (PMID).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pmidYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • server.py:28-35 (handler)
    The get_abstract async function that fetches a PubMed abstract by PMID via the NCBI efetch API and returns the raw text.
    @mcp.tool()
    async def get_abstract(pmid: str) -> str:
        """Retrieve full abstract for a given PubMed ID (PMID)."""
        async with httpx.AsyncClient() as client:
            r = await client.get(f"{PUBMED_BASE}/efetch.fcgi", params={
                "db": "pubmed", "id": pmid, "rettype": "abstract", "retmode": "text"
            })
            return r.text
  • server.py:28-28 (registration)
    The tool is registered via the @mcp.tool() decorator on the get_abstract function.
    @mcp.tool()
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It only states 'Retrieve full abstract', but does not disclose any behavioral traits such as error handling, rate limits, or whether the operation is read-only. Minimal transparency.

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 a single, front-loaded sentence with no wasted words. It efficiently conveys the tool's core function.

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

Completeness3/5

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

Given the tool's simplicity (one required parameter, no nested objects, and an output schema exists), the description is adequate but incomplete. It does not specify what the output contains (e.g., abstract text) or handle edge cases.

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

Parameters2/5

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

Schema description coverage is 0%, and the description only mentions 'given PubMed ID (PMID)' for the pmid parameter. It adds little beyond the parameter name, which is already descriptive. For a single parameter, it does not compensate for the lack of schema documentation.

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 verb 'Retrieve' and the resource 'full abstract for a given PubMed ID (PMID)'. It distinguishes itself from sibling tools like search_pubmed or get_citations by specifying it retrieves the abstract for a single PMID.

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 use when you have a PMID and want the abstract, but it does not explicitly state when to use this tool versus alternatives like search_pubmed or find_reviews. No usage context or exclusions are provided.

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

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/pubspro/pubmed-search'

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