Skip to main content
Glama

Razi Document Tools

parse_document

Use this when the file ALREADY stores its text as characters: it decodes them and returns JSON { text, metadata } verbatim, with no guessing involved. That exactness is the whole difference from extract_text_ocr, which recovers text from pixels by guessing at glyph shapes and should only ever be pointed at a photo, screenshot or scan. Supported: .txt, decoded as UTF-8 and returned in full with metadata { format: "txt", words }; and .pdf, where the text layer is read page by page and joined with a --- Page N --- separator, returning metadata { format: "pdf", pages, words } — pages and words are counted from the document itself, never estimated. .docx and every other extension are rejected with 400. A scanned or photographed PDF has no text layer, so nothing can be extracted from it here; that case returns 422 with a metadata.imageOnly flag rather than an empty success, and extract_text_ocr is the tool for it. Limits: 50MB and 300 pages, over which the call returns 413; an unreadable or encrypted PDF returns 400. Layout is not preserved — no tables, columns or coordinates, just a flat string per page. The file type is decided by the filename extension, not by inspecting the bytes. 10 calls per minute per caller. There is no upload channel over MCP: pass fileUrl, a URL in razi.pro's own storage; third-party URLs are rejected. Obtain one by uploading the file over the REST API first (POST /api/v1/tools/execute with the file attached).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

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

  1. First observed

TDQS

A4.9/5.0
Behavior5/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 discharges it exceptionally: exact error codes (400 for unsupported/unreadable/encrypted files, 422 with metadata.imageOnly for image-only PDFs, 413 for over-limit), concrete limits (50MB, 300 pages, 10 calls/min), the layout-not-preserved caveat, extension-based detection rather than byte inspection, third-party URL rejection, and the REST upload prerequisite. This fully discloses the tool's failure modes and operational constraints.

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 long, but nearly every sentence carries a distinct operational fact (formats, error codes, limits, rate limit, URL constraints), and the most important content — use case and OCR distinction — is front-loaded. It loses one point for minor redundancy: the scanned/photographed-PDF concept is introduced in the OCR contrast and then restated in the 422 case, and the upload flow sentence is dense enough to warrant splitting.

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 an empty schema, no annotations, and no output schema, the description must cover selection, invocation, and failure behavior on its own — and it does. It specifies the return shape (text plus per-format metadata fields), every rejection path with its status code, page separator format for PDFs, size/page limits, the rate limit, and the exact mechanism for obtaining a valid fileUrl. For a moderately complex tool with rich edge cases, nothing an agent needs to call it correctly is missing.

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?

The schema is empty (0 params), so the baseline is 4 and the description must compensate — and it exceeds that baseline by documenting the effective parameter fileUrl in prose: it must be a URL in razi.pro's own storage, third-party URLs are rejected, and it is obtained by uploading via the REST API (POST /api/v1/tools/execute). This gives the agent complete information about the argument it must supply despite the schema defining nothing.

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 states a specific verb and resource: 'it decodes them and returns JSON { text, metadata } verbatim' for files that 'ALREADY store text as characters.' It explicitly differentiates from the sibling extract_text_ocr ('That exactness is the whole difference'), and enumerates the exact supported formats (.txt, .pdf text layer). An agent can immediately tell what this tool does and how it differs from its siblings.

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?

Provides explicit when-to-use guidance ('Use this when the file ALREADY stores its text as characters'), explicit when-not-to-use guidance ('should only ever be pointed at a photo, screenshot or scan' for extract_text_ocr), and names the alternative tool twice — including the specific 422 case where 'extract_text_ocr is the tool for it.' No inference is required.

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.

Resources