Skip to main content
Glama

fh_library_read

Read a stored paper, drug label, or trial by ID as Markdown: get its heading outline, a specific section, or passages matching query terms, adding missing sources first.

Instructions

One piece of a stored document's Markdown, never the whole. No section/query: the outline (headings with word counts; full text or abstract only). section: that heading's own text (case-insensitive substring; a repeated heading as "Participants [3/12]"), capped at max_chars, its subsections listed. query: passages holding every term, each a window of at most 1000 chars with its section, best first, at most max_hits (more: how many further passages match); partial: true with missing_terms when no passage holds them all. section and query together: inside that section. A missing paper is added first (added: true).

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_read"
  }
}

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).
queryNoTwo or three distinctive terms the paper itself would use — a measure and a unit, an outcome and a group, a compound name — not the claim. Passages holding all of them are returned, else the best partial matches. With section: inside that section.
sectionNoHeading from the outline (case-insensitive substring).
max_hitsNoCap for query passages (default 5).
max_charsNoCap for section text (default 6000); passages are capped at 1000 chars each regardless.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.17

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations present the description carries the full burden and does so: it discloses truncation caps (max_chars, 1000 chars per passage), ordering (best first), degradation to partial matches with missing_terms, the count of further matching passages, subsection listing, repeated-heading disambiguation via "[3/12]", and the side effect that a missing paper is added first.

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 and free of filler, with each clause carrying a distinct rule. The telegraphic, semicolon-joined style is dense enough that mode boundaries take a second read, which costs it a point but not the content.

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 5-parameter tool with no output schema and no annotations, the description supplies the return shape (outline, section text, passages, added, partial, missing_terms) that structured fields do not. Error behavior for an unresolvable or malformed id is the main omission.

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%, so baseline is 3, but the description adds real semantic content beyond the schema: how section and query interact when both are given, what max_hits' overage count means, and that max_chars applies to section text while passages are separately capped.

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?

Names the resource (a stored document's Markdown) and enumerates the three disjoint retrieval modes by their controlling parameters (no section/query = outline, section = heading text, query = passages). The opening "One piece ... never the whole" also preempts the expectation that this returns a full paper, which no sibling name alone would convey.

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 explicit mode-selection rules tied to which parameters are supplied, plus the composing rule for section+query. It stops short of routing the agent to an alternative tool when the paper isn't in the library yet, only noting the implicit add-first behavior.

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