Skip to main content
Glama

Convert Base64 Document

convert
Idempotent

Convert a base64-encoded document payload with TweekIT (Cloud CGN or On-Premises Miner Renderery).

Credentials are read securely from TWEEKIT_API_KEY / TWEEKIT_API_SECRET environment variables or HTTP ApiKey / ApiSecret headers. Set TWEEKIT_API_BASE_URL=http://127.0.0.1:16377/api/image/ and TWEEKIT_LOCAL_ONLY=1 for air-gapped localhost Miner Renderery processing.

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": {
      "inext": "<inext>",
      "outfmt": "<outfmt>",
      "blob": "<blob>"
    },
    "name": "convert"
  }
}

Input 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.
heightNoOptional pixel height for the converted output.
outfmtYesRequested output format to send as Fmt.
bgColorNoBackground color (hex RGB) to composite behind transparent pixels.
noRasterizeNoForward to TweekIT to disable rasterization when supported.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / apiKey
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "TweekIT API key passed via the ApiKey header. Defaults to the TWEEKIT_API_KEY environment variable when omitted."
      -}
    • removedInput schema / properties / apiSecret
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "TweekIT API secret paired with the apiKey. Defaults to the TWEEKIT_API_SECRET environment variable when omitted."
      -}
  2. First observed

TDQS

B3.3/5.0
Behavior3/5

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

The description adds genuinely useful context beyond the annotations: an external cloud/on-prem rendering service, credential sourcing via env vars or ApiKey/ApiSecret headers, and an air-gapped localhost mode. It does not cover output shape, error behavior, size limits, or what idempotency means in practice for a conversion call, so it remains thinner than ideal for a network-dependent tool.

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?

Purpose is front-loaded in the first sentence, which is good. The following two sentences are largely environment-configuration tutorial with vendor jargon ('Cloud CGN', 'Miner Renderery'), and the parenthetical adds little for tool selection while consuming a third of the text.

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

Completeness3/5

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

With 13 parameters, no output schema, and an external service dependency, an agent needs to know what comes back and how failures surface; neither is addressed. Setup and credential handling are covered adequately, but the description stops short of complete for a conversion call whose result format is undocumented.

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% with 13 well-described parameters, so the schema already carries the full parameter burden. The description contributes nothing about crop coordinates, page selection, sizing, or alpha handling; baseline 3 applies.

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?

States a specific verb and resource: converting a base64-encoded document payload, with the external service (TweekIT) named. The 'base64-encoded payload' framing implicitly separates it from file-path or URL siblings, but no sibling is named explicitly, so differentiation is left to inference.

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?

Usage is only implied by the resource qualifier (base64 payload) plus setup notes about credentials and an air-gapped localhost mode. There is no explicit statement of when to choose this over convert_file, convert_url, or preflight, and no exclusions or failure conditions are given.

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.