Skip to main content
License: Paperclip retrieves data from literature records returned by Paperclip, distributed under source-specific terms. Attribution to literature records returned by Paperclip is required when the data is redistributed. The client wrapper code is MIT-licensed. Please refer to the data terms for full terms.

Proto is not affiliated with GXL. This toolkit is open source and builds on the implementation produced by this organization. Product names, logos, and trademarks are the property of their respective owners.


evo-design/proto-tools
evo-design/proto-tools
View repo
paperclip.gxl.ai
Visit website
@miscpaperclip_literature
Copy citation
ProtoProtoevo-design/proto-tools
View source
Open Notebook
Open notebook
proto-tools on GitHub
Run locally with proto-tools
Toolkit contributors

Background

Paperclip is built by GXL to make the biomedical literature searchable and readable by researchers and AI agents. It indexes full-text papers from PubMed Central together with preprints from bioRxiv, medRxiv, and arXiv, plus a separate abstract-level index spanning all of these sources. Searches combine keyword matching with matching by meaning, so a relevant passage can be found even when it is worded differently from the query. Every paper has a stable identifier, such as PMC11754230, and its full text is served with numbered lines, which makes it easy to cite the exact lines that support a claim. GXL recommends finding papers first, then reading only the parts that matter. Search returns the most relevant papers for a topic, lookup resolves an identifier you already have, and grep finds every paper that mentions an exact term such as a gene name or accession. Reading a paper then means fetching a range of lines or the lines that match a pattern, rather than the whole text. All four tools query the live Paperclip service, so results reflect the literature at the time of the request. Each result also records where and when it was retrieved, so the same record can be traced back and checked later.

Learning Resources

  • Paperclip documentation (GXL) - official guide to the corpora, search options, and the command-line client.
  • Paperclip install guide (GXL) - connecting Paperclip’s MCP server to Claude Code, Claude Desktop, Codex, Cursor, and other agents.

Tools

Paperclip Literature Lookup (paperclip-literature-lookup)

Finds papers by one metadata field: DOI, PMID, PMC ID, arXiv ID, title, author, journal, or year.

API Reference

Source
enum
required
Metadata field to match, such as doi or pmid.Available options: doi, pmid, pmc, arxiv, title, author, journal, year
string
required
Value to look up in that field.
Source
integer
default:"10"
Maximum number of returned papers.
boolean
default:"True"
Whether each hit carries its abstract.
integer
default:"0"
Verbosity level (0=quiet, 1=info, 2=debug, 3=raw subprocess stderr). True is coerced to 1 and False to 0.
string
default:"cpu"
Device to run the tool on.
integer
default:"3600"
Maximum execution time in seconds, not counting time spent while a weights download keeps progressing. None waits indefinitely.
integer
Random seed. When set, tools run reproducibly up to small GPU float noise (see BaseToolOutput.approx_equal), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.
string
Paperclip API key; defaults to PAPERCLIP_API_KEY.
string
Paperclip bearer token, used when no API key is set; defaults to PAPERCLIP_TOKEN.
number
default:"120.0"
Maximum duration of one service operation.
Source
string
required
Metadata field that was matched.
string
required
Value that was looked up.
string
Paperclip result identifier.
List[PaperclipSearchHit]
Matching papers.
string
Version of the toolkit that produced the output, from its versions.yaml. Suffixed +dirty when the source no longer matches that version. See notes/versioning.md.

Applications

Use lookup to open a paper that another tool already identified, such as a PMID from NCBI or a DOI from a UniProt reference.

Usage Tips

  • Pass the returned document_id to paperclip-literature-document to read the paper.

Paperclip Literature Grep (paperclip-literature-grep)

Searches the full text of every paper for a regular expression and returns each matching paragraph with the paper and corpus it came from.

API Reference

Source
string
required
Regular expression matched against paper full text.
Source
integer
default:"50"
Maximum matching paragraphs returned.
boolean
default:"False"
Whether matching ignores case.
boolean
default:"False"
Whether to give the scan its full time budget.
integer
default:"0"
Verbosity level (0=quiet, 1=info, 2=debug, 3=raw subprocess stderr). True is coerced to 1 and False to 0.
string
default:"cpu"
Device to run the tool on.
integer
default:"3600"
Maximum execution time in seconds, not counting time spent while a weights download keeps progressing. None waits indefinitely.
integer
Random seed. When set, tools run reproducibly up to small GPU float noise (see BaseToolOutput.approx_equal), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.
string
Paperclip API key; defaults to PAPERCLIP_API_KEY.
string
Paperclip bearer token, used when no API key is set; defaults to PAPERCLIP_TOKEN.
number
default:"120.0"
Maximum duration of one service operation.
Source
string
required
Submitted regular expression.
string
Paperclip result identifier, when one was saved.
List[PaperclipGrepMatch]
Matching paragraphs, grouped by paper in match order.
string
required
Paperclip service the corpus was searched on.
string
Version of the toolkit that produced the output, from its versions.yaml. Suffixed +dirty when the source no longer matches that version. See notes/versioning.md.

Applications

Use grep to find every paper that mentions an exact gene, protein, dataset, or accession, including mentions in methods or data-availability sections that search can rank low.

Usage Tips

  • Corpus-wide grep is time-bounded, so repeated calls can return a different set or order of matches.
  • If a rare pattern returns nothing, retry with exhaustive=True to give the scan more time.

Paperclip Literature Document (paperclip-literature-document)

Reads one paper’s metadata plus a range of lines, the lines matching a pattern, or its full text. Every line is numbered, so evidence can be cited by line.

API Reference

Source
string
required
Stable Paperclip document identifier.
Source
enum
default:"lines"
What to read beyond metadata.Available options: metadata, lines, grep, full_text
integer
default:"1"
First line to read in lines mode (1-indexed, inclusive).
integer
default:"100"
Last line to read in lines mode (1-indexed, inclusive).
string
Regular expression to find in grep mode.
integer
default:"0"
Lines of context around each grep match.
integer
default:"20"
Most matching lines returned in grep mode.
boolean
default:"False"
Whether grep matching ignores case.
integer
default:"0"
Verbosity level (0=quiet, 1=info, 2=debug, 3=raw subprocess stderr). True is coerced to 1 and False to 0.
string
default:"cpu"
Device to run the tool on.
integer
default:"3600"
Maximum execution time in seconds, not counting time spent while a weights download keeps progressing. None waits indefinitely.
integer
Random seed. When set, tools run reproducibly up to small GPU float noise (see BaseToolOutput.approx_equal), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.
string
Paperclip API key; defaults to PAPERCLIP_API_KEY.
string
Paperclip bearer token, used when no API key is set; defaults to PAPERCLIP_TOKEN.
number
default:"120.0"
Maximum duration of one service operation.
Source
PaperclipDocument
required
Retrieved metadata and requested content.
string
Version of the toolkit that produced the output, from its versions.yaml. Suffixed +dirty when the source no longer matches that version. See notes/versioning.md.

Applications

Use these tools to collect source-backed design evidence and natural examples before applying sequence, structure, or mechanistic scoring tools.

Usage Tips

  • document_id takes a Paperclip id (PMC11754230, bio_29a07e4e799b, arx_2605.11347) or one as copied: lowercase pmc..., a PMC or Paperclip article link, or an arXiv id or link. Find a paper by DOI or PMID with paperclip-literature-lookup first.
  • The paper’s citation details come back typed in document.paper, the same fields a search hit carries.
  • Prefer read="lines" (the default, first 100 lines) or read="grep" with a pattern. max_matches (20 by default) caps how many matching lines a grep returns. GXL advises against reading whole papers.
  • read="full_text" returns the complete paper as content, which can be long.
  • Set PAPERCLIP_API_KEY before retrieval, or PAPERCLIP_TOKEN for a bearer token. The config fields paperclip_api_key and paperclip_token take precedence. The tools do not read credentials saved by an interactive paperclip login.
  • Without a key, europepmc-search and europepmc-fulltext search and read open-access PMC articles and preprints through Europe PMC’s public API, without line numbers.
  • PAPERCLIP_BASE_URL points the tools at a different Paperclip deployment.
  • Treat literature as evidence for candidate generation, not functional validation.

Toolkit Notes

These notes apply to all four Paperclip tools.
  • For interactive or agentic work, use the Paperclip MCP server. See the Paperclip install guide to connect it to your agent. These tools are for calling Paperclip from Python programs.
  • Requires authenticated network access. No literature database is bundled or synchronized locally; every call is an HTTPS request to the Paperclip service.
  • Runs in process on CPU. There is no environment to build and no worker to start; runtime is dominated by remote retrieval.
Example notebook: See the full working example for a copy-paste-ready walkthrough.

Infrastructure Guides

The following guides cover how to run tools efficiently and at scale.

Tool Persistence

Keep a tool’s model warm across calls instead of reloading it every invocation.

Device Management

How GPUs are allocated to tools and how to target specific devices.

Parallel Execution

Fan a batch of inputs out across multiple GPUs.