Skip to main content
Glama

content_create_material

Creates and saves a surface Material asset in the live Flax Editor at a Content-relative .flax path, generating missing folders and failing if the asset already exists.

Instructions

Creates a surface Material asset through the live Flax Editor and saves it. relativePath is relative to Content/ and ends in .flax. The tool does not overwrite: it fails when an asset exists at that path. It creates missing folders. The editor does not record an Undo step. Texture ids are asset GUIDs of 32 hex digits: get them from content_search. normalTextureId must be a texture that is imported as a normal map. For glass, water or film, use content_create_material_transparent. For a variant of an existing material, use content_create_material_instance.

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": {
      "relativePath": "<relativePath>",
      "baseColor": "<baseColor>",
      "roughness": "<roughness>",
      "metallic": "<metallic>"
    },
    "name": "content_create_material"
  }
}

Input Schema

NameRequiredDescriptionDefault
metallicYesSurface metallic value in the 0-1 range.
uvTilingNoOptional positive UV tiling applied to supplied textures.
baseColorYesUniform RGBA base color, with every component in the 0-1 range.
roughnessYesSurface roughness in the 0-1 range.
relativePathYesDestination path relative to Content/, ending in .flax.
emissiveColorNoOptional emissive RGBA color, with every component in the 0-1 range.
normalTextureIdNoOptional normal-map FlaxEngine.Texture GUID.
baseColorTextureIdNoOptional FlaxEngine.Texture GUID used for base color.

Output Schema

NameRequiredDescriptionDefault
metallicYes
uvTilingYes
baseColorYes
roughnessYes
materialIdYes
parametersYes
mainThreadIdYes
materialPathYes
emissiveColorYes
normalTextureIdYes
baseColorTextureIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: no-overwrite failure semantics, implicit folder creation as a side effect, and no Undo step recorded. It also discloses that the operation goes through the live editor, which implies the editor must be running.

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?

Front-loads the core action in the first sentence, then adds constraints and sibling routing in short, non-redundant clauses. Every sentence carries information the schema does not.

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?

Complete for a mutation with nested params and an output schema: path convention, failure mode, side effects, texture sourcing and alternatives are all covered. Minor gaps remain around how optional texture ids interact with uniform colors and what uvTiling applies to.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds real meaning beyond the schema: texture ids are 32-hex-digit asset GUIDs sourced from content_search, and normalTextureId must reference a texture imported as a normal map. Nested objects (baseColor, emissiveColor, uvTiling) are left entirely to the schema.

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 ('Creates a surface Material asset') plus the execution context ('through the live Flax Editor and saves it'). It immediately distinguishes itself from the sibling tools content_create_material_transparent and content_create_material_instance by naming them.

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?

Explicitly routes alternatives: transparent materials for glass/water/film go to content_create_material_transparent, variants go to content_create_material_instance, and texture GUIDs come from content_search. It also states the when-not condition ('does not overwrite: it fails when an asset exists at that path').

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