Skip to main content
Glama
ryuto-alt

DX12 Engine MCP Server

by ryuto-alt

Luaコンポーネントアタッチ

dx12_attach_lua_component

Attach a Lua component to an entity using a relative script path. The component activates on Play, allowing runtime initialization and updates.

Instructions

Lua コンポーネントをエンティティにアタッチする。エディタ上では貼るだけで、実際の初期化/実行は Play 時(OnStart/OnUpdate)。script は assets 相対(assets 配下限定)。即時反映で ok を返す。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoエンティティ名(完全一致)。id の代わりに使える。Stop 後など id が変わる場面で安定。
entityNoエンティティ id(int)。name と排他。
scriptYesassets 相対パス。例: components/Health.lua

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultNoエンジンからの生の結果。実際の形は各ツールの説明 / dx12_describe_components を参照。text にも同内容を JSON 文字列で格納。
Behavior4/5

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

With minimal annotations (only openWorldHint=false), the description carries the burden. It discloses that actual initialization/execution happens at play time, script path is assets-relative, and returns ok immediately. It could mention error handling but is sufficient.

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?

The description is three sentences, front-loaded with purpose, and every sentence adds value. No unnecessary words.

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?

Given the tool's complexity (3 parameters, output schema exists), the description covers attachment behavior, timing, path constraints, and immediate response. The output schema presumably documents return values, so no additional info needed.

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 coverage is 100%, so baseline is 3. The description adds value by explaining that 'name' uses exact match and is stable after Stop, which supplements the schema descriptions. It does not duplicate schema info.

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 clearly states the action: 'Lua コンポーネントをエンティティにアタッチする' (Attach Lua component to entity). This specific verb+resource distinguishes it from siblings like dx12_create_lua_component (creating a component) and dx12_read_lua_component (reading state).

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 description explains when the component activates ('Play 時(OnStart/OnUpdate)') and that it's attached in the editor. It provides context for usage but does not explicitly state when to use this tool vs alternatives.

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/ryuto-alt/dx12-mcp'

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