MCP LaTeX Server
MCP LaTeX サーバー
LaTeX ファイルの作成、編集、検証、およびコンパイルを行うための Model Context Protocol (MCP) サーバーです。FastMCP と Pydantic を使用して構築されており、型安全で構造化された出力を提供します。
機能
作成: パラメータまたはバンドルされたテンプレート(article、beamer、report)から LaTeX ドキュメントを作成
編集: 置換、挿入、追記、先頭への追加操作によるファイル編集
読み込みおよび一覧表示: セキュアなベースディレクトリ内の
.texファイルを操作検証: 構文(括弧、環境、参照、必須宣言)の検証
コンパイル:
pdflatex、xelatex、またはlualatexを使用した PDF へのコンパイルリソース:
latex://URI を介したバンドル済みテンプレートの閲覧と取得
Related MCP server: Unofficial Overleaf MCP Server
前提条件
Python 3.11.9 以上
LaTeX ディストリビューション(コンパイル用):
インストール
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 の設定が行われます。
設定
サーバーは単一の環境変数を使用します:
変数 | 説明 | デフォルト |
| すべてのファイル操作のルートディレクトリ |
|
ツールに渡されるすべてのファイルパスは、このベースディレクトリからの相対パスとして解決されます。これより外側へのアクセスは拒否されます。
MCP クライアントの設定
Claude Desktop
claude_desktop_config.json に以下を追加します:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.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 ドキュメントを作成します。
パラメータ | 型 | デフォルト | 説明 | |||||
|
| 必須 | 新しい | |||||
| `article | report | book | letter | beamer | minimal` |
| ドキュメントクラス |
|
|
| ドキュメントタイトル | |||||
|
|
| ドキュメントの著者 | |||||
|
|
| ドキュメントの日付 | |||||
|
|
| 本文の内容 | |||||
|
|
| 追加の LaTeX パッケージ | |||||
|
|
| 余白設定 (例: |
create_from_template
バンドルされたテンプレートからドキュメントを作成します。
パラメータ | 型 | デフォルト | 説明 | ||
|
| 必須 | 新しい | ||
| `article | beamer | report` |
| テンプレート名 |
edit_latex_file
既存の LaTeX ファイルを編集します。
パラメータ | 型 | デフォルト | 説明 | ||||
|
| 必須 | ファイルへのパス | ||||
| `replace | insert_before | insert_after | append | prepend` | 必須 | 編集操作 |
|
| 必須 | 挿入または置換するテキスト | ||||
| `str | null` |
| 検索するテキスト (置換/挿入に必須) | |||
| `int | null` |
| 1から始まる行番号 ( |
read_latex_file
.tex ファイルの内容を読み取って返します。
パラメータ | 型 | デフォルト | 説明 |
|
| 必須 | ファイルへのパス |
list_latex_files
ディレクトリ内のすべての .tex ファイルを一覧表示します。
パラメータ | 型 | デフォルト | 説明 |
|
|
| 検索するディレクトリ |
|
|
| サブディレクトリを検索 |
validate_latex
LaTeX 構文(必須宣言、括弧の対応、環境の整合性、未定義の参照)をチェックします。
パラメータ | 型 | デフォルト | 説明 |
|
| 必須 | ファイルへのパス |
get_latex_structure
ドキュメント構造(クラス、タイトル、著者、パッケージ、セクション階層)を抽出します。
パラメータ | 型 | デフォルト | 説明 |
|
| 必須 | ファイルへのパス |
compile_latex
.tex ファイルを PDF にコンパイルします(参照や目次のためにエンジンを2回実行します)。
パラメータ | 型 | デフォルト | 説明 | ||
|
| 必須 | ファイルへのパス | ||
| `pdflatex | xelatex | lualatex` |
| LaTeX エンジン |
リソース
URI | 説明 |
| 利用可能なバンドル済みテンプレートの一覧 |
| 特定のテンプレートの内容を取得 |
テスト
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 toolscompile_latexB
Compile a LaTeX file to PDF using the specified engine.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the .tex file to compile | |
| engine | No | pdflatex |
Output Schema
| Name | Required | Description |
|---|---|---|
| path | Yes | |
| success | Yes | |
| pdf_path | No | |
| log_output | No | |
| errors | No |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path for the new .tex file | |
| template | No | article |
Output Schema
| Name | Required | Description |
|---|---|---|
| path | Yes | Absolute path to the file |
| success | Yes | |
| message | Yes | |
| content | No | File content if applicable |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path for the new .tex file (relative to base dir) | |
| document_type | No | article | |
| title | No | ||
| author | No | ||
| date | No | \today | |
| content | No | ||
| packages | No | Extra LaTeX packages to include | |
| geometry | No | Geometry settings, e.g. 'margin=1in' |
Output Schema
| Name | Required | Description |
|---|---|---|
| path | Yes | Absolute path to the file |
| success | Yes | |
| message | Yes | |
| content | No | File content if applicable |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the .tex file to edit | |
| operation | Yes | Type of edit operation | |
| new_text | Yes | Text to insert or replace with | |
| search_text | No | Text to search for (required for replace/insert_before/insert_after) | |
| line_number | No | 1-based line number (alternative to search_text for insert operations) |
Output Schema
| Name | Required | Description |
|---|---|---|
| path | Yes | Absolute path to the file |
| success | Yes | |
| message | Yes | |
| content | No | File content if applicable |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the .tex file to analyze |
Output Schema
| Name | Required | Description |
|---|---|---|
| path | Yes | |
| document_class | No | |
| title | No | |
| author | No | |
| packages | No | |
| sections | No |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| directory_path | No | Directory to search | . |
| recursive | No | Search subdirectories |
Output Schema
| Name | Required | Description |
|---|---|---|
| directory | Yes | |
| files | No |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the .tex file to read |
Output Schema
| Name | Required | Description |
|---|---|---|
| path | Yes | Absolute path to the file |
| success | Yes | |
| message | Yes | |
| content | No | File content if applicable |
TDQS
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.
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.
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.
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.
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.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the .tex file to validate |
Output Schema
| Name | Required | Description |
|---|---|---|
| path | Yes | |
| valid | Yes | |
| issues | No |
TDQS
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.
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.
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.
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.
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.
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.
8 tool updates
v2.0.0- First observed
compile_latex - First observed
create_from_template - First observed
create_latex_file - First observed
edit_latex_file - First observed
get_latex_structure - First observed
list_latex_files - First observed
read_latex_file - First observed
validate_latex
TDQS
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.
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.
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.
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
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
Persistent AI LaTeX workspace: edit and compile multi-file projects, export publication-ready PDFs.
A hosted LaTeX editor your assistant can actually use. Search 1,019 free templates, create and edit projects, and compile them to PDF on a real TeX Live farm, getting back the PDF or the compile log when a build fails. Thirteen tools behind OAuth 2.1, with nothing to install and nothing to run locally.
Overleaf alternative online LaTeX editor. AI agents edit, comment, and chat. Keep or revert edits.
Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to convert LaTeX source code into professionally formatted PDF documents with comprehensive error handling and local file generation capabilities.1181MIT
- FlicenseBqualityCmaintenanceEnables AI agents to interact with Overleaf projects directly, including creating projects, managing files, and editing documents in real-time using Overleaf's native Operational Transformation protocol.10-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to read, edit, and compile LaTeX documents in Overleaf projects with tracked changes via the Model Context Protocol.1MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to read, write, and compile LaTeX projects locally, view PDF pages as images, and manage project files, with live updates reflected in a web-based editor.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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