Skip to main content
Glama

draw_text

Place single-color text on a sprite layer at a specified position, with options for font, scale, and multi-line support.

Instructions

Draw text onto a layer at (x, y) in a single colour.

Args:
    text: The string (supports "\n" for multiple lines).
    x, y: Top-left position of the text.
    color: Text colour.
    scale: Integer pixel-scaling of the rendered glyphs (default 1).
    font_path: Optional path to a .ttf/.otf font. If omitted, a built-in
        bitmap font is used (best for tiny pixel text).
    font_size: Point size when a TrueType font_path is given.
    spacing: Extra pixels between lines.
    threshold: 0-255 cutoff; pixels brighter than this are drawn (lower =
        heavier text). Keeps glyphs crisp (no anti-aliasing artefacts).

Returns the standard draw result plus the rendered text's pixel size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYes
yYes
textYes
colorYes
frameNo
layerNo
scaleNo
spacingNo
filenameYes
font_pathNo
font_sizeNo
thresholdNo
Behavior4/5

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

Without annotations, the description bears full responsibility. It discloses key behaviors: support for newlines ('\n'), default bitmap font vs. TrueType font with font_size, threshold cutoff for crispness, and return of pixel size. However, it does not address what happens if font_path is invalid, error handling, or whether drawing overwrites existing pixels.

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 a brief initial sentence followed by a clean, bullet-like argument list. It is informative without redundancy, includes essential details, and is appropriately sized for the parameter count.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (12 parameters, no output schema, no annotations), the description covers nearly all aspects: parameter explanations, return value, and behavioral details. Minor gaps include lack of error scenarios (e.g., invalid font_path, out-of-bounds coordinates) and lack of explanation for 'standard draw result'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully explain parameters. It does so comprehensively: text supports newlines, x/y are top-left, color is a string, scale defaults to 1, font_path is optional with implications, font_size is only for TrueType, spacing adds between lines, threshold controls cut-off. It also notes the return value includes pixel size.

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: 'Draw text onto a layer at (x, y) in a single colour.' It specifies the verb 'draw', the resource 'text onto a layer', and enumerates parameters. This distinguishes it from sibling drawing tools like draw_pixels or draw_line, which have different purposes.

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 does not explicitly state when to use this tool versus alternatives, nor does it mention when not to use it. The context is implied (use when drawing text), but no guidance is given on choosing between this and other text-related tools (e.g., none listed) or general drawing tools.

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/MalloyTheDev/aseprite-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server