Skip to main content
Glama

preview_texture_2d

Render a flat 2D PNG preview of a procedural or image-based texture to inspect its colors and pattern before using it in a design.

Instructions

Render a flat 2D preview of a texture as a PNG image.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "preview_texture_2d"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoRandom seed for reproducibility. Default: 42.
sizeNoImage size in pixels (square). Max 1024. Default: 512.
scaleNoTexture scale multiplier (default 1.0). Default: 1.0.
styleNoHeightmap style — ``"posterized"``, ``"sharp"``, or ``"soft"`` (image mode). Default: "posterized".
presetNoName of a built-in preset palette (e.g. ``"woodland"``).
textureNoTexture name (procedural or geometric).
image_pathNoPath to a photo for image-based mode.
num_colorsNoNumber of color zones (2-8). Default: 4.
output_pathNoWhere to save the PNG. If empty, a fresh file in the system temp directory, one per call. A path that already exists is refused (``OUTPUT_EXISTS``), never written over. Default: "".
tile_size_mmNoPhysical tile size in mm (image mode). Default: 40.0.
color_paletteNoCustom hex colors (e.g. ``["#FF0000", "#00FF00"]``).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv1.5.1
    • addedInput schema / properties / color_palette / description
      Added value: +"Custom hex colors (e.g. ``[\"#FF0000\", \"#00FF00\"]``)."
    • addedInput schema / properties / image_path / description
      Added value: +"Path to a photo for image-based mode."
    • changedInput schema / properties / num_colors / description
      Previous value: -"Default: 4."New value: +"Number of color zones (2-8). Default: 4."
    • changedInput schema / properties / output_path / description
      Previous value: -"Default: \"\"."New value: +"Where to save the PNG.  If empty, a fresh file in the system temp directory, one per call.  A path that already exists is refused (``OUTPUT_EXISTS``), never written over. Default: \"\"."
    • addedInput schema / properties / preset / description
      Added value: +"Name of a built-in preset palette (e.g. ``\"woodland\"``)."
    • changedInput schema / properties / scale / description
      Previous value: -"Default: 1.0."New value: +"Texture scale multiplier (default 1.0). Default: 1.0."
    • changedInput schema / properties / seed / description
      Previous value: -"Default: 42."New value: +"Random seed for reproducibility. Default: 42."
    • changedInput schema / properties / size / description
      Previous value: -"Default: 512."New value: +"Image size in pixels (square).  Max 1024. Default: 512."
    • changedInput schema / properties / style / description
      Previous value: -"Default: \"posterized\"."New value: +"Heightmap style — ``\"posterized\"``, ``\"sharp\"``, or ``\"soft\"`` (image mode). Default: \"posterized\"."
    • addedInput schema / properties / texture / description
      Added value: +"Texture name (procedural or geometric)."
    • changedInput schema / properties / tile_size_mm / description
      Previous value: -"Default: 40.0."New value: +"Physical tile size in mm (image mode). Default: 40.0."
  2. Addedv1.5.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=false, so the safety profile is known. The description adds only that the output is a PNG and is 'flat 2D'; it does not mention that a file is written to disk, that an existing path is refused with OUTPUT_EXISTS, or that an empty output_path yields a fresh temp file per call.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler or redundancy. Nothing in it is wasted, though it is arguably too terse for the surface area involved.

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

Completeness2/5

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

For an 11-parameter tool with zero required parameters, no output schema, and two distinct operating modes, the description is too thin. An agent has to reverse-engineer from the schema that texture/preset/style/scale apply to procedural mode while image_path/tile_size_mm apply to image mode, and that the call has a filesystem side effect.

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 11 parameters (seed, size, scale, style, preset, texture, image_path, num_colors, output_path, tile_size_mm, color_palette) are already documented in the schema, including defaults and the overwrite-refusal rule. The description adds no meaning beyond that, so the baseline of 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 ('Render'), resource ('a texture'), and output artifact ('flat 2D preview ... as a PNG image'), so the agent knows exactly what comes back. It does not distinguish itself from nearby siblings such as generate_texture, preview_decorated_mesh, or preview_generated_model, which all involve visual/texture output.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to call this versus the texture-application tools (apply_procedural_texture, apply_image_texture) or the other preview tools. The description also fails to say that the tool operates in two mutually exclusive modes (named texture vs. image_path photo), leaving mode selection entirely to inference from the schema.

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

Deploy Server

Other Tools