Skip to main content
Glama

asset_nine_slice

Extract nine-slice data from images using 4 pixel offsets. Produces CSS border-image snippets and game-engine values (Unity, Godot, Phaser, PixiJS). Optionally creates Android 9-patch .9.png files.

Instructions

Emit a 9-slice config + CSS border-image snippet + Unity/Godot/Phaser/PixiJS-ready numbers from one image and 4 pixel offsets. Optionally also emit an Android .9.png with the 1px stretchable-region encoding. MCP equivalent of p2a nine-slice <image>.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesPath to the source image.
guidesYesPixel offsets from each edge marking the fixed regions.
outNoOutput directory. Defaults to the directory of the input image.
android_9patchNoAlso emit <name>.9.png with Android 9-patch 1px-border encoding.
Behavior4/5

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

Discloses key behavioral traits: emits multiple output formats and optionally an Android .9.png file. No contradictions with annotations. Could mention overwriting behavior or return value, but overall good transparency.

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?

Two sentences, front-loaded with core purpose and outputs. No unnecessary words. Efficient and clear.

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

Completeness3/5

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

Covers main inputs and outputs, but lacks details on return value, error handling, or formatting constraints. Adequate for a generation tool but with room for improvement.

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 baseline is 3. Description reinforces parameter meanings by mentioning 'one image and 4 pixel offsets' but does not add significant new semantics beyond the schema.

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?

Description clearly states the tool emits a 9-slice config, CSS border-image snippet, and game-engine-ready numbers from one image and pixel offsets, with optional Android .9.png output. It distinguishes itself from sibling tools by focusing on nine-slice generation.

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?

Implied usage for generating nine-slice data from an image, but lacks explicit when-to-use or when-not-to-use guidance, nor comparisons to sibling tools. The MCP equivalent reference provides some context.

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/MohamedAbdallah-14/prompt-to-asset'

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