Skip to main content
Glama

get_latex_structure

Extract LaTeX document structure including class, title, author, packages, and section hierarchy to analyze and understand document organization.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the .tex file to analyze

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
document_classNo
titleNo
authorNo
packagesNo
sectionsNo
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.

Install Server

Other Tools

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