Skip to main content
Glama

convert_url

Download a remote file and convert it with TweekIT in one step.

This helper first fetches url, infers the input extension when possible, and then forwards the bytes to convert. Supply fetchHeaders when the remote resource needs authentication or custom headers.

Args: url: Direct download URL for the source document or image. outfmt: Desired output format (Fmt). 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. inext: Optional override for the source extension if it cannot be detected from the URL or response headers. 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. fetchHeaders: Optional mapping of HTTP headers to include when fetching.

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.
urlYesDirect download URL for the source document or image.
pageNoPage number to convert for multi-page inputs.
alphaNoPreserve alpha transparency when producing raster formats.
inextNoOverride for the detected input extension (e.g., pdf).
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.
fetchHeadersNoOptional HTTP headers to include when downloading the URL.

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the two-step behavior (fetch then convert), extension inference fallback, API key/secret env var fallbacks, and the return type (Image/File payload or error description). It stops short of noting potential network side effects or failure modes beyond error descriptions, but the key behaviors are transparent.

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 front-loaded with a concise summary and workflow, followed by an organized Args list and a Returns line. Each argument line is brief, but the list is long due to 16 parameters and largely duplicates the schema, which makes the overall docstring somewhat redundant yet still well-structured.

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?

For a complex tool with 16 parameters, no output schema, and no annotations, the description covers the core workflow, authentication via headers/env vars, parameter semantics, and return type. It adequately explains the tool's place relative to `convert` but could expand on failure cases or supported formats; however, it is sufficiently complete for an agent to invoke it correctly.

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 coverage is 100%, so the baseline is 3. The description repeats the parameter list in a docstring format, adding only minor context such as the condition for `inext` ('if it cannot be detected from the URL or response headers'). This provides little additional meaning over the rich schema descriptions.

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 clearly states the tool's purpose: 'Download a remote file and convert it with TweekIT in one step.' It uses a specific verb and resource, and the explanation of fetching, inferring extension, and forwarding to `convert` distinguishes it from sibling tools like `convert` and `fetch`.

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 provides clear context: it is a helper that first fetches the URL and then converts, and it instructs 'Supply `fetchHeaders` when the remote resource needs authentication or custom headers.' It does not explicitly state when NOT to use this tool (e.g., for local files use `convert`), but the workflow is clear enough for an agent to infer.

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.