Skip to main content
Glama
ryuto-alt

DX12 Engine MCP Server

by ryuto-alt

カスタムシェーダー割当

dx12_set_mesh_shader
Idempotent

Set or clear the shader path of a mesh renderer entity, applying custom shaders from the assets/shaders folder. Optionally enable alpha blending for transparent rendering.

Instructions

エンティティの MeshRenderer::shaderPath を設定/解除する(Inspector の「Shader」欄と同じ操作)。dx12_create_shader で作った .hlsl の assets/shaders 相対パスを渡す。shaderPath 省略/空文字で既定 Forward に戻す。modelPath と違いメッシュ再ロードを伴わないため即時反映。★スキンドメッシュ(SkeletalAnimation 持ち)は既定 Forward へ自動フォールバックする(返り値 skinnedFallbackWarning で判定可)。★シェーダーのピクセルシェーダーで alpha を出しても、既定では不透明固定(BlendEnable=FALSE)でブレンドに使われない。半透明にしたい場合は alphaBlend:true も渡すこと(Inspector の「アルファブレンド有効」チェックボックスと同じ)。entity(id) か name 指定。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoエンティティ名(完全一致)。id の代わりに使える。Stop 後など id が変わる場面で安定。
entityNoエンティティ id(int)。name と排他。
alphaBlendNotrue でシェーダーの alpha 出力を SrcAlpha/InvSrcAlpha ブレンドに使う(DepthWrite OFF)。省略時は既存値を維持、既定は false(不透明固定)。
shaderPathNoassets/shaders 相対パス。例: ToonShade.hlsl。省略/空文字で既定 Forward に戻す。

Output Schema

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

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

Discloses important behaviors: immediate effect (no mesh reload), automatic fallback for skinned meshes, default opaque blending, and mentions return value skinnedFallbackWarning. Annotations only provide idempotentHint, so description adds significant context without contradiction.

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 well-structured with prominent bullet markers (★) for critical notes. Each sentence serves a purpose, from primary action to caveats, without redundancy. Front-loaded with main purpose.

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 an output schema exists (for return values like skinnedFallbackWarning), the description sufficiently covers all behavioral aspects: parameter usage, fallback logic, and blending behavior. It is complete for an AI agent to invoke correctly.

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 shaderPath format (relative path under assets/shaders) and alphaBlend semantics (default false, requires explicit true for transparency), going beyond schema descriptions.

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 tool's action: setting/unsetting MeshRenderer::shaderPath, with specific details like reverting to default Forward on empty string and distinguishing from modelPath. It is distinct from sibling tools like dx12_create_shader and dx12_set_sprite_shader.

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?

Provides explicit guidance: when to use (setting custom shader on mesh), when not (skinned meshes auto-fallback), and alternative settings (alphaBlend for transparency). Also clarifies entity identification via id/name.

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