Skip to main content
Glama

clear_render_target

DestructiveIdempotent

Fill a GPU render target with a solid color via ClearRenderTarget2D; returns cleared=false when the engine skips the clear, such as under -nullrhi or in a commandlet.

Instructions

Clear a render target to a solid color via ClearRenderTarget2D. Render-target contents live on the GPU only, so nothing is saved or undoable. cleared is false, and the call fails, when the engine skips the clear: a render target without a resource, which is every render target in a process that cannot render (-nullrhi, a commandlet).

Returns: { render_target_path: string, cleared: bool, clear_color: [number] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorNoOptional [r, g, b, a] clear color, defaults to opaque black
render_target_pathYesAsset path of the render target

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4/5.0
Behavior5/5

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

Annotations give the safety profile (destructiveHint/idempotentHint), and the description adds genuinely new behavior: contents live on the GPU, nothing is saved or undoable, and cleared is false with a failing call when the engine skips the clear. The -nullrhi/commandlet failure mode is exactly the kind of environment-specific disclosure structured fields cannot carry.

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, followed by failure semantics; every sentence carries weight. The trailing 'Returns:' line is mildly redundant formatting but earns its place since no output schema exists.

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 covers the return payload, the idempotent/destructive nature, and the conditions under which the operation silently no-ops. An agent has everything needed to call it and interpret the result.

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%, so both parameters are already documented ('color' default opaque black, render_target_path asset path). The description only restates the solid-color idea and the returned clear_color, adding no syntax or format detail beyond the schema. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Clear') and resource ('a render target') and ties it to the underlying engine call ClearRenderTarget2D. It does not name the near sibling clear_and_fill_render_target, so the agent must infer the boundary itself, which keeps it from a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains failure context (-nullrhi/commandlet, no resource) but gives no when-to-use vs alternatives guidance; it never says to prefer clear_and_fill_render_target or the draw_*_to_render_target tools for partial operations. Usage is only implied.

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