Skip to main content
Glama

添加文字标记

image_draw_text

Draw text on images to add annotations, labels, or Chinese captions. Specify text content, position, font size, colors, and get an annotated image as base64.

Instructions

在图片上绘制文字,支持中文。

适用于在图片上添加注释、说明文字等。 中文字体支持:优先使用VISION_MCP_FONT_PATH指定的字体文件,其次尝试系统CJK字体。

参数:

  • image: 图片路径或URL

  • texts: 文字列表,每个包含x/y(位置)、text(内容)、font_size(字号)、color(颜色)、background_color(背景色)

  • normalized: 坐标是否为0-1归一化值(默认false,像素坐标)

  • output_path: 可选,保存到文件路径

返回:标注后的图片(base64 PNG)和元信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYes图片路径或URL(http/https开头为URL,否则为本地路径)
textsYes文字列表
normalizedNo坐标是否为0-1归一化值。false表示像素坐标,true表示归一化坐标。
output_pathNo可选:输出图片保存的文件路径。无论是否设置,图片都会以base64返回。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthYes
formatYes
heightYes
size_bytesYes
Behavior4/5

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

The description discloses useful non-obvious behavior: Chinese font priority via VISION_MCP_FONT_PATH with system fallback, normalized vs pixel coordinates, and the guarantee that a base64 PNG is always returned. The annotations are all false/no-op, so the description carries the behavioral burden and handles it well, though it does not discuss output-file overwriting or other side effects.

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?

The description is compact, front-loads purpose and usage, and organizes parameter details into a scannable block. It is not bloated, though it repeats some schema content like default colors and font sizes, which keeps it from being truly exceptional.

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?

The description covers input image, text list shape, coordinate mode, optional output path, and return format, giving an agent enough to invoke the tool correctly. Minor edge details such as coordinate origin or overwrite behavior are not stated, but the schema and output behavior cover the essential requirements.

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 one meaningful extra behavior: output_path does not suppress the base64 return. It otherwise summarizes the text fields and defaults clearly, adding modest value beyond the schema.

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?

The description states a clear action-resource pair ('在图片上绘制文字') and explains the use case of adding annotations or comments. It is easily distinguishable from siblings like image_draw_box and image_rotate, though it does not explicitly name an alternative tool.

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?

The description gives a clear intended-use context ('适用于在图片上添加注释、说明文字等'), which tells an agent when this tool is appropriate. It does not mention exclusions or explicitly route to alternatives, so it falls short of full when-to-use guidance.

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/karond-is-me/vision-mcp'

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