Skip to main content
Glama

run_vtf_convert

Convert .tga, .png, .bmp, or .jpg images into engine-loadable .vtf files via VTFCmd, writing the output beside the source image.

Instructions

Converts an image (.tga, .png, .bmp, .jpg ...) into a .vtf the engine can load, written beside the source. The step that used to need a GUI: read_game_content finds what the game ships, this makes what it does not. Drives VTFCmd from ficool2's VTFEdit++, a separate download; health says whether it is installed. Reads the result back and reports its real format and size rather than the ones asked for.

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": {
      "image": "<image>"
    },
    "name": "run_vtf_convert"
  }
}

Input Schema

NameRequiredDescriptionDefault
flagsNoVTF flags to set, e.g. NOLOD, CLAMPS, CLAMPT. Passed through one by one.
imageYesPath to the source image, absolute or relative to the repo root.
formatNoFormat for textures with no alpha: DXT1, BGR888, RGBA8888 ... VTFCmd's default is DXT1, which is what a wall texture should be.
confirmNoRequired (true) to run this tool: it writes or executes.
versionNoVTF version to write, e.g. 7.4. Left alone unless a target needs one.
noMipmapsNoSkip mipmaps. Right for a UI texture, wrong for anything in the world.
alphaFormatNoFormat for textures that have an alpha channel. VTFCmd's default is DXT5.

Output Schema

NameRequiredDescriptionDefault
okYes
vtfYes
noteYes
toolYes
bytesYes
imageYes
headerYes
writtenYes
exitCodeYes
stdoutTailYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.24-alpha

TDQS

A4.1/5.0
Behavior4/5

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

Annotations carry only a title, so the description bears the full burden and does well: it discloses the external dependency (VTFCmd from ficool2's VTFEdit++, a separate download), the file-write side effect and its location, and that it verifies the result by reading it back. It does not say what happens if a .vtf already exists at the target path, which matters for a writing 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?

Front-loads the core action and output location in the first sentence, then adds prerequisite and verification context in short clauses. Slightly dense with parentheticals and a marketing-flavored phrase ('the step that used to need a GUI'), but every sentence contributes information.

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 an output schema exists, the description need not explain return values, and it still tells the agent about the external tool prerequisite, write location, and result verification. The main residual gap is overwrite behavior for an existing target file.

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 seven parameters are already documented in structured form and the baseline of 3 applies. The description adds only a thin hint that the reported format may differ from the requested one, but says nothing about flags, version, noMipmaps, or confirm beyond what the schema states.

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?

States a specific verb and resource (converts an image into a .vtf), enumerates accepted source extensions, and names the output location ('written beside the source'). It also distinguishes itself from the sibling read_game_content by framing itself as the tool that creates content the game does not ship.

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?

Provides a clear usage context ('read_game_content finds what the game ships, this makes what it does not') and points at health as the way to check the required dependency. It stops short of explicit when-not-to-use guidance or a named alternative for cases like an existing .vtf that only needs inspection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.