Skip to main content
Glama
LibreOffice MCP Server

LibreOffice MCP Server

read_impress_layout

Read PPTX element geometry—coordinates, size, rotation, placeholder role, z-order across masters/layouts/slides, groups, and text—to detect overlaps, out-of-bounds shapes, and layering.

Instructions

精确读取 PPT(.pptx)每页每个元素的几何布局:坐标/宽高(厘米)、旋转、占位符角色、z 序、组内子元素、文本摘要。

三层 z 序:masters(最底层装饰) < layouts(版式装饰) < 页面 shapes(最顶层)。
重叠/遮挡判断必须三层合并——"标题压住橙色块"这类问题,装饰块在版式/母版上,只看页面形状查不出来。
页面元素几何为 None 表示未显式设置(继承版式占位符位置)。

用于回答"这个元素在页面哪里/多大面积/有没有重叠出界/层级谁压谁"——read_document_text 只给文字流,
位置信息在文本转换时全部丢失。仅支持 .pptx;.ppt/.odp 先用 convert_document 转 pptx 再读。

Args:
    path: PPT 文件路径(.pptx)
    slides: 可选,页码过滤,如 "1" 或 "1,3-5";缺省读全部页

Input Schema

NameRequiredDescriptionDefault
pathYes
slidesNo

Output Schema

NameRequiredDescriptionDefault
pathYes
slidesYes
layoutsNo版式装饰清单(z 序介于母版与页面形状之间)
mastersNo母版装饰清单(z 序最底层)
slides_totalYes
slide_width_cmYes页面宽(厘米)
slide_height_cmYes页面高(厘米)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it discloses the non-obvious three-layer z-order model (masters < layouts < slide shapes), warns that overlap judgments must merge all three layers because decorative blocks live on layouts/masters, and explains that geometry of None means the value is not explicitly set and is inherited from a layout placeholder. It does not cover performance on large decks or how images/charts are represented, which is why it falls short of 5.

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?

The description is front-loaded with the core capability before the z-order nuance and the sibling comparison, and every claim carries practical weight. The z-order section is slightly verbose, but it encodes information an agent could not infer otherwise, so it largely earns its place.

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

Completeness5/5

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

Return format does not need explaining because an output schema exists. Combined with explicit format restrictions, the usage scenario, the inheritance caveat, and the routing to convert_document, an agent has everything it needs in order to call this tool correctly and to know when not to.

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?

Schema coverage is 0%, so the description must compensate, and it does: path is identified as the .pptx path, and slides is documented as an optional page filter with concrete syntax examples ("1", "1,3-5") and a stated default of reading all pages. Minor gap: path is not described in terms of relative vs absolute paths or error behavior for a missing or non-.pptx file.

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 gives a specific verb (精确读取) and a precisely scoped resource: the per-element geometry for each slide of a .pptx file, enumerated as coordinates, size in cm, rotation, placeholder role, z-order, group children, and text summary. It then explicitly sets itself apart from read_document_text by saying that one only returns a text stream and loses all position data.

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

Usage Guidelines5/5

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

It states the exact questions this tool answers (where an element sits, how large it is, whether it overlaps or exceeds bounds, and which element covers which), names the competing sibling read_document_text and why that sibling is insufficient, and gives an explicit fallback path: convert .ppt/.odp to pptx with convert_document first. The exclusions are unambiguous.

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