Skip to main content
Glama

scene_add_signal

Destructive

Creates a named level-wide broadcast signal in a copied save for one graph to notify many entity graphs and client Lua scripts, carrying optional string or typed payloads.

Instructions

Define a signal (信号) in a copy of a save: a level-wide broadcast with a name. One graph sends it with f.sendSignal('name') and any number of graphs on any entities hear it with .onSignal('name', (evt, f) => {...}). It is the platform's way to let one thing tell many without knowing them: night falls and the lamps, the gates and the enemies each react in their own graph. parameter gives the signal one string to carry (its name; the sender passes the string as second argument of f.sendSignal, the listeners read it from the event): which lever, which team. parameters gives it several values of any of the eighteen types the editor offers, [{name, type}] with type one of integer, float, boolean, string, vector3, entity, guid, prefabId, configId or a list of one of them (integerList ...): a score as an integer, where something happened as a vector3, who did it as an entity. The answer says how graphs and client scripts send and read them (defineSignal in a graph, AddInt and the like in Lua). The same signal reaches the client scripts (Lua) of one player when a graph sends it as f.sendSignal('client:name', player) (and the string after the player when it carries one): that is the node 发送客户端脚本信号 of game 7.1, which the compiler does not know and this server puts in when it writes the graph; a script hears it with script:RegisterServerSignalHandler("name", function(name, params) ... end). A name cannot begin with "client:". Writes a new .gil in the workspace; the official save is not touched. Verified in play on 2026-10-10, without and with a parameter; to client scripts on 2026-10-13 (example clientsignal).

Input Schema

NameRequiredDescriptionDefault
nameYes
mapPathNo
parameterNo
outputNameNo
parametersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false; the description adds real value on top by stating 'Writes a new .gil in the workspace; the official save is not touched', by disclosing the 'client:' name prefix restriction, and by explaining the compiler-unknown client-signal node the server injects. It does not say what happens if a signal with the same name already exists (overwrite vs duplicate), which matters for a destructive write.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the purpose, which is good, but the body is a dense run-on with parenthetical glosses in three scripts and at least one awkward sentence ('The answer says how graphs and client scripts send and read them...'). Substantive information is present, but the signal-to-noise ratio is mediocre.

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

Completeness3/5

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

For a mutating, no-output-schema tool this covers the conceptual model, the client-script path, and the write target, which is substantial. However it leaves mapPath/outputName undefined and never addresses overwrite behavior or what a caller gets back beyond the vague 'The answer says how graphs and client scripts send and read them'.

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 coverage is 0%, so the description must carry the load, and it does well for three of five parameters: name (including the 'client:' constraint absent from the schema), parameter (single string with sender/listener mechanics), and parameters (the {name,type} shape and the eighteen types). mapPath and outputName are never mentioned, leaving the file-selection and output-naming parameters undocumented anywhere.

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 description gives a specific verb and resource ('Define a signal (信号) in a copy of a save') and explains conceptually what a signal is: a named, level-wide broadcast. That makes it unmistakable versus other scene_add_* tools. It does not explicitly differentiate from the sibling scene_list_signals, but the create-vs-list split is implicit.

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?

The night/lamps/gates/enemies example conveys exactly when a signal is the right mechanism (one sender, many unknown listeners), which is strong contextual guidance. There are no explicit exclusions or named alternatives, and no statement about when to prefer a direct reference instead.

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

Deploy Server

Other Tools