extract_sections
Extract named sections like Abstract and Results from a local PDF using heading heuristics. Reports unmatched sections, so you know what is missing without failing the request.
Instructions
Return named sections from a local PDF using heading heuristics.
Not a trained parser: headings are matched case-insensitively with aliases
(e.g. Methodology ≡ Methods ≡ Materiais and Methods; Abstract ≡ Resumo).
Missing sections are listed in unmatched; they do not fail the tool.
Status values: ok, file_not_found, parse_error, invalid_path.
Does not fetch URLs — pdf_path must already exist in the workspace.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pdf_path | Yes | Workspace-relative path to a previously downloaded PDF. | |
| sections | Yes | Labels to extract, e.g. `["Abstract", "Methodology", "Results"]`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| message | No | ||
| pdf_path | Yes | ||
| sections | No | ||
| unmatched | No | ||
| error_code | No |