Skip to main content
Glama
ryuto-alt

DX12 Engine MCP Server

by ryuto-alt

Sprite2Dカスタムシェーダー割当

dx12_set_sprite_shader
Idempotent

Sets a custom shader path or resets to default for a world-space sprite entity. Optionally enables alpha blending for the shader output.

Instructions

エンティティの Sprite2D::shaderPath を設定/解除する(Inspector の Sprite2D「Shader」欄と同じ操作)。world-space スプライトのみ対応(HUD不可)。dx12_create_shader で作った .hlsl の assets/shaders 相対パスを渡す。shaderPath 省略/空文字で既定 Sprite シェーダーに戻す。★MeshRendererのカスタムシェーダーとはルートシグネチャ/頂点フォーマットの契約が異なる(cbuffer b0 = float4x4 transform + float time、頂点は POSITION/TEXCOORD0/COLOR0/TEXCOORD1(effect)、詳細はdocs/AUTHORING.md)ため同じ.hlslは使い回せない。alphaBlend は 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 相対パス。例: Dissolve.hlsl。省略/空文字で既定 Sprite シェーダーに戻す。

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?

Annotations show idempotentHint=true. Description adds: reset behavior, alpha blend with depth write off, and constraint that same .hlsl cannot be reused. No contradiction with annotations; adds significant behavioral context.

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

Conciseness4/5

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

Description is a coherent block of text, front-loaded with main action. Could be more structured (e.g., bullets) but still concise for the amount of information. No wasted sentences.

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?

Covers usage constraints, parameter defaults, and differentiation from mesh shader. However, does not mention prerequisites (e.g., entity must have Sprite2D component) or error handling. Output schema exists but description doesn't reference it.

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 100% with detailed parameter descriptions. Tool description adds some context (e.g., world-space limitation) but does not significantly augment parameter meaning beyond schema. Baseline 3.

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?

Description clearly states setting/unsetting Sprite2D::shaderPath, likens to Inspector operation, and distinguishes from mesh shader (different root signature/vertex format). Specific verb+resource, differentiates from sibling dx12_set_mesh_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?

Explicitly states world-space sprites only (no HUD), requires path from dx12_create_shader, explains reset on empty path, alphaBlend behavior, and warns against reusing same .hlsl as mesh shader. Provides clear when-to-use and 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