Skip to main content
Glama

添加方框标记

image_draw_box

Draw labeled bounding boxes on images to annotate detected objects or highlight specific regions. Accepts pixel or normalized coordinates and returns the annotated image as base64 PNG.

Instructions

在图片上绘制方框标记,可添加文字标签。

适用于标注检测结果、标记图片中的特定区域等。

参数:

  • image: 图片路径或URL

  • boxes: 方框列表,每个方框包含x/y/w/h(位置和尺寸)、color(颜色)、label(标签)、line_width(线宽)

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

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

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boxesYes方框列表
imageYes图片路径或URL(http/https开头为URL,否则为本地路径)
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 important behavior beyond the annotations: the return format is base64 PNG plus metadata, output_path is optional but saving does not change the return behavior, and coordinates can be normalized or pixel-based. This is useful context. It does not explicitly state whether the original image file is modified, but annotations and the output_path design suggest a non-destructive draw-and-return behavior.

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 well-structured: a one-line purpose, a short use-case sentence, a compact parameter list, and a return description. There is some redundancy with the input schema, but it is not excessive and the information is easy to scan.

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?

The description covers purpose, use cases, all parameters including normalized and output_path behavior, and the return format. With a full input schema and an output schema present, nothing critical is missing for an agent to select and invoke this tool correctly.

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 description coverage is 100%, so the schema already documents all parameters and their meanings. The description's parameter list mostly repeats this information without adding deeper semantics, such as examples of coordinate formats or color syntax beyond what the schema provides. Baseline 3 is appropriate.

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 a specific action ('绘制方框标记') on a specific resource ('图片'), and adds that text labels can be included. It also gives concrete use cases ('标注检测结果、标记图片中的特定区域'), which distinguish it from siblings like image_draw_text or vision_detect.

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 clear context for when to use the tool: annotating detection results and marking specific image regions. It does not explicitly mention alternatives or when not to use it, but the use-case framing is enough to guide an agent.

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