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.

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. Added

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the confinement policy (TWEEKIT_ALLOWED_DIRS), symlink rejection via lstat and O_NOFOLLOW, dotfile/credential blocking, and non-overwrite protection. This tells the agent exactly what could fail or be refused before it calls the tool, which the openWorldHint/idempotentHint annotations do not convey.

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?

Two tight sentences with the gating condition front-loaded and the security posture following. Dense but every clause carries information; the parenthetical env-var names are slightly noisy but functional.

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 14-parameter mutation-ish tool with no output schema, the description covers the access model and safety guarantees that an agent most needs. It omits return-value behavior and crop/page semantics, but those are adequately handled by the schema.

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 all 14 parameters including crop coordinates, page, alpha, and output_path are already documented in the schema. The description adds no per-parameter meaning beyond the overwrite/symlink note already implied by output_path's own schema text, so 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 ('Convert a local workspace file') and scopes it to local workspace files, which implicitly separates it from sibling convert_url and convert. It never names an alternative explicitly, so differentiation is inferential rather than stated.

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?

Gives clear gating conditions for use: requires TWEEKIT_ALLOW_LOCAL_FILES=1, is disabled by default, and is disabled over HTTP. It does not say when to prefer convert_url or convert instead, so the when-not is environmental rather than comparative.

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.