Check references, citations and included files
check_referencesChecks LaTeX cross-references and citations from source without compiling, flagging missing labels, unmatched cite keys, duplicate definitions, and missing included or bibliography files.
Instructions
Check a LaTeX document's cross-references and citations from its source, without compiling: \ref, \eqref, \cref and similar with no matching \label; \cite keys found in no .bib file or \bibitem; labels and bibliography keys defined twice; and \input, \include, \includegraphics and bibliography files that do not exist. Use it before push_changes or a compile, and after renaming a label, a citation key or a figure. It starts at the main document and follows \input, \include, \subfile and \import, so a .tex file the document never includes is listed, not checked. Comments and verbatim blocks are ignored, and a path or key built from a macro is counted rather than guessed. Pulls from Overleaf first. Returns a verdict line with the number of problems, each problem with its file and line, then labels never referenced and bibliography entries never cited, which are worth a look but are not errors.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "check_references"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Which project to use: its Overleaf address, its 24-character id, or a registered project name. Omit to use the default project. | |
| mainTexFile | No | Root document to start from, as a path in the project, e.g. main.tex. Omit to use the likely main document, the same guess project_summary makes. |