Skip to main content
Glama

Brainiall Documents

Convert PDF to Markdown

pdf_to_markdown
Read-onlyIdempotent

Convert a PDF into readable Markdown for analysis and retrieval.

Use this when an agent needs the text, headings, tables, and document structure from a PDF. Supply exactly one source: a public URL or base64 PDF bytes. The optional page range is useful for large documents.

Returns: Markdown text on success, or an actionable error object on failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic URL pointing directly to a PDF. Provide this or pdf_base64, never both.
page_rangeNoOptional pages to convert, such as '1-5'. Omit to convert the entire PDF.
pdf_base64NoBase64-encoded PDF bytes. Provide this or url, never both.

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds value by stating the return behavior: 'Markdown text on success, or an actionable error object on failure.' This clarifies outcomes without contradicting the annotations or omitting major behavioral traits for a read-only conversion tool.

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 compact and well-organized: a front-loaded purpose statement, a brief usage paragraph with input constraints, and a distinct Returns line. There is no filler or repetition of schema details, and every sentence contributes to the agent's understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the tool's purpose, input sourcing, optional page range, and return behavior. Since there is no output schema, the explicit mention of 'Markdown text' and 'actionable error object' helps set expectations. It does not discuss size limits or authentication, but for a simple read-only converter with fully described parameters and safety annotations, the definition is adequately complete.

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 description coverage is 100%, and the schema already explains each parameter, including the mutual-exclusivity of url and pdf_base64. The description's extra notes—'Supply exactly one source' and 'optional page range is useful for large documents'—reinforce but do not materially add to the schema. A baseline of 3 is appropriate since the schema carries the parameter documentation burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence, 'Convert a PDF into readable Markdown for analysis and retrieval,' provides a specific verb, resource, and output format. It also lists the content types preserved (text, headings, tables, structure), which clarifies scope. However, it does not explicitly name or distinguish itself from the sibling tools check_document_service and extract_document_fields, so it falls short of full sibling differentiation.

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 tells the agent exactly when to use it: 'Use this when an agent needs the text, headings, tables, and document structure from a PDF.' It also gives practical input guidance ('Supply exactly one source') and notes the page_range option for large documents. It does not provide explicit when-not-to-use cases or point to alternative tools, so it stops at clear context rather than full exclusion guidance.

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

A4.3/5.0
Disambiguation5/5

Each tool targets a distinct operation: service health checking, image-based field extraction, and PDF-to-Markdown conversion. The descriptions explicitly separate image vs PDF input and structured fields vs Markdown output, so there is no meaningful overlap.

Naming Consistency4/5

check_document_service and extract_document_fields follow a clear verb_noun pattern, while pdf_to_markdown uses a conventional format-conversion style. The consistent snake_case naming and domain-specific verbs keep the set predictable despite the one stylistic deviation.

Tool Count5/5

Three tools is well-scoped for a focused document conversion and extraction service. Each tool earns its place, and the included health check supports workflow reliability without adding unnecessary bloat.

Completeness4/5

The core document workflows are covered: PDFs become Markdown, document images become structured fields and text, and availability is checkable. Direct PDF-to-fields and image-to-Markdown paths are missing, but agents can work around these using the text and Markdown outputs, making these minor gaps rather than fatal omissions.

Resources