find_in_paper
Locate every occurrence of a text query inside a converted academic paper, returning section, offset, and snippet so you can jump straight to the passage discussing it.
Instructions
Find every occurrence of a query inside one converted paper.
Jumps to the part of a paper that discusses X instead of paging sections; search_cached_papers finds which paper mentions X.
Returns {query, paper_identifier, result_count, truncated, results: [{section_index, section, char_offset, match, snippet}, ...]}. Chain into
get_paper_section(identifier, str(section_index), offset=char_offset);
offsets align with that tool's stripped text. truncated means more
matches exist than max_results returned. paper_identifier is the
canonical cache key, which may differ from the spelling you passed
(arXiv:2301.00001v2 → 2301.00001v2).
Errors: not converted yet → {error, suggestion} naming the pipeline.
No matches is not an error — {result_count: 0, results: []}.
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": {
"identifier": "<identifier>",
"query": "<query>"
},
"name": "find_in_paper"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Text to find. Always matched literally — regex characters are escaped, so you cannot pass a pattern. | |
| normalize | No | Fold diacritics (NFKD + strip combining marks) before matching, so 'cafe' matches 'café' and vice versa. Offsets, match and snippet stay aligned to the original text. Word boundaries remain ASCII-oriented, so whole_words stays unreliable for non-Latin scripts. | |
| identifier | Yes | Paper identifier: arXiv ID, bioRxiv/medRxiv DOI, ACL Anthology ID/URL, DOI, PMID, PMCID (PMC...), or OpenAlex work ID (W...). Pipeline tools also accept freeform import labels. | |
| max_results | No | Max matches to return in document order. | |
| whole_words | No | Wrap the query in word boundaries so 'set' won't match 'subset'. Default False (substring match). | |
| case_sensitive | No | Match case-sensitively. Default False — academic prose capitalisation is unreliable. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||