Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
doc_render_report

Render a DOCX to PDF (LibreOffice), extract per-page geometry, and check layout rules. Returns structured JSON — no images.

Use this to see whether a document is visually correct: margin/table overflow, low-resolution images, likely orphan headings, plus the measured size and effective margins of every page.

Args: document: Absolute or relative path to a .docx file. pages: Optional 1-based page numbers to report (e.g. [4,5,6]). Omit for all. rules: Optional path to a YAML rule pack. Omit to use rules/general.yaml.

Returns: A dict with summary.headline (read this first), summary.counts, and a pages[] list. Each page has size_mm, effective_margins_mm, its tables/ images, and a warnings[] list of {rule, severity, target, detail, engine_sensitivity}. engine_sensitivity=dependent means the finding is only valid for the LibreOffice layout and may differ in Word.

doc_selftest

Health check: confirm the render + geometry stack is wired up.

Call this first from a new client to prove the server is alive and that LibreOffice / PyMuPDF are reachable, before pointing it at a real document.

doc_get_structure

List the addressable elements of a DOCX with ids AND stable anchors.

Two ways to address an element as a doc_apply_patch target:

  • id = el-N (document order; stable only within one version), or

  • anchor = the paragraph's w14:paraId (Word's persistent id; survives edits/reordering). Tables anchor via their first cell as t:{paraId}.

assign_anchors=True writes a normalized copy with anchors filled in and returns it as normalized_output — patch THAT to address by anchor. Default is read-only (existing anchors reported, missing ones as null).

Pass the returned version_hash back as expected_version_hash so a stale plan is rejected. Paragraphs include style/spacing/keep_with_next/ page_break_before; tables include width_mm and overflows_text_column.

doc_apply_patch

Apply safe layout ops to a COPY of the DOCX (original untouched), validate by reopening the result, and save a revision.

Each op = {"op": , "target": "el-N" | anchor, ...params}. target may be a positional el-N id or a stable anchor (w14:paraId, or t:{paraId} for a table). Supported ops: set_spacing(before_pt?, after_pt?, line?) · set_keep_with_next(enabled) · set_page_break_before(enabled) · set_paragraph_style(style) · set_font(size_pt?, name?) · set_table_width(width_mm)

Call doc_get_structure first for ids/anchors + version_hash; pass that as expected_version_hash. The output always carries anchors so a chain of patches stays addressable. Returns {ok, output, version_hash, applied, results[], validation}. Each op reports applied/error independently.

doc_autofix

Closed loop as one tool: report → fix → re-render → diff, until nothing is left to fix or max_iter. The original file is never modified.

mode (default 'safe'):

  • 'review' plans the ops without applying (dry run),

  • 'safe' applies renderer-invariant fixes (table wider than the text column → fit it),

  • 'full' also pins headings with keep_with_next (prevents orphans) and clamps over-large paragraph spacing to the rule-pack caps.

Regression guard: if an iteration introduces a NEW warning, that revision is discarded and the loop stops with the previous good version kept.

Returns document_final (path to the fixed revision), baseline vs final counts, per-iteration history with before/after diffs (and reverted if rolled back), accepted (critical==0), and unresolved issues that need judgement.

doc_diff_versionsB

Render two DOCX versions and diff their layout reports: what got resolved, what regressed (new), page-count delta, and per-severity count deltas.

doc_get_page_imageA

OPTIONAL visual channel: render ONE page of the DOCX to a PNG for the agent to eyeball a specific concern.

Use sparingly — images are costly in model context (see docs/01-compatibility.md); the deterministic doc_render_report (no images) is the primary signal. dpi is clamped to 36..300. On failure returns a structured {ok:false, error} instead.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/Alvnvnc/visualdoc-mcp'

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