Skip to main content
Glama

fh_library_add

Downloads and stores a paper, drug label, or trial record by identifier, returns status JSON, and reuses stored full text while retrying failed sources or refreshing notices.

Instructions

Download and store one record — a paper (pmid:, doi:), a drug label (dailymed:) or a trial record (nct:<8 digits>) — and return its status JSON. A paper gets its record, abstract and correction notices from PubMed (Crossref for a DOI PubMed does not index), then the full text from the configured sources; a label or trial record is stored as a full text. A stored full text is returned without any download; an abstract-level record retries only sources that failed transiently; a record older than 30 days gets its notices re-read.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "fh_library_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesID as "type:value": a paper "pmid:30955454" (bare digits count as pmid) or "doi:10.5812/asjsm.110753" (a paper PubMed does not index; a DOI PubMed indexes is taken as its PMID), a drug label "dailymed:<set ID>" (the set ID from its DailyMed page URL), or a trial record "nct:05173896" (the eight digits; nct:NCT05173896 and a bare NCT05173896 are accepted).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.17

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does substantial work: it discloses source routing (PubMed, then Crossref fallback, then full-text sources), caching semantics ('a stored full text is returned without any download'), transient-failure-only retry behavior, and a 30-day staleness re-check for notices. Remaining gaps are auth/permission requirements, rate limiting, and what happens on unrecoverable fetch failure.

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?

Front-loaded with the action and scope, then layered behavior in a logical order (source routing, then cache/staleness rules). Information-dense with little waste, though the semicolon-chained second and third sentences pack several distinct rules together and would be easier to scan as separate clauses.

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?

For a single-parameter tool with no output schema and no annotations, the description covers input formats, network source fallbacks, caching, and staleness well. The one notable omission is the shape of the returned 'status JSON', which is the agent's only way to know success from failure in the absence of an output schema.

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% for the single 'id' parameter, so the schema already documents the type:value syntax in detail. The description restates the same formats (pmid, doi, dailymed:<set ID>, nct:<digits>) without adding new parsing rules, 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?

Opens with a specific verb pair and resource: 'Download and store one record', and enumerates the three accepted record kinds (paper, drug label, trial record) plus the return value ('status JSON'). It implicitly separates itself from fh_library_read by emphasizing storage, but never names a sibling, so sibling differentiation is inferred rather than stated.

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?

Usage is implied rather than prescribed: the description explains what happens for each input class (paper vs label vs trial) and for already-stored records, which helps an agent predict outcomes. There is no explicit 'use this when...' versus fh_library_read, fh_pubmed_fetch_articles, or fh_dailymed_search_labels, and no exclusion guidance.

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