Skip to main content
Glama

Edit a material

material_apply

Applies a batch of ops (set_material, add_node, remove_node, set_node_param, connect, disconnect, set_out, add_ramp_stop, remove_ramp_stop, set_ramp_stop, add_curve_point, remove_curve_point, set_curve_point, clear_nodes) to a material document, whole or not at all. Returns the edited document or the refusal. Costs 1 unit.

Input Schema

NameRequiredDescriptionDefault
opsYesThe edits to apply in order, each an object with an op name (set_material, add_node, remove_node, set_node_param, connect and the rest). The batch applies whole or not at all.
materialYesThe material document, written inline as JSON.

Output Schema

NameRequiredDescriptionDefault
msNoMilliseconds the run took.
jobYesThe job id; the job tool reads it.
verbNoThe tool that made it.
filesNoFiles made, each with a name, type, size and a signed URL.
unitsNoUnits this call cost.
resultNoThe engine's own answer, a JSON document.
statusNoqueued when the job runs in the background.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / material / description
      Added value: +"The material document, written inline as JSON."
    • addedInput schema / properties / ops / description
      Added value: +"The edits to apply in order, each an object with an op name (set_material, add_node, remove_node, set_node_param, connect and the rest). The batch applies whole or not at all."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "files": {
      +      "description": "Files made, each with a name, type, size and a signed URL.",
      +      "items": {
      +        "additionalProperties": {},
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "job": {
      +      "description": "The job id; the job tool reads it.",
      +      "type": "string"
      +    },
      +    "ms": {
      +      "description": "Milliseconds the run took.",
      +      "type": "number"
      +    },
      +    "result": {
      +      "description": "The engine's own answer, a JSON document."
      +    },
      +    "status": {
      +      "description": "queued when the job runs in the background.",
      +      "type": "string"
      +    },
      +    "units": {
      +      "description": "Units this call cost.",
      +      "type": "number"
      +    },
      +    "verb": {
      +      "description": "The tool that made it.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "job"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

The annotations only declare the safety profile (readOnly=false, destructive=false, idempotent=false, openWorld=false), so the description carries the extra burden well: it states the atomic all-or-nothing batch semantics, that it returns either the edited document or the refusal, and that it costs 1 unit. It does not describe what triggers a refusal or how large batches are limited (500 ops), which keeps it from a 5.

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?

It is a single dense sentence, and the ordering is good: verb, target, op vocabulary, atomicity contract, return value, then cost. The 14-item op enumeration is long but each name is genuinely useful to a calling agent, so it earns its length.

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?

With an output schema present, return structure need not be restated, and the annotations cover safety; the description still adds the atomicity contract and cost. The main residual gap is failure semantics — what a 'refusal' looks like and why one occurs — which matters for a mutating tool with a 500-op ceiling.

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 description coverage is already 100%, so the baseline is 3; the description adds value by listing all fourteen op names (the schema only lists a representative subset plus 'and the rest') and by stressing that ops apply in order within the atomic batch. The inline-JSON nature of the material document parameter is left to the schema.

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 title-plus-description names a specific verb ('applies a batch of ops') and resource ('a material document') and enumerates the exact operation set, so the agent knows precisely what capability this exposes. It never names a sibling (e.g. material_check or material_bake) to distinguish itself, so it stops short of a 5.

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 is only implied: an agent infers it should call this when it needs to mutate a material, and the 'Costs 1 unit' note is a useful budgeting hint. There is no explicit when-to-use vs. material_check/material_cost guidance and no stated prerequisites, so it is minimum-viable rather than strong.

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