Skip to main content
Glama
leanzero-srl

MCP Document Processor

Official
by leanzero-srl

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
Z_AI_API_KEYNoAPI key for vision OCR service (also checks ZAI_API_KEY, ANTHROPIC_AUTH_TOKEN)
Z_AI_TIMEOUTNoRequest timeout in milliseconds300000
Z_AI_BASE_URLNoOverride base URL for vision API
MCP_CLIENT_TYPENoSets client hint mode: 'interactive' for concise responses, 'agent' for verbose (default)
Z_AI_VISION_MODELNoVision model nameglm-4.6v
READ_DOC_MAX_BYTESNoMaximum decoded payload size accepted by the read-doc URL-fetch path (in bytes)52428800
WRITE_DOC_MAX_BYTESNoMaximum file size the create-* tools will POST to a remote uploadUrl (in bytes)26214400
SKIP_TABLE_EXTRACTIONNoSkip table extraction from images during PDF processingtrue

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
read-docA

Read and analyze PDF, DOCX, Excel, or PowerPoint (.pptx) files. Modes: 'summary' (overview with preview), 'indepth' (full text, structure, metadata), 'focused' (query-based search). For a .pptx it returns a per-slide transcript (titles, bullets, speaker notes) and the slide count. Source: either local filePath OR a remote https url whose response is {data:base64, filename, mimeType, size} JSON guarded by authHeader (used for one-shot capabilities like CogniRunner attachment fetches). Always read before editing; use 'indepth' before edit-doc.

detect-formatA

PLAN the best output format BEFORE creating. Call this FIRST whenever the user didn't explicitly name a format. It weighs explicit format words, what the user wants to DO with the file, topic, and content shape — then returns a ready-to-use creation plan. Nuance it captures: 'README / API / spec / for the repo' → markdown; 'budget / tracker / dataset / table' → excel (CSV if they say csv); 'editable / draft / template / in Word' → docx; 'print / send to the client / official / invoice / resume / final / sign' → PDF. DOCX = editable Word; PDF = final, fixed-layout, print/sign/send. Returns { format (markdown|docx|excel|pdf), suggestedTool, stylePreset, category, docType, confidence, reason, alternativeFormat, outputFormat? ('csv'), unsupported? ('pptx'), note? }. Pass these straight into the create-* tool. There is no native slides/PowerPoint tool yet — it recommends the closest fit (usually PDF) and flags unsupported:'pptx'.

create-docA

Create a styled, EDITABLE Word DOCX. USE for stakeholder/business/legal/research deliverables the user will keep editing in Word, or when they say 'Word / .docx / editable / draft / template'. NOT for: a final/print/send-as-PDF deliverable (→ create-pdf), code/API/README docs (→ create-markdown), or tabular/numeric data (→ create-excel). The most full-featured tool: Document DNA defaults, 8 style presets, headers/footers with page numbers, margins, blueprint validation, and real tables. ALWAYS format the body with markdown — never a wall of plain text. Simplest: put the whole body in the content string. Supported markdown: '# H1' '## H2' '### H3' headings; 'bold'; 'italic'; 'code'; '- ' or '1. ' lists; '> ' blockquotes; '---' horizontal rule; fenced code blocks; '| a | b |' GitHub tables (with a '|---|---|' separator row); 'text' links. EXAMPLE content: "## Overview\nThis report covers Q2 results.\n\n### Highlights\n- Revenue up 18%\n- Two new markets\n\n| Metric | Value |\n|---|---|\n| MRR | $42k |\n| Churn | 1.2% |\n\n> Next review: July." Title MUST be specific. Duplicate → { duplicate: true, existingPath } (switch to edit-doc). Response includes formattingQuality and formatSuggestion — if formatSuggestion is set, the content fits another format better, so heed it. Use dryRun: true for preview.

create-markdownA

Create a Markdown (.md) file for technical/code content that lives in a repo. USE for READMEs, API docs, specs, runbooks, changelogs, integration guides, code-heavy content — anything for GitHub/developers. NOT for stakeholder-facing or printable deliverables (→ create-doc / create-pdf) or tabular data (→ create-excel). MARKDOWN SUPERPOWERS: set toc: true to auto-generate an anchor-linked Table of Contents from the H2/H3 headings; pass frontmatter: {...} to emit YAML frontmatter (title, date, tags[]) for static-site generators (Hugo/Jekyll/Astro). Simplest usage: put the whole body in the content string. Supported markdown: '# H1' '## H2' '### H3' headings; 'bold'; 'italic'; 'code'; '- ' or '1. ' lists; '> ' blockquotes; '---' horizontal rule; fenced code blocks; '| a | b |' GitHub tables (with a '|---|---|' separator row); 'text' links. The title becomes the H1, so start content at '## '. Title MUST be specific. Response includes formattingQuality. Use dryRun: true for preview.

create-excelA

Create a styled Excel XLSX (or CSV). USE for ANY tabular/numeric data — budgets, trackers, datasets, KPIs, price lists, schedules; even a table inside a 'report' belongs here, not in a doc. EXCEL SUPERPOWERS: a cell whose string starts with '=' becomes a LIVE formula (e.g. "=SUM(B2:B9)", "=B2C2") that Excel computes on open; columns whose header looks like money ($/price/cost/revenue) or percent (%) auto-format; the header row gets autofilter dropdowns; columns auto-fit. The first row of each sheet is the header (auto-styled bold/filled), body rows get zebra striping — you only supply values. Set outputFormat: "csv" for a plain CSV (first sheet only; no styling/formulas). EXAMPLE: sheets: [{ name: "Q2 Revenue", data: [["Month","Units","Price","Revenue"],["Apr",120,9.99,"=B2C2"],["Total","=SUM(B2:B2)","","=SUM(D2:D2)"]] }]. Sheet names MUST be specific (rejects 'Sheet1', 'Data', etc.). Use dryRun: true for preview.

create-pdfA

Create a FINAL, fixed-layout PDF to read / print / send / sign. USE when the user says PDF / print / 'send to the client' / official / invoice / flyer / resume / cover letter / 'read-only' / 'final version'. NOT for content they'll keep editing (→ create-doc) or code/repo docs (→ create-markdown). Rendered from markdown with the same 8 presets as create-doc, via headless Chromium. PDF SUPERPOWER: set toc: true for a clickable Table of Contents (with heading anchors) at the top. Supports headers/footers with {current}/{total} page numbers and margins. ALWAYS format the body with markdown. Easiest: put the whole body in the content string. Supported markdown: '# H1' '## H2' '### H3' headings; 'bold'; 'italic'; 'code'; '- ' or '1. ' lists; '> ' blockquotes; '---' horizontal rule; fenced code blocks; '| a | b |' GitHub tables (with a '|---|---|' separator row); 'text' links. EXAMPLE content: "## Overview\nThis report covers Q2 results.\n\n### Highlights\n- Revenue up 18%\n- Two new markets\n\n| Metric | Value |\n|---|---|\n| MRR | $42k |\n| Churn | 1.2% |\n\n> Next review: July." Title MUST be specific. Response includes formattingQuality and formatSuggestion. Use dryRun: true for preview. (To READ a PDF, use read-doc.)

create-pptxA

Create an EDITABLE PowerPoint presentation (.pptx) you can open in PowerPoint / Keynote / Google Slides. USE when the user asks for slides / a deck / a presentation / a pitch deck / 'powerpoint' / 'keynote'. NOT for a flowing document (→ create-doc / create-pdf), code/repo docs (→ create-markdown), or pure tabular data (→ create-excel). SLIDE STRUCTURE: the title becomes a centered title slide; EACH '## ' heading starts a NEW slide whose body is the markdown beneath it. Inside a slide, '### ' is a sub-heading, '- '/'1. ' are bullets, '| a | b |' GitHub tables render as native slide tables, a chart fenced block (first line 'type: bar|column|line|pie|doughnut|area', optional 'title:', then a markdown table whose first column is the category and each other column is a data series) becomes a NATIVE editable chart, and fenced code blocks render as monospace. Keep each slide focused — a few bullets, not a wall of text. Styled from the same 8 presets as create-doc (colors/fonts map onto the slides). Supported markdown: '# H1' '## H2' '### H3' headings; 'bold'; 'italic'; 'code'; '- ' or '1. ' lists; '> ' blockquotes; '---' horizontal rule; fenced code blocks; '| a | b |' GitHub tables (with a '|---|---|' separator row); 'text' links. EXAMPLE content: "## Problem\n- Manual steps are slow\n- Errors slip through\n\n## Our Solution\n- One-click automation\n- Built-in checks\n\n## Results\n| Metric | Before | After |\n|---|---|---|\n| Time | 2h | 5m |". Title MUST be specific. Use dryRun: true to preview the slide breakdown. (To make a fixed, non-editable deck use create-pdf instead.)

edit-pptxA

Edit an existing PowerPoint (.pptx). Actions: 'preview' (show the current slide outline), 'append-slides' (add new slides from markdown — one '## ' heading per slide), 'replace-slide' (replace one content slide by 1-based index with new markdown). IMPORTANT: edit-pptx REBUILDS the deck from the existing slides' extracted TEXT + speaker notes, normalized to a style preset — charts, images, and exact original formatting on pre-existing slides are NOT preserved (best for the text/bullet decks create-pptx makes). To author a brand-new deck use create-pptx; to read a deck use read-doc.

edit-docA

Edit an existing DOCX. Actions: 'append' (XML-patches new content, PRESERVES original formatting/headers/footers/images), 'replace' (overwrites body but keeps section properties), 'style' (apply a stylePreset to existing paragraphs without changing text), 'preview' (show what would change). Always read-doc with mode 'indepth' first so you understand the existing structure.

edit-excelA

Edit an existing XLSX workbook. Actions: 'append-rows' (add rows to a sheet, preserves existing styles), 'append-sheet' (add a new sheet — fails if name exists), 'replace-sheet' (overwrite a sheet's data), 'preview' (show what would change). Use read-doc first if you don't know the sheet structure.

list-documentsA

Search the document registry. Filters compose with AND-logic: category match AND tag match AND title-substring match. Returns an array of registry entries with { id, title, filePath, category, tags, description, createdAt, updatedAt }. Use this before create-doc to check if a similar document exists.

list-templatesA

List available document templates AND blueprints. Templates are static, named structures (e.g. 'claude-like', 'technical-docs', 'business-report') you can reference via tags on create-doc. Blueprints are auto-learned structures stored in .document-blueprints.json. Use the returned name as blueprint: in create-doc, or as a tag for create-doc tag-based style detection.

dnaA

Manage the project's Document DNA — header/footer/style defaults that auto-apply to every create-doc call. Actions: 'init' (one-time setup with companyName/header/footer/stylePreset), 'get' (current config + project profile), 'evolve' (analyze usage trends; with apply:true, MUTATES dna config and may auto-create blueprints — irreversible without manual cleanup), 'save-memory'/'delete-memory' (project-wide preferences keyed by string).

blueprintA

Manage structural blueprints — section/heading templates extracted from real documents. Actions: 'learn' (extract from a DOCX or PDF you already have), 'list' (show stored blueprints), 'delete' (remove by name). Blueprints are also auto-learned during 'dna evolve' when recurring structures are detected. Use a blueprint by passing { blueprint: '' } to create-doc — the tool will validate that your paragraphs match the structure.

drift-monitorA

Monitor documents for structural drift over time. Actions: 'watch' (compute and store a fingerprint = SHA-256 + heading tree + word counts; capped at 500 paragraphs), 'check' (compare current state against the stored baseline; reports word-count delta, added/removed headings, category shifts, and a similarity score). Omit filePath on 'check' to compare all watched documents.

get-lineageA

Trace the provenance chain of a document. Returns a tree { sources: [{filePath, ...}], derivatives: [{filePath, ...}] } showing which read documents informed this document (sources, traced upstream) and which created documents derived from it (derivatives, traced downstream). Lineage is recorded automatically when read-doc and create-doc are called within the same session.

fact-checkA

Fact-check a document (or explicit claims) against the LIVE WEB. CROSS-MCP tool: doc-processor extracts the claims, then CALLS the web-search MCP (get-web-search-summaries) to gather sources per claim, and optionally writes a cited PDF report. Provide claims (an array of statements) OR a filePath/content to auto-extract factual claims from. Because this reaches the web-search MCP you MUST pass webSearchBearer (your web-search demo key) and serperKey (your Serper key); webSearchUrl defaults to the hosted web-search endpoint. Returns, per claim, the retrieved evidence + source URLs + a ROUGH keyword-overlap support score — NOT a verdict; read the evidence and decide support/refute yourself. Set generateReport: true for a downloadable cited PDF.

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/leanzero-srl/leanzero-mcp-doc-processor'

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