Skip to main content
Glama
playcanvas

PlayCanvas Editor MCP Server

Official
by playcanvas

set_material_diffuse

Idempotent

Set only the diffuse base color of a material with an RGB array (0-1) without changing other material properties.

Instructions

Set only the diffuse (base) color of a material. Color is [r,g,b] in 0-1. When NOT to use: to change any other material property, or to set several properties at once (use set_material_properties).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorYesRGB color [r,g,b] 0-1
assetIdYesAsset ID

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed6 schema fields changedv0.7.0
    • removedInput schema / properties / assetId / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / assetId / description
      Previous value: -"An asset ID."New value: +"Asset ID"
    • addedInput schema / properties / assetId / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / assetId / type
      Added value: +"integer"
    • changedInput schema / properties / color / description
      Previous value: -"A 3-channel RGB color"New value: +"RGB color [r,g,b] 0-1"
    • changedInput schema / properties / color / items
      Previous value: -[
      -  {
      -    "description": "Red",
      -    "maximum": 1,
      -    "minimum": 0,
      -    "type": "number"
      -  },
      -  {
      -    "description": "Green",
      -    "maximum": 1,
      -    "minimum": 0,
      -    "type": "number"
      -  },
      -  {
      -    "description": "Blue",
      -    "maximum": 1,
      -    "minimum": 0,
      -    "type": "number"
      -  }
      -]New value: +{
      +  "maximum": 1,
      +  "minimum": 0,
      +  "type": "number"
      +}
  2. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true, destructiveHint=false, and readOnlyHint=false, so the description carries a lighter burden. It adds meaningful behavioral context by guaranteeing the operation touches 'only' the diffuse color and will not modify other material properties — a scope guarantee beyond what annotations express. No contradiction exists between the write semantics ('Set') and readOnlyHint=false.

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?

Two sentences with zero filler. The action is front-loaded in the first sentence, followed by the color format, then the when-not-to-use guidance. Every sentence earns its place.

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

Completeness5/5

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

For a simple two-parameter write tool with no output schema and no nested objects, the description is complete: it covers the action, the value format, the scope limitation, and the routing to the alternative tool. Annotations cover the idempotence and safety profile. Nothing an agent needs to invoke this correctly is missing.

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 the baseline is 3. The description states 'Color is [r,g,b] in 0-1,' which largely duplicates the schema's 'RGB color [r,g,b] 0-1' for the color parameter, and adds nothing about assetId beyond the schema's 'Asset ID.' The description does not meaningfully exceed what the schema already provides.

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?

The description states a specific verb and resource: 'Set only the diffuse (base) color of a material.' The word 'only' precisely scopes the operation and differentiates it from set_material_properties, which is the key sibling for broader material changes. An agent can immediately know what this tool does and what it deliberately does not do.

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?

The description explicitly provides a 'When NOT to use' clause: to change any other material property, or to set several properties at once, and names the alternative tool (set_material_properties). This is exactly the explicit when/when-not/alternative guidance the dimension rewards, leaving nothing to inference.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/playcanvas/editor-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server