Skip to main content
Glama

draw_text_to_render_target

Destructive

Draws text onto a UTextureRenderTarget2D in the Unreal Engine 5 editor with engine font, color, scale, and pixel position. Use it to bake labels or overlays into render targets for later export.

Instructions

Draw a string onto a UTextureRenderTarget2D asset in one canvas pass in the editor world, in the engine's medium font (no font choice), tinted by color and scaled by scale, with position the text's top-left in render-target pixels. The text blends over the existing pixels: 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 is an error; drawn is false, and the call fails, when nothing was drawn (an empty text, or no engine font: font_resolved says whether one was found). Related: draw_texture_to_render_target, draw_line_to_render_target, clear_and_fill_render_target.

Returns: { render_target_path: string, text: string, drawn: bool, font_resolved: bool, position: [number] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to draw
colorNoOptional [r, g, b, a] text color, defaults to opaque white
scaleNoOptional uniform number or [x, y] scale, default 1
positionNoOptional [x, y] text position, default [0,0]
render_target_pathYesAsset path of the destination render target

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: the operation is additive (nothing cleared), not saved or undoable, render-target contents are GPU-only, a missing render target is an error, and drawn=false/font_resolved describe the failure mode when no text or no engine font is available. This explains rather than contradicts destructiveHint=true.

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-loaded with the core action and scope, and each sentence carries information (font lock, blending behavior, persistence path, error semantics). It is dense and parenthetical in places, but no sentence is pure filler.

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?

No output schema exists, and the description enumerates the returned fields (render_target_path, text, drawn, font_resolved, position) plus error conditions and follow-up tools. For a 5-parameter mutation with no output schema, nothing material 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 schema already documents each parameter; the baseline would be 3. The description adds meaning by fixing the font (no font choice) and clarifying that position is the text's top-left in render-target pixels, which the schema's '[x, y] text position' does not specify.

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?

States a specific verb (draw a string) and target (UTextureRenderTarget2D asset), plus scope details (one canvas pass, editor world, engine medium font, color tint, scale, pixel position). It is immediately distinguishable from siblings like draw_line_to_render_target and draw_texture_to_render_target.

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?

Explains the key context (editor world, blends over existing pixels, nothing cleared) and directs the agent to create_static_texture_from_render_target or export_render_target to persist GPU-only contents. The 'Related:' list names alternatives but does not explicitly state when to pick each one, so routing is implied rather than fully prescribed.

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