Skip to main content
Glama

convert_to_text

Convert PDFs, images, and Office files to plain text without markdown for token-limited LLMs. Tables are linearized to preserve data.

Instructions

Convert a document or image to plain text (no markdown formatting).

Best for feeding token-limited text-only LLMs. Tables are linearized. Returns just the text string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
page_rangeNo
ocr_languagesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure. It clearly states output is just a text string without markdown, and that tables are linearized. This adds useful behavioral context beyond the schema. However, it does not mention how page_range or ocr_languages affect behavior, which is a gap.

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?

Three short, front-loaded sentences with zero waste. The purpose is stated first, followed by use case and key behavioral notes. Every sentence earns its place.

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?

Given the output schema exists, return values need not be explained, and the description does mention the return type. It covers purpose, use case, and a transformation detail. However, it does not describe how the optional parameters work or what happens when an image vs document is provided, making it slightly incomplete for the tool's complexity.

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

Parameters2/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. It fails to explain page_range or ocr_languages. The only hint is 'document or image' which loosely maps to the 'source' parameter, but provides no detail on format, defaults, or constraints. This is a significant gap for a three-parameter tool.

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 action ('Convert') with a clear resource ('document or image') and output type ('plain text'). It explicitly distinguishes itself from sibling tools by noting 'no markdown formatting' and 'tables are linearized', differentiating it from convert_to_markdown and extract_tables.

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?

Provides explicit usage context: 'Best for feeding token-limited text-only LLMs.' This implies when to use this tool, though it does not explicitly mention alternatives or when not to use it. The sibling tool list helps, but the description could be more direct about when markdown or chunking would be preferred.

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/mk20mm/docling-mcp'

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