Skip to main content
Glama
coolport
by coolport

latexmk-mcp

A Model Context Protocol server for latexmk that exposes LaTeX compilation, log parsing, dependency inspection, citation checking, and other utilities as MCP tools for any compatible AI agent or client.

NPM Version NPM Downloads CI

Prerequisites

  • Node.js 18+

  • latexmk on $PATH — bundled with most TeX distributions (TeX Live, MiKTeX)

  • A TeX distribution with the engines and packages your project requires

# Debian/Ubuntu
sudo apt install latexmk texlive-full

# macOS
brew install --cask mactex

# Arch Linux
sudo pacman -S texlive

Related MCP server: FastMCP LaTeX Server (tex-mcp)

Usage

Add this to your MCP client configuration:

{
  "mcpServers": {
    "latexmk": {
      "command": "npx",
      "args": ["-y", "latexmk-mcp"]
    }
  }
}

The example above applies for clients such as Gemini CLI, Claude Code, etc. Additionally, some tools allow you to add MCP servers imperatively:

codex mcp add latexmk -- npx -y latexmk-mcp

Global install via npm

Alternatively, you can install the package globally and invoke it directly without npx:

npm install -g latexmk-mcp
which latexmk-mcp  # note the absolute path

Then point your MCP client at the local binary using node:

{
  "mcpServers": {
    "latexmk": {
      "command": "node",
      "args": ["/absolute/path/to/node/vX.Y.Z/bin/latexmk-mcp"]
    }
  }
}

Development

bun install
bun test
bun run build
node dist/index.js

Tools

latexmk_compile

Full compile of a LaTeX document with configurable engine, output format, bibliography processor, and latexmk flags.

Parameter

Type

Default

Description

tex_content

string

Raw LaTeX source (mutually exclusive with file_path)

file_path

string

Path to existing .tex file

output_format

pdf|dvi|ps|xdv

pdf

Target format

engine

pdflatex|xelatex|lualatex|latex|pdftex

pdflatex

TeX engine

bibtex

bibtex|biber|none

none

Bibliography processor

shell_escape

boolean

false

Enable --shell-escape

synctex

boolean

false

Generate SyncTeX data

extra_args

string[]

[]

Extra latexmk CLI flags

working_dir

string

temp dir

Build directory

return_pdf

boolean

false

Return compiled PDF as base64 when building PDF output

Returns: success, exit_code, output_file, page_count, structured errors[], structured warnings[], missing_packages[], install_hints[], working_dir, stdout, stderr, and optional pdf_base64.

latexmk_draft_compile

Fast single-pass compile (no reruns, no bibliography) — ideal for quick syntax/error checks while editing.

Parameter

Type

Default

Description

tex_content

string

Raw LaTeX source

file_path

string

Path to .tex file

engine

string

pdflatex

TeX engine

working_dir

string

temp dir

Build directory

Returns: success, structured errors[], structured warnings[], missing_packages[], install_hints[], stdout, stderr.

latexmk_clean

Remove build artifacts using latexmk -c (auxiliaries only) or latexmk -C (auxiliaries + output files).

Parameter

Type

Default

Description

working_dir

string

required

Directory to clean

job_name

string

Clean a specific job only

clean_all

boolean

false

-C instead of -c

latexmk_check

Detect whether latexmk is installed and which TeX engines are available on the system.

Returns: latexmk_available, latexmk_version, latexmk_path, engines_available map.

latexmk_list_dependencies

List all file dependencies of a document (included .tex files, .bib files, packages, images…) via latexmk -deps.

Parameter

Type

Description

tex_content

string

Raw LaTeX source

file_path

string

Path to .tex file

working_dir

string

Working directory

Returns: dependencies[] (deduplicated list of file paths).

latexmk_watch_start / latexmk_watch_stop / latexmk_watch_list

Manage background latexmk -pvc watch sessions. Start returns a session_id; stop terminates it; list shows active sessions with PID, job name, and start time.

latexmk_write_config / latexmk_read_config

Write or inspect .latexmkrc files. The write tool can set engine, output mode, shell escape, extra pdflatex args, and custom Perl rules.

latexmk_list_citations

Extract citation keys from LaTeX source and optionally compare them to a .bib file.

Returns: cited_keys[], cited_count, and when bib_path is provided, bib_entries[], missing_from_bib[], and unused_in_bib[].

License

MIT

Available Tools

11 tools
latexmk_checkA

Check whether latexmk is installed and which TeX engines are available on this system.

ParametersJSON Schema
NameRequiredDescriptionDefault
working_dirNoOptional working directory (not required for this check)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It conveys a read-only, non-mutating action via 'Check', but it does not disclose the return format, how it indicates absence of latexmk, or any potential side effects. For a simple check tool this is acceptable but not fully transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one concise sentence, front-loaded with the verb 'Check', and contains no unnecessary words or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple: one optional parameter, no output schema, and a straightforward purpose. The description is adequate for an agent to understand what to call and why, though it could benefit from stating the expected output type. Given the low complexity, this is nearly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema's single parameter 'working_dir' is fully described as optional and not required for this check, achieving 100% schema description coverage. The description adds a subtle point about checking 'on this system', implying system-wide scope, but this is not a significant addition beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Check' and clearly identifies the resources: 'latexmk is installed' and 'which TeX engines are available'. This unambiguously distinguishes it from the sibling compile, watch, and config tools, which have different actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies clear usage: verify the TeX environment before compilation. However, it does not explicitly state when not to use it or name alternative tools, though the sibling list shows no other check tool, making the context clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

latexmk_cleanA

Clean LaTeX build artifacts in a directory using latexmk -c (auxiliary files only) or latexmk -C (auxiliary + output files).

ParametersJSON Schema
NameRequiredDescriptionDefault
job_nameNoSpecific job name (base filename without extension). Cleans all if omitted.
clean_allNoIf true, uses -C to also remove output files (PDF/DVI/PS). If false, uses -c for auxiliary files only.
working_dirYesDirectory containing the LaTeX build artifacts

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of disclosure. It explains that the tool deletes auxiliary files, optionally output files, and uses latexmk -c/-C. However, it does not mention prerequisites (e.g., working_dir existence), error conditions, or that deletion is irreversible—though 'removes output files' conveys destructiveness.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that efficiently conveys the core functionality and the two modes. Every word earns its place, with no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter tool with no output schema, the description adequately explains the two cleaning modes and their effects. It could be improved by noting return behavior or failure scenarios, but the essential information for invoking the tool correctly is present and clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters. The tool description does not add additional parameter meaning beyond what the schema provides (e.g., job_name, clean_all, working_dir semantics are already in the schema). Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: cleaning LaTeX build artifacts in a directory, with a specific verb ('Clean') and resource. It distinguishes between two modes (auxiliary files only vs. auxiliary + output files), which also differentiates it from sibling compile/check/watch tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when LaTeX build artifacts need to be removed, and explains the two modes (auxiliary vs. output files). However, it does not explicitly compare with alternatives like latexmk_compile or latexmk_check, nor does it state when not to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

latexmk_compileB

Compile a LaTeX document using latexmk. Accepts raw LaTeX source or a path to an existing .tex file. Returns structured errors, warnings, missing package hints, page count, and the output file path.

ParametersJSON Schema
NameRequiredDescriptionDefault
bibtexNoBibliography processornone
engineNoTeX engine to usepdflatex
synctexNoGenerate SyncTeX data
file_pathNoAbsolute path to an existing .tex file (mutually exclusive with tex_content)
extra_argsNoExtra latexmk CLI arguments to pass through
return_pdfNoInclude the compiled PDF as base64 in the response when output_format is pdf.
tex_contentNoLaTeX source content (mutually exclusive with file_path)
working_dirNoWorking directory. Defaults to a fresh temp directory.
shell_escapeNoEnable --shell-escape
output_formatNoTarget output formatpdf

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It does disclose the structured return values (errors, warnings, package hints, page count, output path), which adds useful context. However, it does not mention side effects, execution time, or failure modes (e.g., if latexmk is not installed), leaving significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the action and immediately followed by a concise summary of return values. Every word earns its place with no repetition or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 10 parameters and no output schema, the description covers the core operation and return values but lacks contextual guidance. It does not address the return_pdf option, working directory semantics, or how to interpret the structured output, and it does not position itself relative to sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with all parameters having descriptions, so the baseline is 3. The tool description adds no per-parameter detail beyond the schema, though it does reiterate that both raw source and file path are accepted, which is already in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Compile a LaTeX document using latexmk' and lists the two input modes (raw source or file path), making the core purpose unambiguous. However, it does not explicitly distinguish itself from the sibling latexmk_draft_compile, missing the opportunity for full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like latexmk_draft_compile, latexmk_watch_start, or latexmk_check. It only mentions input options, not decision criteria for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

latexmk_draft_compileA

Run a fast single-pass draft compile to quickly surface errors without running multiple passes or bibliography. Good for syntax/error checking during editing.

ParametersJSON Schema
NameRequiredDescriptionDefault
engineNopdflatex
file_pathNoAbsolute path to an existing .tex file
tex_contentNoLaTeX source content
working_dirNoWorking directory

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden, and it does disclose key behavioral traits: it is fast, single-pass, does not run bibliography, and surfaces errors. It does not mention side effects like file generation or cleanup, but for a compile tool the primary behavior is well covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core action, and every clause earns its place ('fast', 'single-pass', 'without running multiple passes or bibliography', 'Good for syntax/error checking'). There is no wasted wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has moderate complexity with 4 parameters and a oneOf constraint, but the schema already documents the input options well. The description adds the key contextual distinction of draft vs. full compile, which is critical given the sibling tools. It does not explain the input modes or engine defaults, but the schema covers those, so overall it is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 75%, so the baseline is 3. The description does not add any additional meaning to the parameters; it doesn't explain the oneOf requirement, engine choices, or the difference between tex_content and file_path. The schema descriptions already cover most parameter meaning, so no extra value is added.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Run' with a specific resource 'fast single-pass draft compile', and clearly distinguishes itself from siblings by emphasizing 'single-pass' and 'without running multiple passes or bibliography'. It also states its purpose ('quickly surface errors', 'syntax/error checking'), making it unique among the listed compile-related tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use the tool: during editing for syntax/error checking, and it explicitly says it does not run multiple passes or bibliography, implying a lighter alternative. However, it does not name alternative tools explicitly or state when not to use it, so it misses the full 'when-not/alternatives' guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

latexmk_list_citationsA

Extract all citation keys from a LaTeX document and optionally cross-reference them against a .bib file.

ParametersJSON Schema
NameRequiredDescriptionDefault
bib_pathNoAbsolute path to a .bib file to cross-reference.
file_pathNoAbsolute path to an existing .tex file
tex_contentNoLaTeX source content
working_dirNoOptional working directory for symmetry with other tools.

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the transparency burden. It discloses the core read behavior and the optional cross-referencing, but does not mention output format, error handling, or prerequisites. It is neither misleading nor richly contextful.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the primary action (Extract) and scopes it to citation keys. Every word earns its place, with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has a moderate parameter set and no output schema. The description explains the main function but does not describe return values or the relationship between tex_content and file_path. It is adequate for a simple extraction tool but leaves gaps for an agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, with each parameter having a description. The tool description adds minimal value beyond the schema, simply implying the use of a LaTeX document and .bib file. Baseline 3 is appropriate because the schema already documents the parameters clearly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Extract') and resource ('all citation keys from a LaTeX document'), with an optional cross-reference against a .bib file. This is distinct from sibling tools like compile or watch, which have different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use this tool (when you need citation keys), but it does not explicitly contrast with alternatives or mention exclusions. No guidance is given on when to choose tex_content vs file_path, though the schema's oneOf does provide some structure.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

latexmk_list_dependenciesA

List all file dependencies of a LaTeX document (included .tex files, .bib files, packages, images, etc.) using latexmk -deps.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathNoAbsolute path to an existing .tex file
tex_contentNoLaTeX source content
working_dirNoWorking directory

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the behavioral burden. It mentions using `latexmk -deps` but does not disclose potential side effects such as running the compiler and creating auxiliary files, nor does it describe the output format or any permissions needed. This is a significant gap for a tool that likely executes latexmk.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is front-loaded with the core action and resource, followed by examples and the command used. No waste; every part earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is relatively simple, but there is no output schema and the description does not clarify the return format, side effects, or how the tool handles the oneOf requirement when both file_path and tex_content are provided. The schema covers parameter existence, but the description misses behavioral and output context, making it minimally adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with each parameter (file_path, tex_content, working_dir) already described. The description adds context about what dependencies are listed, but does not add any parameter-specific semantics beyond the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists all file dependencies of a LaTeX document, with specific examples of dependency types, and identifies the underlying command `latexmk -deps`. This is specific and distinguishes it from sibling tools like compilation or watching.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly implies the tool is for inspecting dependencies, which is a clear context. It does not explicitly mention alternatives or when not to use, but the purpose is unambiguous enough to guide selection among the sibling latexmk tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

latexmk_read_configA

Read the active .latexmkrc config files from the project and home directory.

ParametersJSON Schema
NameRequiredDescriptionDefault
working_dirNoOptional project directory to check first.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden. 'Read' clearly indicates a non-destructive operation, and specifying 'from the project and home directory' discloses the scope and likely precedence. However, it doesn't detail behavior such as merging or error handling, so it's not a full 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence without redundant phrasing. It front-loads the action and resource, making it easy to parse and scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read tool with one optional parameter and no output schema, the description covers the essential information: what it reads and where. It could mention the return format or merge behavior, but given the simplicity, it is sufficiently complete for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% coverage for the single optional working_dir parameter. The tool description adds little beyond the schema, only confirming that both project and home directories are read. Since the schema does the heavy lifting, a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool reads active .latexmkrc config files from the project and home directory. This distinguishes it from siblings like latexmk_compile or latexmk_write_config, as the verb 'read' and the resource 'config files' are specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use this tool: when you need to inspect current LaTeX configuration settings. It does not explicitly state alternatives or exclusions, but the contrast with write_config and other actions is clear from the name and description, providing sufficient context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

latexmk_watch_listA

List all currently active latexmk watch sessions.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description must convey behavioral traits. It states it lists active sessions, which implies a read-only operation, but it does not explicitly confirm that it has no side effects, requires no special permissions, or describe what happens to the sessions. The behavior is minimally transparent but lacks explicit safety or scope details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that directly states the tool's function without any filler. Every word is necessary and it is appropriately sized for a simple list operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema and no annotations, the description is somewhat sparse. It clarifies what it lists (all currently active latexmk watch sessions) but does not describe the format of the returned data or any additional behavior. Given the simplicity of the tool, it is minimally complete but could benefit from stating the return type or confirming it does not alter sessions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema is empty, so with zero parameters the description has nothing to add beyond the schema. Per the baseline for zero-parameter tools, a score of 4 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'list' and clearly identifies the resource 'currently active latexmk watch sessions'. It distinguishes from sibling tools like latexmk_watch_start and latexmk_watch_stop which perform different actions, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when the user wants to view active watch sessions, but it does not explicitly state when to prefer this over alternative tools or provide any exclusion criteria. No context is given for when not to use it, though the simple read-only nature makes this less critical.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

latexmk_watch_startA

Start a background latexmk watch process (-pvc) that recompiles automatically on file changes. Returns a session_id.

ParametersJSON Schema
NameRequiredDescriptionDefault
engineNopdflatex
file_pathYesAbsolute path to the root .tex file to watch
working_dirNoWorking directory. Defaults to the source file directory.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden. It discloses the background nature, auto-recompile behavior, and the session_id return value, which are crucial for an agent to understand the tool's side effects and lifetime. However, it could add more detail about stopping the process or potential side effects like build artifacts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, information-dense, and front-loaded. No wasted words. Balances specificity with brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that starts a background process, the description gives the essential facts: it's a watch, it auto-recompiles, and it returns a session_id. The parameters are covered by the schema. It doesn't explain the full lifecycle, such as how to stop it, but the sibling tools provide that context. Overall adequate for invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers two of three parameters with descriptions (file_path and working_dir) and the engine has an enum and default. The description itself adds no extra parameter meaning, but the schema coverage is 67%, so the description isn't required to compensate fully. The engine's semantics are self-evident from the enum.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Start' and names the specific resource ('background latexmk watch process (-pvc)') with the key behavior 'recompiles automatically on file changes'. It also states the return value, clearly distinguishing it from siblings like latexmk_compile or latexmk_watch_stop.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly conveys the use case: continuous recompilation on file changes. However, it does not explicitly mention alternatives or exclusions, such as 'use latexmk_compile for one-shot builds', though the context of siblings makes this inferable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

latexmk_watch_stopA

Stop a running latexmk watch session by session_id.

ParametersJSON Schema
NameRequiredDescriptionDefault
session_idYesSession ID returned by latexmk_watch_start.

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description shoulders the burden of disclosing behavior. It only states the action 'stop' without explaining side effects, error handling for invalid session IDs, idempotency, or what happens to the underlying process. This is insufficient for a mutating operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single well-structured sentence, front-loaded with the verb and resource. Every word contributes meaning and there is no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema) and the absence of annotations, the description is minimally adequate but lacks important behavioral details such as whether the stop is blocking, what happens if the session does not exist, or whether it only affects the specific session. It is complete enough for a basic stop operation but not fully comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides full coverage of the session_id parameter, including its provenance from latexmk_watch_start. The description adds no further parameter context, so it meets the baseline for high schema coverage without adding extra semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Stop') and a concrete resource ('running latexmk watch session'), with a clear parameter ('session_id'). It fully distinguishes this tool from sibling operations like latexmk_watch_start and latexmk_watch_list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly implies when to use this tool: after launching a watch session with latexmk_watch_start. It provides clear context but does not explicitly mention alternatives or when not to use it, though the sibling names make that unnecessary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

latexmk_write_configB

Write a .latexmkrc config file to a project directory or globally to ~/.latexmkrc.

ParametersJSON Schema
NameRequiredDescriptionDefault
engineNo
globalNoWrite to ~/.latexmkrc instead of the project directory.
working_dirYesDirectory to write the project-level .latexmkrc into.
custom_rulesNoRaw Perl lines to append to the generated config.
shell_escapeNo
output_formatNo
extra_pdflatex_argsNoExtra arguments to append to the pdflatex command.

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavioral traits. It only states the write action and target locations, but does not mention whether existing files are overwritten, required permissions, or any side effects. This is a significant gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that front-loads the action and targets, with no wasted words. It is highly concise and structurally efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 7 parameters, no annotations, and no output schema, this description is too sparse. It does not explain how parameters relate, what the generated config contains, or any prerequisites, leaving the agent without enough context for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 57%, leaving engine, shell_escape, and output_format undocumented. The tool description adds no parameter information at all, failing to compensate for the missing schema descriptions or clarify parameter interactions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (Write a .latexmkrc config file) and specifies the two target locations (project vs global), distinguishing it from sibling tools like latexmk_read_config. The verb and resource are explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the name and action, but there is no explicit guidance on when to use this tool versus alternatives. The sibling tools are not referenced, and no exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.8/5.0
Disambiguation4/5

Most tools have clearly distinct purposes: compile, draft_compile, watch operations, clean, check, dependencies, config, and citations. The only potential confusion is between latexmk_compile and latexmk_draft_compile, but their descriptions clarify draft as a quick single-pass syntax check vs. full compilation.

Naming Consistency3/5

All tools share a latexmk_ prefix, but the verb/noun order is inconsistent: most use verb_noun (compile, clean, list_dependencies), while watch tools use noun_verb (watch_start, watch_stop, watch_list), and draft_compile uses an adjective-noun form. This mix is readable but not a uniform pattern.

Tool Count5/5

With 11 tools, the server covers the full LaTeX latexmk workflow—compiling, watching, cleaning, dependency management, config, and citations—without bloat. Each tool addresses a distinct user need, making the count well-scoped for this domain.

Completeness5/5

The tool surface covers the essential lifecycle of LaTeX document processing: compile (draft and full), watch, clean, dependency resolution, config management, and citation checking. There are no obvious dead ends or missing operations for the announced purpose of a latexmk wrapper.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/coolport/latexmk-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server