Skip to main content
Glama

Extract structured fields from papers

extract_from_papers
Read-onlyIdempotent

Extract structured tables from up to 50 papers by defining custom fields and instructions. Get one typed row per paper for consistent fact extraction across multiple papers.

Instructions

Pull a structured table out of up to 50 papers in ONE call: you define the columns (fields: each a snake_case name, a type, and an optional description) and an instruction, and the server reads each paper's full text and returns one typed row per paper. Use this when you need the SAME facts across many papers, e.g. "dataset, model size, and reported accuracy for each of these papers", instead of reading each full text yourself and transcribing by hand. Pass sections (case-insensitive headings, e.g. ["Results"]) to focus extraction and cut noise. The model is instructed to use only what each paper states, not to infer; a field it can't ground may be absent or null. Each row carries truncated (true when the paper's text overflowed the budget and the tail was dropped, so treat it as partial). A paper with no parsed full text, or one the model couldn't extract, is reported in papers_failed (with a reason) instead of sinking the batch, so papers_processed == rows + failures. Heavy: one model call per paper, so extract only papers you already judged relevant from a search or citation result. For the raw text of a single paper, use get_paper_fulltext instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsYes1 to 12 fields to extract per paper. Each becomes a typed column on every row, keyed by its `name`.
sectionsNoRestrict extraction to these sections (case-insensitive heading match), e.g. ["Results", "Experiments"]. Omit to consider the whole paper.
paper_idsYes1 to 50 Lune paper UUIDs to extract from in ONE call. Take them from a `search_papers` / `search_papers_many` / `search_related_papers` / `get_paper_citations` result.
instructionYesNatural-language guidance for the extraction (e.g. "Pull the primary evaluation dataset and the headline accuracy"). The model is told to use only what the paper states.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYesOne row per successfully extracted paper.
papers_failedYesPapers that yielded no row; recorded here instead of sinking the batch. Empty when every paper extracted.
papers_processedYesTotal papers attempted; equals rows.length + papers_failed.length.
Behavior5/5

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

Annotations already provide readOnlyHint, openWorldHint, idempotentHint, destructiveHint. The description adds critical behavioral details: model uses only stated facts, may leave fields null, truncation flag, failed papers reported separately, and the heavy cost. No contradictions.

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?

The description is relatively long but each sentence adds value. It is front-loaded with the main action and structured logically. Minor redundancies (e.g., 'the model is instructed to use only what each paper states' appears twice) could be trimmed, but overall efficient.

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

Completeness5/5

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

For a complex tool with 4 parameters and output schema (not shown), the description covers edge cases (truncation, failed papers), usage constraints (heavy cost, relevance prerequisite), and distinguishes from siblings. It leaves no major gaps for an AI agent to misunderstand.

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. The description adds practical context for each parameter: fields define columns, instruction is natural-language guidance, sections focus extraction, paper_ids come from search results. It provides meaningful usage guidance beyond the schema.

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 core action: 'Pull a structured table out of up to 50 papers in ONE call: you define the columns...' It specifies the verb (extract), resource (papers), and the structured output. It distinguishes from siblings like get_paper_fulltext (single paper raw text) and gather_evidence.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use guidance: 'Use this when you need the SAME facts across many papers... instead of reading each full text yourself and transcribing by hand.' Also provides a when-not-to-use hint: 'Heavy: one model call per paper, so extract only papers you already judged relevant.' Contrasts with get_paper_fulltext.

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

Install Server

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/RetrogradeLabs/lune-mcp-server'

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