Skip to main content
Glama

convert

Convert an uploaded document payload with TweekIT.

The file must already be base64 encoded (see blob). The conversion can be resized and cropped by providing optional geometry parameters. For raster outputs, set alpha/bgColor to control transparency handling.

Args: inext: Source file extension such as pdf, docx, or png. outfmt: Desired output format (Fmt in the API body). blob: Base64 encoded document payload (DocData). apiKey: TweekIT API key (ApiKey header). Falls back to TWEEKIT_API_KEY env var. apiSecret: TweekIT API secret (ApiSecret header). Falls back to TWEEKIT_API_SECRET env var. noRasterize: Forwarded to TweekIT to skip rasterization when possible. width: Optional pixel width to request in the output. height: Optional pixel height to request in the output. x1: Left crop coordinate in source pixels. y1: Top crop coordinate in source pixels. x2: Right crop coordinate in source pixels. y2: Bottom crop coordinate in source pixels. page: Page number to extract for multipage inputs. alpha: Whether the output should preserve alpha transparency. bgColor: Background color to composite behind transparent pixels.

Returns: A FastMCP Image or File payload, or an error description.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
x1NoLeft crop coordinate in source pixels.
x2NoRight crop coordinate in source pixels.
y1NoTop crop coordinate in source pixels.
y2NoBottom crop coordinate in source pixels.
blobYesBase64 encoded document payload (DocData).
pageNoPage number to convert for multi-page inputs.
alphaNoPreserve alpha transparency when producing raster formats.
inextYesInput file extension (e.g., pdf, docx, png).
widthNoOptional pixel width for the converted output.
apiKeyNoTweekIT API key passed via the ApiKey header. Defaults to the TWEEKIT_API_KEY environment variable when omitted.
heightNoOptional pixel height for the converted output.
outfmtYesRequested output format to send as Fmt.
bgColorNoBackground color (hex RGB) to composite behind transparent pixels.
apiSecretNoTweekIT API secret paired with the apiKey. Defaults to the TWEEKIT_API_SECRET environment variable when omitted.
noRasterizeNoForward to TweekIT to disable rasterization when supported.

TDQS

A4.2/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 behavioral burden. It discloses key behaviors: base64-encoded input requirement, optional resizing/cropping, transparency handling for raster outputs, API key/secret fallback to environment variables, and the return type (Image or File payload). It stops short of detailing error cases or side effects, but for a conversion operation this is reasonably comprehensive.

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 well-structured and front-loaded: it starts with a one-line purpose, then a short capability summary, followed by a clean list of all 15 parameters and a returns clause. For a tool with this many parameters, the length is justified; every sentence serves a purpose and the list format is easily scannable.

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 complexity (15 params, no annotations, no output schema), the description covers the essential context: prerequisites (base64), all parameters with purpose, auth fallback behavior, and return types. It does not elaborate on error responses, but it does mention 'or an error description' in returns. It could also mention when to prefer 'convert_url', but that is already scored under usage guidelines. Overall, it is sufficiently complete for an agent to select and invoke the tool.

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. The description adds relational context beyond the schema: it explains how width/height and crop coordinates fit together in the second sentence, and how alpha/bgColor interact for raster formats. While the param list largely mirrors the schema, the opening paragraph adds integrative meaning that helps an agent understand parameter interdependence.

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 opens with 'Convert an uploaded document payload with TweekIT,' which clearly states the verb, resource, and service. It distinguishes itself from the sibling 'convert_url' by explicitly referencing an uploaded payload rather than a URL, making the tool's scope clear even without naming alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage via the prerequisite 'The file must already be base64 encoded' and the mention of optional geometry/transparency parameters, but it does not explicitly state when to use this tool versus the sibling 'convert_url'. There are no exclusions or alternative recommendations, so guidance remains implied rather than explicit.

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.9/5.0
Disambiguation4/5

convert and convert_url are clearly differentiated by input source (blob vs URL), while doctype, fetch, and search serve distinct purposes. Minor overlap exists between convert_url and fetch (both fetch remote content), but the conversion vs. plain-fetch distinction is explicit in descriptions.

Naming Consistency3/5

Tool names use a mix of bare verbs (convert, fetch, search), verb_noun (convert_url), and a noun (doctype). The pattern is inconsistent, though all names are lowercase and readable.

Tool Count5/5

Five tools is a well-scoped set for a document conversion and URL retrieval server. Each tool addresses a distinct need without unnecessary redundancy.

Completeness4/5

Core workflows are covered: conversion from uploaded blobs and URLs, format discovery, and web retrieval/search. Minor gap: no explicit output format listing separate from input formats, but the convert tool's outfmt parameter covers it.