Skip to main content
Glama

editDocument

Parse a document, apply JSON edit deltas, and return the modified blocks as JSON (same format as POST /api/v1/parse with outputFormat=blocks).

filepath: uploaded file path (multipart upload). deltas: JSON array of edit operations — see edit_apply.ail for format. Empty array or "" → round-trip (parse + return unchanged blocks). apiKey: dp_ API key.

Response: modified blocks JSON. Use the AILANG SDK or CLI to generate a file from the returned blocks (e.g. ailang run ... --convert output.docx).

Only deterministic office formats are supported (docx, pptx, xlsx, odt, odp, ods). AI-required formats (pdf, image, audio, video) are rejected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyYes
deltasYes
filepathYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Added

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 of behavioral disclosure. It explains core behavior (apply deltas, return blocks), the round-trip behavior for empty deltas, the response format, and supported/rejected file types. It could add details about error handling or invalid deltas, but is otherwise transparent.

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

Conciseness5/5

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

The description is structured with clear separation for main behavior, parameter details, response, and format constraints. Every sentence contributes useful information, with no filler or redundancy.

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?

Despite having no output schema and no annotations, the description covers the input parameters, output format, how to use the result (AILANG SDK/CLI), and format restrictions. It is sufficiently complete for an agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate—and it does. It explains filepath (uploaded file path), deltas (JSON array, format reference, empty array behavior), and apiKey (dp_ API key). This is meaningful semantic detail beyond the plain schema strings.

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 starts with a specific verb+resource: 'Parse a document, apply JSON edit deltas, and return the modified blocks as JSON.' It clearly defines what the tool does and differentiates it from sibling parse-only tools like mcpParse by emphasizing the delta application and round-trip behavior.

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 provides clear context on when to use the tool: for deterministic office formats (docx, pptx, xlsx, etc.) and explicitly states that AI-required formats (pdf, image, audio, video) are rejected. It also advises using the AILANG SDK/CLI for conversion, but does not explicitly name alternative MCP tools for parsing-only tasks.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.5/5.0
Disambiguation4/5

Most tools have clear, distinct purposes: parse, convert, estimate, formats, auth, auth-poll, account, upload, and feedback. The main ambiguity is that editDocument with an empty delta array behaves like a parse, overlapping with mcpParse.

Naming Consistency2/5

Seven tools share a useful mcp prefix with PascalCase, but editDocument and getUploadUrl are camelCase and submit_feedback is snake_case. The casing and verb-style inconsistencies make the tool set feel less coherent than its overall design suggests.

Tool Count5/5

Ten tools is a well-scoped size for this domain: authentication, account, upload, formatting, estimation, parsing, editing, conversion, and feedback are each represented. No tool feels redundant or like filler.

Completeness4/5

The surface covers the key parse workflow: get an API key, upload, estimate, parse, edit, convert, and check supported formats. Minor gaps exist, such as no explicit API-key revoke action and some output/workflow steps being delegated to the SDK/CLI.