Search all docs in the project
search_projectSearches all project text documents and returns matches with path, line, and column so you can locate terms, labels, citation keys, or phrases before editing.
Instructions
Searches every text doc in the project (like Overleaf's 'Search in project') and returns matches with path, line and column. Use it to find where a term, label, citation key or phrase appears before editing.
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": {
"query": "<query>"
},
"name": "search_project"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Text to search for, or a JavaScript regular expression if `regex` is true. | |
| regex | No | Treat `query` as a regular expression (JavaScript syntax, matched per line). | |
| project_id | No | Overleaf project id from list_projects or open_project. Opens the project if it is not already active. Pass it on every call when MCP sessions may change between calls. Writes without it only go to the project last confirmed by open_project or by a write naming it. | |
| max_results | No | Stop after this many matches (default: 200). | |
| path_contains | No | Only search docs whose path contains this substring, e.g. 'sec/'. | |
| case_sensitive | No | Match case exactly (default: false). | |
| include_comment_lines | No | Include matches on lines that are entirely LaTeX comments (starting with %). Default: true. |