Skip to main content
Glama

Convert a file

tarkle_convert_file

Converts a file into a NEW file. "to": text (a PDF's text as .txt), images (each page as PNG or JPG in a .zip, up to 30 pages; imageFormat), split (a .zip of PDFs; ranges "each" or "1-3,4-6"), word (the text as a .docx: headings, paragraphs, bullets, tables; layout and pictures are not kept), excel (the tables found by position as a .xlsx; none found is refused), pdf (fileId is a picture, with moreFileIds for more pictures and pageSize fit, a4 or letter; or fileId is ONE Word, Excel or PowerPoint file, converted by LibreOffice in an isolated sandbox, which can take up to about half a minute), ocr (a searchable PDF from a scan; English, up to 8 scanned pages a run), redact (terms: the exact texts to black out, and/or emails true: every page with a match becomes a picture so the text is gone for good; every term must exist; a scan cannot be redacted), compress (level light, medium or strong). pages limits text, images, word, excel, ocr and redact to some pages. Adding or removing a PDF password is NOT available here (a password would pass through the conversation): use the Tarkle API or the chat. The file is never changed: a NEW file is saved next to it (or in folderId) and its fileId is returned; a taken name is refused (NAME_TAKEN). The same function and limits as the Tarkle chat and the API: 40 MB a PDF, a password-protected or damaged PDF is refused with the reason.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspaceId": "<workspaceId>",
      "fileId": "<fileId>",
      "to": "<to>"
    },
    "name": "tarkle_convert_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesThe kind of file to make. The other fields that apply depend on it; see the tool description.
nameNoName for the new file. Tarkle sets the right file extension. When omitted, the name is made from the source file's name.
levelNoWhen converting to compress: how strongly to compress. medium when omitted.
pagesNoWhich pages to use, as page numbers and ranges counted from the first page, for example 1-3,5,8-.
termsNoWhen converting to redact: the exact texts to black out. Every term must be found in the file.
emailsNoWhen converting to redact: true also blacks out every email address.
fileIdYesA fileId from tarkle_list_files or tarkle_list_bin.
rangesNoWhen converting to split: how to cut the PDF, either each (one PDF per page) or ranges like 1-3,4-6. each when omitted.
folderIdNoFolder to save the new file in, from tarkle_list_folders or tarkle_create_folder. Use null for the library root. When omitted, the new file goes in the source file's folder.
pageSizeNoPage size when converting pictures to pdf. fit when omitted.
llm_modelNoThe model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics.
imageFormatNoPicture format when converting to images. png when omitted.
moreFileIdsNoWhen converting pictures to pdf: more pictures to add after the source, in the order given. Each is a fileId from tarkle_list_files or tarkle_list_bin.
workspaceIdYesThe workspace's id from tarkle_list_workspaces.

Output Schema

NameRequiredDescriptionDefault
fileNo
notesNo

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-destructive, non-idempotent, so the bar is lower, and the description still adds substantial context: the source is never modified, a new file lands next to it or in folderId, fileId is returned, NAME_TAKEN on collisions, 40 MB cap, password/damaged PDFs refused, and redaction is irreversible because pages become pictures. It omits nothing critical, though it could state that re-running with the same inputs will produce a duplicate rather than being idempotent.

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

Conciseness3/5

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

The content is largely earning its place, but it is delivered as one dense, semicolon-chained paragraph with mode semantics buried mid-sentence, which makes scanning for a specific mode slow. A bulleted per-mode structure would convey the same information with much better retrieval. The core statement is correctly front-loaded.

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?

For a 14-parameter tool with nine distinct modes, an output schema, and full annotation coverage, the description supplies everything an agent needs: per-mode output artifacts, limits, failure modes, and the non-destructive contract. Nothing material is left to inference.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description genuinely adds meaning the schema lacks: that redaction is permanent, that excel refuses when no tables are found, that images caps at 30 pages and pdf/OCR have their own limits, and how `pages`/`ranges` interact with specific modes. It stops short of explaining `llm_model` or `moreFileIds` ordering beyond what the schema says.

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 first sentence states a specific verb and resource plus the key scoping fact: 'Converts a file into a NEW file', and the body enumerates exactly what each `to` mode produces. It does not name any sibling tool (e.g. tarkle_copy_file or tarkle_edit_office_file) to draw boundaries, so it falls short of a 5.

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?

Usage is given per mode: `pages` applies to text/images/word/excel/ocr/redact, `ranges` to split, `level` to compress, and 'none found is refused' for excel. It also excludes a related task explicitly ('Adding or removing a PDF password is NOT available here... use the Tarkle API or the chat'). Missing is any guidance on when to pick this over conversion-adjacent siblings like copy or edit_office_file.

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.