Count words
wordcountCounts the words in a compiled LaTeX project, including the root file and its input/include graph while excluding commands and comments; use it to answer document-length questions accurately.
Instructions
Word count of the document as it compiles — the root file plus its \input/\include graph, commands and comments excluded: {rootFile, total, files}. Use it for length questions instead of estimating from source. A project with no main document yet is an error, not a count of 0.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | No | Branch name (defaults to 'main'). Every result, error results included, echoes {branch, head} — head is the branch's current commit (after a write, the commit that write made). Pass the branch explicitly whenever you are not on main. | |
| project | No | Project id. Optional when the access token is scoped to exactly one project. |