Skip to main content
Glama

MCP LaTeX 服务器

一个用于 LaTeX 文件创建、编辑、验证和编译的模型上下文协议 (MCP) 服务器。使用 FastMCP 和 Pydantic 构建,以实现类型安全、结构化的输出。

功能特性

  • 创建:根据参数或内置模板(article, beamer, report)创建 LaTeX 文档

  • 编辑:通过替换、插入、追加和前置操作编辑文件

  • 读取列出:在安全的基础目录下操作 .tex 文件

  • 验证:语法检查 — 大括号、环境、引用、必需声明

  • 编译:使用 pdflatexxelatexlualatex 编译为 PDF

  • 资源:通过 latex:// URI 浏览和获取内置模板

Related MCP server: Unofficial Overleaf MCP Server

前置要求

  • Python 3.11.9+

  • LaTeX 发行版(用于编译):

    • Windows: MiKTeXTeX Live

    • macOS: MacTeX (brew install --cask mactex)

    • Linux: sudo apt install texlive-full (Debian/Ubuntu) 或 sudo dnf install texlive-scheme-full (Fedora)

安装

使用 uv (推荐)

git clone https://github.com/RobertoDure/mcp-latex-server
cd mcp-latex-server
uv pip install -e .

使用 pip

git clone <repository-url>
cd mcp-latex-server
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate
pip install -e .

快速设置 (Windows)

python quick_setup.py

此脚本将检查 Python 版本、安装依赖项、验证服务器导入是否正确,并可选择配置 Claude Desktop。

配置

服务器使用单个环境变量:

变量

描述

默认值

LATEX_SERVER_BASE_PATH

所有文件操作的根目录

. (当前目录)

所有传递给工具的文件路径均相对于此基础目录进行解析。禁止访问该目录之外的文件。

MCP 客户端配置

Claude Desktop

添加到你的 claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "latex-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-latex-server",
        "run",
        "latex_server.py"
      ],
      "env": {
        "LATEX_SERVER_BASE_PATH": "/path/to/your/latex/files"
      }
    }
  }
}

VS Code (GitHub Copilot)

添加到工作区中的 .vscode/mcp.json

{
  "servers": {
    "latex-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-latex-server",
        "run",
        "latex_server.py"
      ],
      "env": {
        "LATEX_SERVER_BASE_PATH": "${workspaceFolder}"
      }
    }
  }
}

工具

create_latex_file

根据参数创建新的 LaTeX 文档。

参数

类型

默认值

描述

file_path

str

必填

.tex 文件的路径

document_type

`article

report

book

letter

beamer

minimal`

article

文档类

title

str

""

文档标题

author

str

""

文档作者

date

str

\today

文档日期

content

str

""

正文内容

packages

list[str]

[]

额外的 LaTeX 包

geometry

str

""

页面设置 (例如 margin=1in)

create_from_template

从内置模板创建文档。

参数

类型

默认值

描述

file_path

str

必填

.tex 文件的路径

template

`article

beamer

report`

article

模板名称

edit_latex_file

编辑现有的 LaTeX 文件。

参数

类型

默认值

描述

file_path

str

必填

文件路径

operation

`replace

insert_before

insert_after

append

prepend`

必填

编辑操作

new_text

str

必填

插入或替换的文本

search_text

`str

null`

null

查找的文本(替换/插入操作必需)

line_number

`int

null`

null

基于 1 的行号(search_text 的替代方案)

read_latex_file

读取并返回 .tex 文件的内容。

参数

类型

默认值

描述

file_path

str

必填

文件路径

list_latex_files

列出目录中的所有 .tex 文件。

参数

类型

默认值

描述

directory_path

str

.

要搜索的目录

recursive

bool

false

是否递归搜索子目录

validate_latex

检查 LaTeX 语法:必需声明、括号匹配、环境匹配、未定义的引用。

参数

类型

默认值

描述

file_path

str

必填

文件路径

get_latex_structure

提取文档结构:类、标题、作者、包和章节层级。

参数

类型

默认值

描述

file_path

str

必填

文件路径

compile_latex

.tex 文件编译为 PDF(运行引擎两次以处理引用/目录)。

参数

类型

默认值

描述

file_path

str

必填

文件路径

engine

`pdflatex

xelatex

lualatex`

pdflatex

LaTeX 引擎

资源

URI

描述

latex://templates

列出可用的内置模板

latex://template/{name}

获取特定模板的内容

测试

使用 MCP Inspector 进行测试:

uv run mcp dev latex_server.py

或者运行自带的测试套件:

python test_server.py

故障排除

服务器无法启动 — 验证 Python 3.10+ (python --version) 且已安装 mcp (pip list | grep mcp)。

编译失败 — 确保 LaTeX 发行版在你的 PATH 中 (pdflatex --version)。如果缺失,请安装 MiKTeX 或 TeX Live。

“Access denied”错误 — 请求的文件路径解析到了 LATEX_SERVER_BASE_PATH 之外。请使用相对路径或调整环境变量。

Claude 无法连接 — 仔细检查 MCP 配置中的文件路径,重启 Claude Desktop,并使用 uv run mcp dev latex_server.py 进行验证。

许可证

MIT

Available Tools

8 tools
compile_latexB

Compile a LaTeX file to PDF using the specified engine.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the .tex file to compile
engineNopdflatex

Output Schema

ParametersJSON Schema
NameRequiredDescription
pathYes
successYes
pdf_pathNo
log_outputNo
errorsNo

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the compilation action but fails to disclose behavioral traits such as whether it overwrites existing PDFs, requires specific permissions, handles errors, or has rate limits. This leaves significant gaps for a tool that performs file operations.

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, efficient sentence that front-loads the core purpose without unnecessary details. Every word earns its place, making it highly concise and well-structured.

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 has an output schema (which handles return values), the description is minimally complete for a compilation tool. However, with no annotations and incomplete parameter semantics, it lacks details on behavior and usage context, making it adequate but with clear gaps.

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 50% (only 'file_path' has a description). The description adds minimal value by implying 'engine' is used for compilation, but doesn't explain the differences between engine options (pdflatex, xelatex, lualatex) or provide additional context beyond the schema's enum. Baseline 3 is appropriate as the schema covers half the parameters adequately.

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 the action ('Compile') and resource ('a LaTeX file to PDF') with the specific mechanism ('using the specified engine'). It distinguishes from siblings like 'validate_latex' or 'read_latex_file' by focusing on compilation, but doesn't explicitly differentiate from all siblings (e.g., 'create_latex_file' might be related).

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?

No guidance is provided on when to use this tool versus alternatives like 'validate_latex' for checking syntax or 'create_latex_file' for initial creation. The description implies usage after a LaTeX file exists, but lacks explicit context or exclusions.

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

create_from_templateB

Create a LaTeX document from a bundled template file.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath for the new .tex file
templateNoarticle

Output Schema

ParametersJSON Schema
NameRequiredDescription
pathYesAbsolute path to the file
successYes
messageYes
contentNoFile content if applicable

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the creation action but lacks critical behavioral details: whether this overwrites existing files, what permissions are required, how errors are handled, or what the output contains. For a file creation tool with zero annotation coverage, this is a significant gap in transparency.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every word earning its place in conveying the core functionality.

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 has an output schema (which handles return values), the description's main gaps are in behavioral transparency and parameter semantics. However, for a file creation tool with no annotations and incomplete parameter documentation, the description should provide more context about file system interactions and template specifics to be fully 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 50% (only 'file_path' has a description), so the description must compensate. It mentions 'bundled template file' which hints at the 'template' parameter's purpose, but doesn't explain the enum values or their differences. The description adds some context but doesn't fully compensate for the schema's coverage gap, warranting a baseline score.

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 the action ('Create a LaTeX document') and the resource ('from a bundled template file'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'create_latex_file' (which likely creates from scratch rather than from templates), leaving room for improvement in sibling distinction.

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. There's no mention of prerequisites, when-not-to-use scenarios, or explicit alternatives among the sibling tools (e.g., 'create_latex_file' for non-template creation). This leaves the agent without contextual usage direction.

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

create_latex_fileC

Create a new LaTeX document with specified content and structure.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath for the new .tex file (relative to base dir)
document_typeNoarticle
titleNo
authorNo
dateNo\today
contentNo
packagesNoExtra LaTeX packages to include
geometryNoGeometry settings, e.g. 'margin=1in'

Output Schema

ParametersJSON Schema
NameRequiredDescription
pathYesAbsolute path to the file
successYes
messageYes
contentNoFile content if applicable

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool creates a new file but doesn't specify whether it overwrites existing files, requires specific permissions, handles errors, or provides any output details. This leaves significant gaps in understanding the tool's behavior for a mutation 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, efficient sentence that front-loads the core action without unnecessary words. It directly states the tool's purpose, making it easy to parse and understand quickly, with no wasted verbiage.

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?

For a tool with 8 parameters, low schema coverage (38%), no annotations, and sibling tools that could cause confusion, the description is insufficient. It lacks details on behavior, usage context, and parameter meanings, making it incomplete despite the presence of an output schema that might cover return values.

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 description mentions 'specified content and structure', which loosely relates to parameters like 'content' and 'document_type', but adds minimal semantic value beyond the schema. With low schema description coverage (38%), the description doesn't adequately compensate by explaining undocumented parameters such as 'geometry' or 'packages', resulting in only marginal improvement over 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 the verb 'Create' and resource 'LaTeX document' with scope 'with specified content and structure', making the purpose evident. However, it doesn't differentiate from sibling tools like 'create_from_template' or 'edit_latex_file', which could create ambiguity about when to use this specific creation method versus alternatives.

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 'create_from_template' or 'edit_latex_file'. It lacks context about prerequisites, such as whether the file path must be unique or if existing files are overwritten, leaving the agent without clear usage instructions.

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

edit_latex_fileB

Edit an existing LaTeX file by replacing, inserting, or appending content.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the .tex file to edit
operationYesType of edit operation
new_textYesText to insert or replace with
search_textNoText to search for (required for replace/insert_before/insert_after)
line_numberNo1-based line number (alternative to search_text for insert operations)

Output Schema

ParametersJSON Schema
NameRequiredDescription
pathYesAbsolute path to the file
successYes
messageYes
contentNoFile content if applicable

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions editing operations but fails to describe critical traits like file system effects (e.g., overwriting, backup behavior), error handling (e.g., if file doesn't exist), or LaTeX-specific considerations (e.g., syntax validation). This leaves significant gaps 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, efficient sentence that front-loads the core purpose without unnecessary words. Every part ('Edit an existing LaTeX file by replacing, inserting, or appending content') directly contributes to understanding the tool's function.

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 moderate complexity (5 parameters, mutation operations) and the presence of an output schema (which reduces need to explain returns), the description is minimally adequate. However, with no annotations and incomplete behavioral context, it doesn't fully compensate for the gaps in a file-editing tool, keeping it at a baseline level.

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 5 parameters thoroughly. The description adds no parameter-specific meaning beyond implying general editing operations, which aligns with the schema's 'operation' enum. This meets the baseline for high schema coverage.

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 the verb ('Edit') and resource ('an existing LaTeX file'), and specifies the types of operations ('replacing, inserting, or appending content'). However, it doesn't explicitly differentiate from sibling tools like 'create_latex_file' or 'read_latex_file' beyond the 'existing' qualifier, which is why it doesn't reach a perfect 5.

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 'create_latex_file' for new files or 'read_latex_file' for viewing. It lacks explicit when/when-not instructions or named alternatives, leaving usage context implied at best.

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

get_latex_structureA

Extract document structure: class, title, author, packages, and section hierarchy.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the .tex file to analyze

Output Schema

ParametersJSON Schema
NameRequiredDescription
pathYes
document_classNo
titleNo
authorNo
packagesNo
sectionsNo

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the tool's behavior as an extraction operation (implying read-only, non-destructive), but doesn't add details like error handling, performance, or output format. With no annotations, this is a minimal but adequate disclosure, scoring 3 as it meets the baseline for a read operation without rich context.

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, efficient sentence that front-loads the key action ('Extract document structure') and lists specific elements concisely. Every word earns its place with no redundancy or fluff, making it highly readable and well-structured.

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?

Given the tool's low complexity (single parameter, read-only extraction), high schema coverage, and presence of an output schema (which handles return values), the description is reasonably complete. It clearly states what the tool does and what it extracts, though it could benefit from more behavioral context (e.g., error cases). The output schema reduces the need for return value explanation, making this 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 the single parameter 'file_path' well-documented in the schema. The description doesn't add any parameter-specific semantics beyond what the schema provides (e.g., no details on file format constraints or path resolution). Baseline is 3 when schema coverage is high, and the description doesn't compensate further.

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 the tool's purpose with a specific verb ('Extract') and resource ('document structure'), listing the specific elements extracted (class, title, author, packages, section hierarchy). It distinguishes from siblings like 'read_latex_file' (which likely reads raw content) or 'validate_latex' (which checks syntax), but doesn't explicitly name alternatives, keeping it at 4.

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 for analyzing LaTeX files to get structured metadata, suggesting it's for inspection rather than editing or validation. However, it doesn't explicitly state when to use this tool versus alternatives like 'read_latex_file' (for raw content) or 'validate_latex' (for syntax checks), nor does it mention prerequisites or exclusions, so it's only implied context.

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

list_latex_filesB

List all .tex files in a directory.

ParametersJSON Schema
NameRequiredDescriptionDefault
directory_pathNoDirectory to search.
recursiveNoSearch subdirectories

Output Schema

ParametersJSON Schema
NameRequiredDescription
directoryYes
filesNo

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action but doesn't cover important traits like whether it's read-only (implied but not explicit), error handling for invalid paths, performance considerations for large directories, or output format details. This leaves significant gaps for a tool that interacts with the file system.

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, direct sentence that efficiently conveys the core functionality without any fluff. It's front-loaded with the essential action and resource, making it highly concise and well-structured for quick understanding.

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 low complexity (simple file listing), 100% schema coverage, and the presence of an output schema (which handles return values), the description is minimally complete. However, it lacks context on behavioral aspects like error cases or performance, which could be important for robust agent use, keeping it at an adequate but not fully helpful level.

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 description coverage is 100%, with clear documentation for both parameters ('directory_path' and 'recursive'). The description adds no additional parameter semantics beyond what the schema provides, such as explaining path formats or recursion depth limits, so it meets the baseline for adequate but unenriched coverage.

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 the verb ('List') and resource ('.tex files in a directory'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_latex_structure' or 'read_latex_file', which might also involve listing or accessing LaTeX files, so it falls short of a perfect score.

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. It doesn't mention sibling tools like 'get_latex_structure' for structural analysis or 'read_latex_file' for content access, leaving the agent to guess based on context alone.

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

read_latex_fileB

Read and return the contents of a LaTeX file.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the .tex file to read

Output Schema

ParametersJSON Schema
NameRequiredDescription
pathYesAbsolute path to the file
successYes
messageYes
contentNoFile content if applicable

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral context. It states the basic operation but doesn't disclose important traits like error handling (e.g., what happens if the file doesn't exist), file size limitations, encoding considerations, or whether it reads binary or text content.

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 extremely concise at just one sentence with zero wasted words. It's front-loaded with the core purpose and doesn't include any unnecessary information, making it efficient for quick understanding.

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 simple nature (single parameter, read-only operation) and the presence of an output schema, the description is minimally adequate. However, for a file reading tool with no annotations, it should ideally mention basic behavioral aspects like error conditions or return format expectations.

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 description coverage is 100%, with the single parameter 'file_path' well-documented in the schema. The description doesn't add any meaningful parameter semantics beyond what the schema already provides, so it meets the baseline for high schema coverage.

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 the action ('Read and return the contents') and resource ('a LaTeX file'), making the tool's purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_latex_structure' or 'list_latex_files', which might also involve reading LaTeX files in different ways.

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. It doesn't mention when this tool is appropriate (e.g., for raw content retrieval) versus when to use siblings like 'get_latex_structure' (for structural analysis) or 'compile_latex' (for processing).

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

validate_latexB

Perform LaTeX syntax validation (structure, braces, environments, references).

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the .tex file to validate

Output Schema

ParametersJSON Schema
NameRequiredDescription
pathYes
validYes
issuesNo

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool performs validation but does not describe what happens during validation (e.g., error reporting, success indicators, side effects like file modifications). It also omits details on permissions, rate limits, or output format, leaving significant gaps in understanding the tool's behavior.

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, efficient sentence that front-loads the core action ('Perform LaTeX syntax validation') and elaborates concisely on the validation scope. Every word earns its place, with no redundant or vague phrasing, making it highly readable and to the point.

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 moderate complexity (validation of LaTeX syntax), the description is minimally adequate. It covers the purpose but lacks behavioral details and usage guidelines. The presence of an output schema means the description does not need to explain return values, but it still misses context on how validation works or when to use it, leaving room for improvement.

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 has 100% description coverage, fully documenting the 'file_path' parameter. The description does not add any semantic details beyond what the schema provides (e.g., it does not specify file format requirements or validation scope limitations). With high schema coverage, the baseline score of 3 is appropriate, as the description does not compensate but also does not detract.

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 the tool's purpose with a specific verb ('Perform') and resource ('LaTeX syntax validation'), and it details the validation scope (structure, braces, environments, references). However, it does not explicitly differentiate from sibling tools like 'compile_latex' or 'get_latex_structure', which might also involve LaTeX processing, so it falls short of a perfect score.

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. It does not mention prerequisites, such as needing an existing .tex file, or compare it to siblings like 'compile_latex' (which might also check syntax) or 'get_latex_structure' (which might analyze structure). This lack of contextual usage information limits its helpfulness.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 8 tool updatesv2.0.0
    • First observedcompile_latex
    • First observedcreate_from_template
    • First observedcreate_latex_file
    • First observededit_latex_file
    • First observedget_latex_structure
    • First observedlist_latex_files
    • First observedread_latex_file
    • First observedvalidate_latex

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no ambiguity: compile, create from template, create new file, edit file, get structure, list files, read file, and validate syntax. The descriptions reinforce unique functions, preventing misselection.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case (e.g., compile_latex, edit_latex_file). This predictability makes the set easy to navigate and understand.

Tool Count5/5

With 8 tools, the server is well-scoped for LaTeX document management. Each tool earns its place by covering essential operations like creation, editing, reading, validation, and compilation without bloat.

Completeness4/5

The toolset provides strong coverage for core LaTeX workflows, including CRUD operations and validation. A minor gap is the lack of tools for managing bibliographies or handling complex LaTeX errors, but agents can work around this with existing tools.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

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/RobertoDure/mcp-latex-server'

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