Skip to main content
Glama

Convert Local Workspace File (Opt-In)

convert_file
Idempotent

Convert a local workspace file when explicitly opted in (TWEEKIT_ALLOW_LOCAL_FILES=1).

Disabled by default and over HTTP, strictly confined to TWEEKIT_ALLOWED_DIRS with symlink rejection (lstat + O_NOFOLLOW), dotfile/credential blocking, and non-overwrite protection. For zero cloud egress, set TWEEKIT_LOCAL_ONLY=1 (or TWEEKIT_REQUIRE_LOCAL_MINER_FOR_FILES=1) with an On-Premises Miner Renderery (TWEEKIT_API_BASE_URL=http://127.0.0.1:16377/api/image/).

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": {
      "file_path": "<file_path>",
      "outfmt": "<outfmt>"
    },
    "name": "convert_file"
  }
}

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.
pageNoPage number to convert for multi-page inputs.
alphaNoPreserve alpha transparency when producing raster formats.
inextNoOverride for the input file extension (inferred from file_path when omitted).
widthNoOptional pixel width for the converted output.
heightNoOptional pixel height for the converted output.
outfmtYesRequested output format (e.g., pdf, png, webp, txt).
bgColorNoBackground color (hex RGB) to composite behind transparent pixels.
file_pathYesPath within TWEEKIT_ALLOWED_DIRS to the input document or image (requires TWEEKIT_ALLOW_LOCAL_FILES=1 and TWEEKIT_ALLOWED_DIRS).
noRasterizeNoForward to TweekIT to disable rasterization when supported.
output_pathNoOptional destination path within TWEEKIT_ALLOWED_DIRS (refuses symlinks and existing files unless TWEEKIT_ALLOW_OVERWRITE=1).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond annotations, the description discloses important behavior: symlink rejection via lstat and O_NOFOLLOW, dotfile/credential blocking, non-overwrite protection, and a zero-egress local-only mode. These are material operational constraints an agent needs before invoking the tool.

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 the opt-in condition and then layers security and egress details efficiently. It is dense with environment variable names and parentheticals, but each sentence carries relevant operational information.

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?

For a complex 14-parameter conversion tool with no output schema, the description covers access gating and security behavior well. However, it does not describe the conversion result, where output is produced by default, or what the response contains, leaving a gap for callers.

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%, so the input schema already documents all 14 parameters in detail. The description reinforces file_path and output_path security constraints, but adds little parameter meaning beyond what the schema already provides, so the baseline of 3 is appropriate.

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 verb and resource: convert a local workspace file. The title and gating language distinguish it from cloud/URL-oriented siblings such as convert_url by making the local-workspace scope and opt-in requirement explicit.

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?

It clearly states when the tool can be used: only when explicitly opted in via TWEEKIT_ALLOW_LOCAL_FILES=1, and disabled by default and over HTTP. It also gives the local-only egress configuration, though it does not explicitly compare this tool against convert or convert_url alternatives.

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.