Skip to main content
Glama
leanzero-srl

MCP Document Processor

Official
by leanzero-srl

detect-format

Analyzes a user's request to determine the optimal document format—markdown, docx, excel, or pdf—based on intent, content, and keywords like 'README' or 'invoice'. Returns a creation plan with format, style, and tool recommendations.

Instructions

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'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoDocument title if already chosen.
contentNoContent preview if available — the more context, the better the routing.
userQueryYesThe user's original request, verbatim if possible.
Behavior4/5

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

With no annotations, the description carries full burden. It explains the analysis logic (weighs words, intent, topic) and return fields comprehensively. However, it omits details about error handling or edge cases (e.g., ambiguous input).

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?

Front-loaded with key instruction, then detailed examples. Every sentence adds value, though slightly verbose. Well-organized with logical flow from usage to return structure.

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?

Given no output schema, the description fully explains all return fields and logic. Covers format detection rules, unsupported formats, and integration with creation tools. Complete for a planning tool.

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 coverage is 100% with good descriptions. The description adds minimal extra meaning beyond 'the more context, the better' for content. Does not significantly enhance parameter understanding beyond schema.

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 clearly states the tool's verb ('PLAN') and resource ('best output format'), with specific examples of format detection logic. It distinguishes itself from sibling creation tools by emphasizing it should be called FIRST to determine format.

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?

Explicitly says 'Call this FIRST whenever the user didn't explicitly name a format', providing clear when-to-use guidance. Also implies when-not-to-use (if format is named). Describes context-dependent format selection with examples.

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

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