Skip to main content
Glama

Metis · Librarian — Extract Structured

extract_structured

Extract a structured, cited evidence brief from an indexed PDF library by running a fixed question set over a topic and returning a markdown table with one cited row per field.

Instructions

Extract a structured, cited evidence brief on a topic from the PDF library.

Elicit-style structured extraction: runs a fixed question set over the indexed
library (PaperQA2) and assembles a markdown table — one row per field, each
answer carrying its citations. Useful for systematic-review scaffolding.

Args:
    topic: The subject to extract on (e.g. "malaria rapid test sensitivity").
    fields: Optional comma-separated fields to extract. Default set covers
            population, design, sample size, outcome, finding, limitations.
    scope: Which index to query ("default" or "ph_library"). Build it first
           with index_library_pdfs().

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": {
      "topic": "<topic>"
    },
    "name": "extract_structured"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeNodefault
topicYes
fieldsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does disclose the key traits: it depends on a pre-built index, runs a fixed question set (not free-form querying), and every answer carries citations in a table output. It omits cost/latency expectations for an LLM-heavy extraction and what happens on an empty or missing index.

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 purpose and mechanism, then a clean Args block — every line earns its place. 'Elicit-style' is mildly jargon-dependent but conveys the output shape efficiently.

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?

A three-parameter tool with an output schema, so return values need not be explained; the description covers purpose, mechanism, prerequisites, and all parameters. The main remaining gap is failure behavior when the named scope has no index yet.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, yet the Args block defines all three parameters: topic with a concrete example, fields as comma-separated with the default field set enumerated, and scope with its value domain ('default' or 'ph_library') plus the dependency that the target index must be built first. This fully compensates for the undocumented 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?

States a specific verb (extract) and resource (structured, cited evidence brief from the PDF library) and specifies the mechanism — a fixed question set run over the PaperQA2 index assembled into a markdown table. This clearly separates it from plain retrieval siblings like search_pdf_knowledge or ask_library, which return passages rather than a field-by-field table.

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 a use case ('systematic-review scaffolding') and a hard prerequisite: build the index first with index_library_pdfs(). It does not explicitly say when to prefer this over ask_library or search_pdf_knowledge, so the agent must infer the boundary, but practical invocation guidance is present.

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

Deploy Server

Other Tools