Skip to main content
Glama
LibreOffice MCP Server

LibreOffice MCP Server

_docx_has_omml

Detect whether a DOCX contains OMML equations so formula-bearing files route to Word COM for accurate rendering, while formula-free files use LibreOffice.

Instructions

检测 docx 是否含 OMML 公式(word/document.xml 里查 <m:oMath)。

2026-10-24:LibreOffice 对 OMML 的 run 字号(m:r/w:rPr/w:sz)完全忽略,
公式全部按 Math 组件默认基准字号渲染(LO Bug 32419,多年未修)——
含公式的 docx 用 LO 转 PDF,公式字号/溢出判断全部失真。
含公式 → 路由 Word COM(真渲染);无公式 → LO 照旧(快)。

Input Schema

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it explains why the check exists (LO Bug 32419 ignores m:r/w:rPr/w:sz, so formula font size and overflow judgments are distorted), which tells the agent the practical consequence of a false negative. It omits error behavior for missing/non-docx paths and whether the check is cheap or does full XML parsing.

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

Conciseness4/5

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

Purpose is front-loaded in the opening line, followed by the rationale and the routing rule. The dated changelog framing ('2026-10-24') and bug number are slightly noisy, but each sentence supports the routing decision rather than padding.

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 one-parameter boolean predicate with an output schema, the description supplies enough: what is checked, why it matters, and what to do with each outcome. Only edge-case behavior (invalid path, non-docx input, relative vs absolute paths) is left unspecified.

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 single parameter has 0% schema description coverage — the schema only supplies type string with format path. The description implies the path targets a docx but never states whether it must be an absolute local path, a workspace-relative path, or what happens for non-.docx files, so the gap is only partially compensated.

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 first sentence states a specific verb and resource: detect whether a docx contains OMML formulas, and even names the exact XML location checked (word/document.xml, <m:oMath>). This is a narrow predicate tool, and its scope is unambiguous relative to conversion or text-reading siblings.

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 gives explicit branching guidance: formulas present → route to Word COM for true rendering; absent → use LibreOffice as usual for speed. That is a clear use/no-use decision. It stops short of naming the sibling tools (batch_convert_documents, open_document_in_libreoffice) that the routing decision feeds into.

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