Skip to main content
Glama

draw_material_to_render_target_region

Destructive

Render a material as a rectangle onto a UTextureRenderTarget2D at a chosen position and size, compositing over existing pixels to produce region-specific effects.

Instructions

Draw a material as a rectangle onto a UTextureRenderTarget2D asset in one canvas pass in the editor world: position and size in render-target pixels from the top-left (size defaults to the whole target), full 0-1 UVs. It composites over the existing pixels by the material's blend mode: nothing is cleared, saved or undoable, and render-target contents live on the GPU only, so keep them with create_static_texture_from_render_target or export_render_target. A missing render target or material is an error; drawn is false, and the call fails, when a width or height that is not positive draws nothing. For a full-target pass use draw_material_to_render_target; for a texture, draw_texture_to_render_target.

Returns: { render_target_path: string, material_path: string, drawn: bool, position: [number], size: [number] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoOptional [w, h] destination size, defaults to render target dimensions
positionNoOptional [x, y] destination position, default [0,0]
material_pathYesAsset path of the UMaterialInterface to draw
render_target_pathYesAsset path of the destination render target

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations (which only say write/destructive/non-idempotent): it discloses that compositing happens via the material's blend mode, that nothing is cleared/saved/undoable, that render-target contents are GPU-only and need explicit persisting, and that missing targets or non-positive size cause an error with drawn=false. This is exactly the destructive-semantics context an agent needs before calling.

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?

Front-loads the core action and is dense but nearly every clause carries new information (units, defaults, alternates, errors, persistence). It is slightly run-on across the single long sentence, and the Returns block, while useful given no output schema, duplicates part of the sentence.

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?

With no output schema, the description supplies the return shape, and it also covers error behavior, destructive semantics, persistence requirements, coordinate conventions, and sibling disambiguation. Nothing an agent needs to call this correctly is missing.

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 the baseline is 3, but the description adds genuine meaning the schema lacks: pixel units, top-left origin, size defaulting to the whole target, and 0-1 UVs. That said, the position/size string-encoding format is not clarified further than the schema already implies.

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?

Names a specific verb (draw) plus resource (a material, as a rectangle, onto a UTextureRenderTarget2D) and pins the scope ('in one canvas pass in the editor world'). It also explicitly distinguishes itself from draw_material_to_render_target (full-target) and draw_texture_to_render_target (texture), so an agent can route without opening any schema.

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?

States the exact condition for choosing it (region pass with position/size) and names both alternatives with the condition that selects each ('For a full-target pass use...; for a texture, ...'). It also flags the persistence follow-ups (create_static_texture_from_render_target, export_render_target), leaving nothing to inference.

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