Skip to main content
Glama
paper-retrieval

paper-retrieval

by zhangleiniu

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PR_DATA_ROOTYesWhere snapshots, indexes, and logs go.
PR_LLM_MODELNoModel name for the OpenAI-compatible endpoint used by the optional LLM judge.
PR_LLM_API_KEYNoAPI key for the OpenAI-compatible endpoint used by the optional LLM judge.
PR_INTENT_MODELNoA directory holding a trained citation-intent model (model.json + model.npz). Without one, relation_type="baseline" ranks like "any" and citation neighbors carry no baseline probability.
PR_LLM_BASE_URLNoBase URL for an OpenAI-compatible endpoint (e.g. vLLM) used by the optional LLM judge.
PR_METADATA_DIRYesOpenPapers' metadata/ directory.
PR_FULLTEXT_ROOTYesThe toolkit's data directory (the parquet's path column is relative to it).
PR_CORPUS_PARQUETYesThe toolkit's all_papers_with_refs.parquet (may contain {run_id}).
PR_SNAPSHOT_RUN_IDYesA name for this corpus version, e.g. 2026-11.
PR_CORPUS_DESCRIPTIONNoHow the tools describe your corpus to agents (optional).

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Paper search over the paper corpus (with full text and an in-corpus citation graph). Start with find_papers, passing the user's question verbatim as both query and original_query. For follow-ups keep original_query = the verbatim question and put the sub-question in query. Cite papers by their url.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
find_papersA

Search the paper corpus (with full text and an in-corpus citation graph) for papers matching a research question. Runs the full pipeline: keyword and embedding search over titles, abstracts and full-text passages, citation-graph expansion, and cross-encoder reranking. This is the main entry point. ALWAYS pass the user's question verbatim, unchanged, as original_query on every call. Put your own rewrite or sub-question in query. On the first call pass the verbatim question as both. Results for the original question are always fused in, so a narrow rewrite cannot lose them. Each result has paper_id, title, venue, year, url (cite this), ranks per retrieval channel, and an evidence passage: judge relevance yourself from the title and the passage. If the results clearly miss the question, rephrase and search again.

find_related_papersA

Paper-to-paper search: papers related to a given paper (what it builds on, compares with, or would cite, plus close work). Give exactly one of paper_id (from a previous result), url (landing page, openreview link, or DOI of an in-corpus paper), or text (title and abstract of a paper outside the corpus; read the PDF yourself and pass its title + abstract).

search_passagesA

Passage-level search over full text (keyword + embedding). Use it to verify a candidate or find where a paper discusses something, optionally restricted to given papers. Returns passages with paper_id, section, text.

exact_searchB

Exact, case-insensitive match of a term (method name, dataset name, notation) in titles, abstracts and passages. Without paper_ids, passages are checked among the top 20,000 keyword hits; titles and abstracts in full.

get_paperA

Metadata, abstract, and section list of a paper. With section (a heading or its number as listed), the full text of that section.

get_citation_neighborsB

In-corpus citation neighbors of a paper: refs (papers it cites) or cited_by (papers citing it), each with P(baseline) of the citation (a classifier of citation intent: baseline / direct comparison / core reference) and the citing sentence. intent: baseline keeps only edges classified as baseline, other the rest.

get_research_profileA

The passages to read for a research profile of a paper (problem, method, assumptions, findings, limitations): its abstract, the start of the introduction, method sections, and the conclusion, in document order with passage ids (about 14,000 characters). Summarize them yourself, citing passage ids.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 7 tools

Disambiguation4/5

The tools have mostly distinct retrieval goals: broad question search, passage search, exact term matching, related-paper discovery, metadata/section retrieval, citation neighbors, and research-profile extraction. There is some conceptual overlap between search_passages, exact_search, and get_paper with section retrieval, but the descriptions provide clear boundaries for when to use each.

Naming Consistency4/5

Most names follow a clear verb_noun pattern such as find_papers, search_passages, get_paper, and get_citation_neighbors. exact_search is the main deviation, using an adjective_noun form, but it is still readable and consistent enough overall.

Tool Count5/5

Seven tools is a well-scoped set for a paper retrieval server, with each tool covering a distinct retrieval mode or evidence-gathering need. No tool appears redundant or out of place.

Completeness4/5

The server covers semantic search, passage verification, exact matching, related work, metadata, citation context, and research-profile extraction. Minor gaps might include author/venue filtering or batch paper comparison, but the core retrieval lifecycle is well represented.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues