Skip to main content
Glama

apply_image_texture

Apply a photo-based texture as a tiled deboss or emboss pattern on a 3D mesh, with face, surface, or region targeting, then inspect the result in an interactive 3D stage.

Instructions

Apply a photo-based texture as a tiled deboss/emboss pattern. Opens Kiln's interactive inline 3D stage on the result (orbit/zoom panel in MCP Apps hosts; hosted sessions add a browser stage link).

Free accounts get 3 textures a month; Pro has no monthly limit.

INLINE 3D STAGE: on success this tool opens Kiln's interactive 3D stage — an inline viewer panel the user can orbit, zoom, and turn over — in hosts that render MCP Apps panels (Kiln's hosted connection attaches a browser stage link for hosts that don't). Oversized meshes are decimated automatically for the stage; the PNG preview is the floor, not the whole experience.

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": {
      "input_path": "<input_path>",
      "image_path": "<image_path>"
    },
    "name": "apply_image_texture"
  }
}

Input Schema

NameRequiredDescriptionDefault
faceNoSurface targeting mode: ``"auto"`` — find the largest flat face (current default). ``"front"`` — single flat panel on the front of a cylinder. ``"cylindrical"`` — wrap texture around the full cylinder using *num_panels* flat panels. ``"top"``, ``"bottom"``, ``"back"``, ``"left"``, ``"right"`` — target a specific flat face by name. ``"side:l2"`` — a sketch-built part's own wall, by the sketch entity that swept it (the recipe must sit beside the mesh); it follows the wall through a resize and rebuild. Default: "auto".
modeNo``"deboss"`` (grooves, default) or ``"emboss"`` (raised ridges). Default: "deboss".
styleNoHow the photo becomes a heightmap: ``"posterized"`` (the default), ``"sharp"`` or ``"soft"``, as described under Heightmap styles above. Any other value is read as ``"soft"``. Default: "posterized".
invertNoSwap which part of the image stands out (the dark detail is normally the feature; ``True`` makes the light parts the feature instead). Whole-object coverage only. Default: false.
regionNoWrap the image over ONE named surface region and leave the rest plain — read exactly as ``paint_mesh_regions`` reads a surface: by name ("Outside"), the user's own word ("the handle"), a face of the face map ("Part 2 › Top", or ``face:<id>``), or a region id (a bare number is a region id, never a face id). Implies whole-object coverage (``surface`` narrows it, default "all"); the relief eases out at the region's edge like it eases off the bed. A word fitting several surfaces refuses with the candidates. The output remembers the region so it can still be painted by name. Can't combine with an explicit ``face``.
surfaceNo**Whole-object coverage** — wrap the user's OWN image around EVERY selected surface of ANY mesh (curved, organic, imported — not just flat faces and cylinders) by direct mesh displacement. ``"all"`` / ``"outside"`` / ``"walls"`` / ``"caps"``; can't combine with an explicit ``face``. This is the path for "wrap my leather photo around this dragon". A hollow body's inside and any thin rim stay plain. The bed-contact band stays flat and thin walls are automatically protected, same as the preset textures.
depth_mmNoDeboss/emboss depth in mm (default 1.2). Default: 1.2.
smoothingNoSoftness dial 0.0-1.0 (default 0 = crisp). Higher rounds the relief into a soft, gentle finish — best for fabric/organic looks or a photo that prints rough. Whole-object coverage only. Default: 0.0.
symmetricNoSculpt the image BOTH ways around the surface (image mid-grey = the untouched wall) instead of only cutting in or only raising out — a fuller, coin-like relief. Needs a bit more wall thickness. Whole-object coverage only. Default: false.
image_pathYesPath to a texture photo (JPEG or PNG).
input_pathYesPath to an STL file -- or, with ``surface`` / ``region``, a painted 3MF whose paint follows the carve by surface name (see ``apply_geometric_texture``).
num_panelsNoNumber of flat panels for cylindrical wrap (default 8, range 4-12). More panels = smoother wrap but slower compile. Only used when ``face="cylindrical"``. Default: 8.
projectionNoHow the image wraps the shape (whole-object coverage only): ``"auto"`` detects (one closed outline → seam-hidden wrap round the walls, notched or hollow → per-face planar); ``"planar"`` / ``"cylindrical"`` force it; ``"spherical"`` wraps like a globe — for balls, domes, ornaments. Default: "auto".
resolutionNoMax pixels per tile edge before tiling (default 300; higher is capped, since finer detail exceeds what FDM prints). Default: 300.
tile_size_mmNoPhysical size of one tile repeat in mm. Default (None) is ONE-SHOT SMART: the motif period is read from the image itself and the repeat sized so motifs print at a size the material can show, as the curated presets are. The response carries ``auto_tile_mm`` + a warning naming the chosen size. Pass an explicit value to override; smaller = more repeats = finer pattern.
falloff_curveNoShape of the ``edge_falloff_mm`` fade: ``"smoothstep"`` (default, eases both ends), ``"linear"`` (straight ramp), or ``"ease"`` (subtlest, most organic). Only meaningful with ``edge_falloff_mm``. Default: "smoothstep".
angle_limit_degNoTighten how much of the object counts as the chosen ``surface`` (``"walls"`` or ``"caps"`` only). Only surfaces within this many degrees of vertical (walls) or of flat (caps) keep the texture — reach for it when the user says "only on the sides, not the rounded top" or the image is creeping onto a shoulder/dome they didn't mean. ~45 reproduces the default split. Whole-object coverage only.
edge_falloff_mmNoFeather the texture's edges (default 0 = off): the relief fades smoothly to nothing over the last N mm before the textured region ends, instead of stopping at an abrupt step. Reach for it when the user says the texture "just stops", "looks like a sticker", or asks for it to "blend/feather/fade into the surface". 2–5mm reads naturally. Whole-object coverage only. Default: 0.0.
prevent_overhangsNoPrint-safety guard, default ``"auto"`` (leave it alone): relief that would make the model need supports it didn't need before is eased back automatically on round / organic bodies, where that can actually happen, and left alone on flat-faced parts, where it can't. The model's own overhangs are never touched. ``True`` / ``False`` force it on or off. Whole-object coverage only. Default: "auto".
segmentation_paramsNoThe block ``segment_mesh_regions`` returned, passed back verbatim so ``region`` means the partition the user saw. Optional.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.6.0
    • changedInput schema / properties / region / description
      Previous value: -"Wrap the image over ONE named surface region and leave the rest plain — the same regions ``segment_mesh_regions`` shows and ``paint_mesh_regions`` colours, by name (\"Outside\"), id, or the user's own word (\"the handle\").  Implies whole-object coverage (``surface`` narrows it, default \"all\"); the relief eases out at the region's edge like it eases off the bed.  A word fitting several surfaces refuses with the candidates.  The output remembers the region so it can still be painted by name. Can't combine with an explicit ``face``."New value: +"Wrap the image over ONE named surface region and leave the rest plain — read exactly as ``paint_mesh_regions`` reads a surface: by name (\"Outside\"), the user's own word (\"the handle\"), a face of the face map (\"Part 2 › Top\", or ``face:<id>``), or a region id (a bare number is a region id, never a face id).  Implies whole-object coverage (``surface`` narrows it, default \"all\"); the relief eases out at the region's edge like it eases off the bed.  A word fitting several surfaces refuses with the candidates.  The output remembers the region so it can still be painted by name. Can't combine with an explicit ``face``."
  2. Changed20 schema fields changedv1.5.1
    • addedInput schema / properties / angle_limit_deg / description
      Added value: +"Tighten how much of the object counts as the chosen ``surface`` (``\"walls\"`` or ``\"caps\"`` only). Only surfaces within this many degrees of vertical (walls) or of flat (caps) keep the texture — reach for it when the user says \"only on the sides, not the rounded top\" or the image is creeping onto a shoulder/dome they didn't mean. ~45 reproduces the default split.  Whole-object coverage only."
    • changedInput schema / properties / depth_mm / description
      Previous value: -"Default: 1.2."New value: +"Deboss/emboss depth in mm (default 1.2). Default: 1.2."
    • changedInput schema / properties / edge_falloff_mm / description
      Previous value: -"Default: 0.0."New value: +"Feather the texture's edges (default 0 = off): the relief fades smoothly to nothing over the last N mm before the textured region ends, instead of stopping at an abrupt step.  Reach for it when the user says the texture \"just stops\", \"looks like a sticker\", or asks for it to \"blend/feather/fade into the surface\".  2–5mm reads naturally.  Whole-object coverage only. Default: 0.0."
    • changedInput schema / properties / face / description
      Previous value: -"Default: \"auto\"."New value: +"Surface targeting mode: ``\"auto\"`` — find the largest flat face (current default). ``\"front\"`` — single flat panel on the front of a cylinder. ``\"cylindrical\"`` — wrap texture around the full cylinder using *num_panels* flat panels. ``\"top\"``, ``\"bottom\"``, ``\"back\"``, ``\"left\"``, ``\"right\"`` — target a specific flat face by name. ``\"side:l2\"`` — a sketch-built part's own wall, by the sketch entity that swept it (the recipe must sit beside the mesh); it follows the wall through a resize and rebuild. Default: \"auto\"."
    • changedInput schema / properties / falloff_curve / description
      Previous value: -"Default: \"smoothstep\"."New value: +"Shape of the ``edge_falloff_mm`` fade: ``\"smoothstep\"`` (default, eases both ends), ``\"linear\"`` (straight ramp), or ``\"ease\"`` (subtlest, most organic). Only meaningful with ``edge_falloff_mm``. Default: \"smoothstep\"."
    • addedInput schema / properties / image_path / description
      Added value: +"Path to a texture photo (JPEG or PNG)."
    • addedInput schema / properties / input_path / description
      Added value: +"Path to an STL file -- or, with ``surface`` / ``region``, a painted 3MF whose paint follows the carve by surface name (see ``apply_geometric_texture``)."
    • changedInput schema / properties / invert / description
      Previous value: -"Default: false."New value: +"Swap which part of the image stands out (the dark detail is normally the feature; ``True`` makes the light parts the feature instead).  Whole-object coverage only. Default: false."
    • changedInput schema / properties / mode / description
      Previous value: -"Default: \"deboss\"."New value: +"``\"deboss\"`` (grooves, default) or ``\"emboss\"`` (raised ridges). Default: \"deboss\"."
    • changedInput schema / properties / num_panels / description
      Previous value: -"Default: 8."New value: +"Number of flat panels for cylindrical wrap (default 8, range 4-12).  More panels = smoother wrap but slower compile.  Only used when ``face=\"cylindrical\"``. Default: 8."
    • changedInput schema / properties / prevent_overhangs / description
      Previous value: -"Default: \"auto\"."New value: +"Print-safety guard, default ``\"auto\"`` (leave it alone): relief that would make the model need supports it didn't need before is eased back automatically on round / organic bodies, where that can actually happen, and left alone on flat-faced parts, where it can't.  The model's own overhangs are never touched.  ``True`` / ``False`` force it on or off.  Whole-object coverage only. Default: \"auto\"."
    • changedInput schema / properties / projection / description
      Previous value: -"Default: \"auto\"."New value: +"How the image wraps the shape (whole-object coverage only): ``\"auto\"`` detects (one closed outline → seam-hidden wrap round the walls, notched or hollow → per-face planar); ``\"planar\"`` / ``\"cylindrical\"`` force it; ``\"spherical\"`` wraps like a globe — for balls, domes, ornaments. Default: \"auto\"."
    • addedInput schema / properties / region / description
      Added value: +"Wrap the image over ONE named surface region and leave the rest plain — the same regions ``segment_mesh_regions`` shows and ``paint_mesh_regions`` colours, by name (\"Outside\"), id, or the user's own word (\"the handle\").  Implies whole-object coverage (``surface`` narrows it, default \"all\"); the relief eases out at the region's edge like it eases off the bed.  A word fitting several surfaces refuses with the candidates.  The output remembers the region so it can still be painted by name. Can't combine with an explicit ``face``."
    • changedInput schema / properties / resolution / description
      Previous value: -"Default: 300."New value: +"Max pixels per tile edge before tiling (default 300; higher is capped, since finer detail exceeds what FDM prints). Default: 300."
    • addedInput schema / properties / segmentation_params / description
      Added value: +"The block ``segment_mesh_regions`` returned, passed back verbatim so ``region`` means the partition the user saw.  Optional."
    • changedInput schema / properties / smoothing / description
      Previous value: -"Default: 0.0."New value: +"Softness dial 0.0-1.0 (default 0 = crisp). Higher rounds the relief into a soft, gentle finish — best for fabric/organic looks or a photo that prints rough. Whole-object coverage only. Default: 0.0."
    • changedInput schema / properties / style / description
      Previous value: -"Default: \"posterized\"."New value: +"How the photo becomes a heightmap: ``\"posterized\"`` (the default), ``\"sharp\"`` or ``\"soft\"``, as described under Heightmap styles above.  Any other value is read as ``\"soft\"``. Default: \"posterized\"."
    • addedInput schema / properties / surface / description
      Added value: +"**Whole-object coverage** — wrap the user's OWN image around EVERY selected surface of ANY mesh (curved, organic, imported — not just flat faces and cylinders) by direct mesh displacement.  ``\"all\"`` / ``\"outside\"`` / ``\"walls\"`` / ``\"caps\"``; can't combine with an explicit ``face``.  This is the path for \"wrap my leather photo around this dragon\".  A hollow body's inside and any thin rim stay plain.  The bed-contact band stays flat and thin walls are automatically protected, same as the preset textures."
    • changedInput schema / properties / symmetric / description
      Previous value: -"Default: false."New value: +"Sculpt the image BOTH ways around the surface (image mid-grey = the untouched wall) instead of only cutting in or only raising out — a fuller, coin-like relief.  Needs a bit more wall thickness.  Whole-object coverage only. Default: false."
    • addedInput schema / properties / tile_size_mm / description
      Added value: +"Physical size of one tile repeat in mm. Default (None) is ONE-SHOT SMART: the motif period is read from the image itself and the repeat sized so motifs print at a size the material can show, as the curated presets are. The response carries ``auto_tile_mm`` + a warning naming the chosen size.  Pass an explicit value to override; smaller = more repeats = finer pattern."
  3. Addedv1.5.0

TDQS

A3.8/5.0
Behavior5/5

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

This is the description's strength. Beyond the annotations (which only say it is a non-read-only, non-destructive, closed-world mutation), it discloses the monthly quota accounting, that oversized meshes are automatically decimated for the stage, and that a PNG preview is always produced as a floor. Those are real side effects and cost constraints an agent needs before calling.

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?

The opening sentence is well front-loaded, but the INLINE 3D STAGE paragraph repeats the stage behavior already stated in sentence one, and the hosted-link caveat appears twice in close paraphrase. Roughly a third of the text is redundant rather than adding new 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?

For a 20-parameter tool with full schema coverage and no output schema, the description covers the two things the schema cannot: the quota cost and the interactive-stage side effect including decimation. It omits any statement of what artifact is written or returned, which is the remaining gap for a file-producing operation.

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% and each of the 20 parameters already carries a detailed description, so the schema does the heavy lifting. The prose body adds essentially no parameter meaning of its own (it only restates the tiled deboss/emboss idea), 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?

The first sentence gives a specific verb and resource: apply a photo-based texture as a tiled deboss/emboss relief. It clearly separates this tool from something like a procedural or geometric texture by naming "photo-based", but it never explicitly contrasts itself with siblings such as apply_geometric_texture or apply_procedural_texture, so an agent must infer the split from the adjective alone.

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 context is only implied: the description names a quota (3 textures/month free, unlimited on Pro) and notes the tool opens a 3D stage, which tells an agent this is a heavier, costed operation worth confirming with the user. There is no explicit when-to-use versus apply_geometric_texture/apply_procedural_texture, nor any when-not guidance.

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