Skip to main content
Glama

Apply a texture package as a material

material_from_maps
DestructiveIdempotent

Create a scene material from a completed textureJobId or validated role-labeled images. Replaces materials in requested object slots: applyToObjects targets slot zero; assignments targets explicit slots. Commits one revision after all targets validate; existing mesh UVs and earlier revisions are preserved. Use texture_maps_create for downloads without scene changes, material_from_image for one image, or material_recipe for a procedural proposal. Returns a job; job_wait/job_get expose terminal status, revision and map artifacts.

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": {
      "projectId": "<projectId>",
      "idempotencyKey": "<idempotencyKey>"
    },
    "name": "material_from_maps"
  }
}

Input Schema

NameRequiredDescriptionDefault
rolesNoUnique output roles to deliver. With sourceAssetId, defaults include profile convenience maps; with supplied maps or a completed texture job, defaults to its supplied roles. Unsupported missing maps fail rather than being invented.
optionsNoOptional processing and material settings. Supplied maps take precedence over fallback generation; a reused texture job preserves its appearance settings unless overridden.
profileNoProcessing intent: surface or supplied defaults a single sourceAssetId to base_color/roughness with opaque alpha; decal to base_color/opacity with blend alpha. Role-labeled map sets default to their supplied roles. Explicit roles/options override these defaults.surface
uvLayerNoExisting UV layer to use on target meshes. Omit to use their active UV layer; no UV coordinates are generated or rewritten.
uvScaleNo[U, V] texture-coordinate scale, each positive and at most 10000; default [1, 1]. Changes shader mapping, preserving mesh UV coordinates.
projectIdYesExisting project in the bound deployment; owns the processing job and its artifacts.
sourceMapsNoRole-labeled validated images or texture artifacts, one per role and at most 12 unique images. Sources must share an aspect ratio. Do not combine with textureJobId.
assignmentsNoExplicit unique object/slot targets, maximum 50. Replaces existing slot assignments; mutually exclusive with nonempty applyToObjects.
materialNameNoName for the prepared material/package, 1-64 characters; default Image Material.Image Material
textureJobIdNoCompleted texture_maps_create job whose version-2 package should be applied. Alternative to sourceAssetId/sourceMaps; prepared map settings are retained unless overridden.
sourceAssetIdNoValidated PNG/JPEG asset supplying base_color. Do not also supply a base_color entry in sourceMaps or combine with textureJobId.
applyToObjectsNoExisting mesh object IDs to assign at slot zero, replacing that slot's material. Empty creates an unassigned material. Use assignments instead for explicit slots; maximum 50 objects.
baseRevisionIdNoCurrent project head to mutate, or HEAD (default). A stale revision fails with REVISION_CONFLICT; refresh project_get before retrying.HEAD
idempotencyKeyYesStable caller-chosen key for this request. Reuse the same key and arguments for safe retries; change the key when changing inputs.

Output Schema

NameRequiredDescriptionDefault
jobYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed44 schema fields changed
    • addedInput schema / properties / applyToObjects / description
      Added value: +"Existing mesh object IDs to assign at slot zero, replacing that slot's material. Empty creates an unassigned material. Use assignments instead for explicit slots; maximum 50 objects."
    • addedInput schema / properties / assignments / description
      Added value: +"Explicit unique object/slot targets, maximum 50. Replaces existing slot assignments; mutually exclusive with nonempty applyToObjects."
    • addedInput schema / properties / assignments / items / properties / objectId / description
      Added value: +"Existing mesh object ID from scene_inspect. All targets are validated before any assignment."
    • addedInput schema / properties / assignments / items / properties / slotIndex / description
      Added value: +"Zero-based material slot to replace, 0-255. Slot zero may be created on an object with no materials; other slots must already exist."
    • addedInput schema / properties / baseRevisionId / description
      Added value: +"Current project head to mutate, or HEAD (default). A stale revision fails with REVISION_CONFLICT; refresh project_get before retrying."
    • changedInput schema / properties / idempotencyKey / description
      Previous value: -"Caller-chosen key. Replaying it with IDENTICAL input returns the EXISTING job instead of queueing a second one — a restarted driver adopts its own in-flight work rather than duplicating or orphaning it. Vary the key to force a new job. Full semantics: the same key with DIFFERENT input is rejected with IDEMPOTENCY_CONFLICT (never silently replayed, so a stale result cannot be mistaken for a fresh one). A key is recorded only once a job is actually created, so a request rejected beforehand (validation, APPROVAL_REQUIRED, quota) leaves the key unused and free to reuse. A key bound to a job keeps resolving to that job even after it fails or is cancelled — use a NEW key to genuinely retry cancelled work. Keys live 48 hours and are scoped per principal+deployment+operation, which means they SPAN SESSIONS: a plain descriptive key like \"hero-final-1024-v1\" will collide with your own run from yesterday and be rejected. Include a project id or a timestamp. This scope used to be stated only in the conflict error, i.e. after the round trip it cost — a field build lost two that way, ~34 hours after unrelated work had taken the same names."New value: +"Stable caller-chosen key for this request. Reuse the same key and arguments for safe retries; change the key when changing inputs."
    • addedInput schema / properties / materialName / description
      Added value: +"Name for the prepared material/package, 1-64 characters; default Image Material."
    • addedInput schema / properties / options / description
      Added value: +"Optional processing and material settings. Supplied maps take precedence over fallback generation; a reused texture job preserves its appearance settings unless overridden."
    • addedInput schema / properties / options / properties / alphaCutoff / description
      Added value: +"Mask-mode alpha threshold, 0-1; default 0.5. Ignored by opaque/blend modes."
    • addedInput schema / properties / options / properties / alphaMode / description
      Added value: +"Material opacity behavior. Default opaque, or blend for decal profile; delivered PNG alpha is preserved regardless."
    • addedInput schema / properties / options / properties / displacementMode / description
      Added value: +"How the material uses height: none (default), shader bump, or displacement. A height map must be available; renderer/export support varies."
    • addedInput schema / properties / options / properties / emissionStrength / description
      Added value: +"Material emission multiplier, 0-10000; default 1 when emission is requested, otherwise 0. Requires an emission output to light the material."
    • addedInput schema / properties / options / properties / heightMidlevel / description
      Added value: +"Height value representing zero displacement, 0-1; default 0.5."
    • addedInput schema / properties / options / properties / heightScale / description
      Added value: +"Relief height in meters, 0-1; default 0.001. Used for height-derived normals and material bump/displacement."
    • addedInput schema / properties / options / properties / heightSource / description
      Added value: +"If no height map is supplied, explicitly allow height estimation from base_color luminance or alpha. Default none; estimated relief is labeled heuristic."
    • addedInput schema / properties / options / properties / maxSize / description
      Added value: +"Maximum output side in pixels, 8-4096; default 2048. Sources are aligned at their common aspect ratio without upscaling."
    • addedInput schema / properties / options / properties / metallic / description
      Added value: +"Constant metallic fallback, 0-1; default 0. Supplied metallic maps take precedence; brightness does not establish metalness."
    • addedInput schema / properties / options / properties / normalConvention / description
      Added value: +"Convention of supplied normal maps: OpenGL +Y (default) or DirectX -Y. A change to output convention flips the green channel."
    • addedInput schema / properties / options / properties / normalStrength / description
      Added value: +"Normal intensity multiplier, 0-16; default 1. Applied when converting supplied vectors or deriving normals from height."
    • addedInput schema / properties / options / properties / outputNormalConvention / description
      Added value: +"Convention for delivered normal maps, OpenGL +Y by default or DirectX -Y; the Blender material compensates for the output convention."
    • addedInput schema / properties / options / properties / packing / description
      Added value: +"Optional extra packed PNG: ORM uses red=ambient occlusion, green=roughness, blue=metallic; default none. Missing AO uses a documented white fallback."
    • addedInput schema / properties / options / properties / physicalCoverageMeters / description
      Added value: +"Real dimensions of one UV tile for height-to-normal scaling. If omitted, derived relief normals assume a one-meter UV square."
    • addedInput schema / properties / options / properties / physicalCoverageMeters / properties / height / description
      Added value: +"Physical height in meters represented by one complete texture tile; positive, at most 100000."
    • addedInput schema / properties / options / properties / physicalCoverageMeters / properties / width / description
      Added value: +"Physical width in meters represented by one complete texture tile; positive, at most 100000."
    • addedInput schema / properties / options / properties / roughness / description
      Added value: +"Constant roughness fallback, 0-1; default 0.65. A supplied roughness map or converted gloss map takes precedence."
    • addedInput schema / properties / options / properties / roughnessMode / description
      Added value: +"Fallback roughness generation: constant (default) or an explicitly requested base_color brightness estimate. Image-derived roughness is heuristic, not measured."
    • addedInput schema / properties / options / properties / roughnessRange / description
      Added value: +"[minimum, maximum] roughness for image estimates, increasing within 0-1; default [0.35, 0.85]."
    • addedInput schema / properties / options / properties / seamMode / description
      Added value: +"Analyze edges only (default) or blend edge pixels along tile axes. Blending changes imagery and may cause ghosting; inspect the repeat preview."
    • addedInput schema / properties / options / properties / specular / description
      Added value: +"Constant specular fallback, 0-1; default 0.5. Supplied specular maps take precedence."
    • addedInput schema / properties / options / properties / tile / description
      Added value: +"Texture axes to treat as periodic for relief and seam handling; default none. Does not guarantee perceptually seamless repetition."
    • addedInput schema / properties / profile / description
      Added value: +"Processing intent: surface or supplied defaults a single sourceAssetId to base_color/roughness with opaque alpha; decal to base_color/opacity with blend alpha. Role-labeled map sets default to their supplied roles. Explicit roles/options override these defaults."
    • addedInput schema / properties / projectId / description
      Added value: +"Existing project in the bound deployment; owns the processing job and its artifacts."
    • addedInput schema / properties / roles / description
      Added value: +"Unique output roles to deliver. With sourceAssetId, defaults include profile convenience maps; with supplied maps or a completed texture job, defaults to its supplied roles. Unsupported missing maps fail rather than being invented."
    • addedInput schema / properties / roles / items / description
      Added value: +"Semantic map role; use one source per role. Color maps and scalar/vector data maps are interpreted differently."
    • addedInput schema / properties / sourceAssetId / description
      Added value: +"Validated PNG/JPEG asset supplying base_color. Do not also supply a base_color entry in sourceMaps or combine with textureJobId."
    • addedInput schema / properties / sourceMaps / description
      Added value: +"Role-labeled validated images or texture artifacts, one per role and at most 12 unique images. Sources must share an aspect ratio. Do not combine with textureJobId."
    • addedInput schema / properties / sourceMaps / items / properties / channel / description
      Added value: +"Channel to extract for a scalar map, for example g for roughness from ORM. Omit for RGB color or normal maps; normal maps reject channel selection."
    • addedInput schema / properties / sourceMaps / items / properties / colorSpace / description
      Added value: +"Input interpretation: auto uses the map role, srgb is encoded color, linear is linear color, and data bypasses color conversion for numeric maps."
    • addedInput schema / properties / sourceMaps / items / properties / invert / description
      Added value: +"Invert scalar values or RGB channels (1 - value), preserving alpha. Omit or false to keep them; use normalConvention for normal-map green-channel conversion."
    • addedInput schema / properties / sourceMaps / items / properties / role / description
      Added value: +"Semantic map role; use one source per role. Color maps and scalar/vector data maps are interpreted differently."
    • addedInput schema / properties / sourceMaps / items / properties / sourceId / description
      Added value: +"Validated PNG/JPEG asset ID (ast_…) or completed texture_map PNG artifact ID (art_…); not a file path or URL."
    • addedInput schema / properties / textureJobId / description
      Added value: +"Completed texture_maps_create job whose version-2 package should be applied. Alternative to sourceAssetId/sourceMaps; prepared map settings are retained unless overridden."
    • addedInput schema / properties / uvLayer / description
      Added value: +"Existing UV layer to use on target meshes. Omit to use their active UV layer; no UV coordinates are generated or rewritten."
    • addedInput schema / properties / uvScale / description
      Added value: +"[U, V] texture-coordinate scale, each positive and at most 10000; default [1, 1]. Changes shader mapping, preserving mesh UV coordinates."
  2. Changed8 schema fields changed
    • addedInput schema / properties / options / properties / roughnessRange / items
      Added value: +{
      +  "maximum": 1,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / options / properties / roughnessRange / maxItems
      Added value: +2
    • addedInput schema / properties / options / properties / roughnessRange / minItems
      Added value: +2
    • removedInput schema / properties / options / properties / roughnessRange / prefixItems
      Removed value: -[
      -  {
      -    "maximum": 1,
      -    "minimum": 0,
      -    "type": "number"
      -  },
      -  {
      -    "maximum": 1,
      -    "minimum": 0,
      -    "type": "number"
      -  }
      -]
    • addedInput schema / properties / uvScale / items
      Added value: +{
      +  "exclusiveMinimum": 0,
      +  "maximum": 10000,
      +  "type": "number"
      +}
    • addedInput schema / properties / uvScale / maxItems
      Added value: +2
    • addedInput schema / properties / uvScale / minItems
      Added value: +2
    • removedInput schema / properties / uvScale / prefixItems
      Removed value: -[
      -  {
      -    "exclusiveMinimum": 0,
      -    "maximum": 10000,
      -    "type": "number"
      -  },
      -  {
      -    "exclusiveMinimum": 0,
      -    "maximum": 10000,
      -    "type": "number"
      -  }
      -]
  3. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare destructive=true and idempotent=true; the description goes further by disclosing the commit model ('Commits one revision after all targets validate'), what is preserved ('existing mesh UVs and earlier revisions'), and failure semantics ('Unsupported missing maps fail rather than being invented'). It also discloses that the call returns a job whose terminal status, revision and artifacts are reached via job_wait/job_get, which is critical for an asynchronous destructive operation.

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-loaded with the core action and the slot-targeting rule, then alternatives, then commit semantics. Four sentences carry a lot of signal with no filler, though the closing sentence on job_wait/job_get borders on return-value detail that the output schema already covers.

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 destructive mutation with an output schema, the description covers purpose, alternative tools, atomic validation and preservation. Gaps are minor: nothing about authorization or permissions on the target project/objects, and error behavior is only implied (REVISION_CONFLICT lives in 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% and the description mostly restates structured facts; the applyToObjects-vs-assignments split and the source precedence rules are already documented in the schema. It adds little syntax or format meaning beyond what the parameters already carry, so the baseline 3 applies.

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 precise verb and resource ('Create a scene material') plus the two accepted sources (textureJobId or validated role-labeled images), and disambiguates the two targeting parameters ('applyToObjects targets slot zero; assignments targets explicit slots'). An agent can tell it apart from material_from_image and material_recipe without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit routing to three named alternatives with the condition that selects each: texture_maps_create for downloads without scene changes, material_from_image for one image, material_recipe for a procedural proposal. It also states the exclusion between applyToObjects and assignments, so when-to-use and when-not-to-use are both covered.

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.

Resources