Skip to main content
Glama

图片拼接

image_concat
Idempotent

Combine multiple images into a single image using horizontal, vertical, or grid layouts. Set spacing, background color, and optional output path to create a composite PNG.

Instructions

将多张图片拼接为一张。

支持三种布局:

  • horizontal: 横向拼接(左右排列)

  • vertical: 纵向拼接(上下排列)

  • grid: 网格拼接(按行列排列,需指定cols)

参数:

  • images: 图片路径或URL列表

  • layout: 拼接布局(horizontal/vertical/grid)

  • cols: grid布局的列数(仅grid布局有效)

  • gap: 图片间距(像素,默认0)

  • background: 背景色(默认#FFFFFF)

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

返回:拼接后的图片(base64 PNG)和元信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gapNo图片间距(像素)
colsNogrid布局的列数
imagesYes图片路径或URL列表(http/https开头为URL,否则为本地路径)。至少1张,最多8张。
layoutYes拼接布局
backgroundNo背景色#FFFFFF
output_pathNo可选:输出图片保存的文件路径。无论是否设置,图片都会以base64返回。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthYes
formatYes
heightYes
size_bytesYes
Behavior5/5

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

The description adds meaningful behavioral detail beyond annotations: it documents three layout modes, clarifies that cols only applies to grid, explains the optional output_path behavior, and states that the result is a base64 PNG with metadata. This goes beyond what readOnlyHint/idempotentHint/destructiveHint provide.

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 one-line summary, a compact layout list, and a parameter list. No sentence is wasted, and the key behavior appears first.

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?

For a 6-parameter tool with an output schema and annotations, the description is complete: it covers layouts, parameters, defaults, the optional file save, and the return format. It pairs well with the schema and annotations, so an agent can invoke it correctly without guessing.

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 all six parameters. The description still adds value by summarizing each parameter and highlighting the grid-only nature of cols, plus the persistence-side effect of output_path. This is more than baseline.

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 opens with a specific verb and resource: '将多张图片拼接为一张' (concatenate multiple images into one). It then enumerates the three supported layouts, making the tool's scope unmistakable and distinct from sibling image operations like resize, crop, rotate, and flip.

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 establishes clear usage context: this tool is for combining multiple images into a single image, with layout choices. It does not explicitly name alternatives or state 'use this instead of X', but the sibling tools are sufficiently different that the provided context makes the selection obvious.

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