Skip to main content
Glama

setEffectDefinition

Change an effect's name, description, WGSL code, or parameters by effectId, updating every region that uses it. New code is compiled first and rejected if invalid.

Instructions

Change an effect itself by effectId — its name, description, WGSL code or params — and with it every region that uses it. New code is compiled first and refused with the compiler's error if it does not compile. A removed parameter's values drop; the bounds re-clamp the others. Read the current code with getEffect before rewriting it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNo
nameNo
paramsNo
effectIdYes
projectIdNoThe project to act on, from listProjects. Omit it only for the project open in the OpenScreen editor, which works only while the app runs.
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.1

TDQS

A4.3/5.0
Behavior5/5

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

Discloses substantial behavior beyond the annotations: new code is compiled before apply and rejected with the compiler's error, the edit propagates to every region using the effect, removed parameters lose their values, and remaining bounds are re-clamped. This is exactly the mutation-safety context an agent needs; annotations only supply the coarse safety flags.

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?

Three dense sentences, front-loaded with the mutation and its propagation scope, then the compile gate, then the parameter-removal consequence, then the getEffect prerequisite. No filler or repetition.

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 six-parameter mutation with nested schemas and no output schema, the description covers the critical semantics: scope of change, compile validation, and data-loss behavior on removed params. It does not mention permissions/authorization or the projectId context, but that parameter is documented in the schema.

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?

With only 17% schema description coverage, the description compensates by naming most top-level fields and attaching behavioral meaning to them (code is WGSL and compiled, params changes can drop/re-clamp values). It does not unpack the nested param object shapes, but the schema carries those.

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?

States a specific verb (Change) and resource (an effect itself by effectId) and enumerates the mutable fields (name, description, WGSL code, params). It also scopes the blast radius ('every region that uses it'), which implicitly contrasts with the sibling setEffect, though it never names that sibling explicitly.

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

Usage Guidelines4/5

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

Explicitly routes the agent to getEffect for reading the current code before rewriting, which is concrete pre-call guidance. It gives no explicit when-not conditions or direct comparison to setEffect, so it stops just short of full alternative routing.

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