Skip to main content
Glama

添加内置或项目脚本组件

cocos_component_add
Destructive

Add built-in or project script components to a target node in Cocos Creator, simplifying component attachment for scene setup.

Instructions

添加内置或项目脚本组件

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes
projectIdYes
instanceIdNo
operationIdNo
expectedRevisionNo
runtimeInstanceIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

D1.6/5.0
Behavior2/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, indicating a mutating operation. The description adds no behavioral context beyond that—no side effects, prerequisites, or reversibility details. With annotations present, the bar is lower, but the description still fails to provide any value beyond what structured fields already convey.

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

Conciseness2/5

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

The description is a single short sentence, but this is under-specification rather than effective conciseness. It omits critical information and does not front-load any actionable detail beyond a vague restatement of the tool name.

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

Completeness1/5

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

For a mutation tool with six parameters (including nested objects), no output schema, and zero schema coverage, the description is completely inadequate. An agent has no way to understand required arguments, effects, or how to construct a valid call. The description fails to meet the informational needs of the tool.

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

Parameters1/5

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

Schema description coverage is 0%, meaning the schema provides no parameter explanations. The description does not mention any parameters, so it does not compensate for the lack of schema documentation. An agent cannot infer what nodeId or type mean from the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tautological: description restates name/title.

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

Usage Guidelines1/5

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

No guidance is provided on when to use this tool versus alternatives. There is no mention of conditions, exclusions, or comparisons to sibling tools such as cocos_component_set, leaving the agent to infer usage from the name alone.

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