Skip to main content
Glama

grok_segment_map

Need to edit specific objects in a Grok Imagine Image 2.0 generation? Segment it into named regions with mask URLs for targeted edits.

Instructions

FREE (0 credits). Segment a Grok Imagine Image 2.0 generation into NAMED regions for targeted editing. Returns each region's index, semantic name (e.g. "red apple", "wooden table"), and mask PNG URL. Workflow: generate_image model="grok-imagine-image-2-0/text-to-image" → grok_segment_map (this, free) → grok_image_edit with the mask_indexs you want changed. Only works on task_ids from a Grok Image 2.0 generation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesTask ID from a completed generate_image call with model grok-imagine-image-2-0/text-to-image
Install Server

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are present, but the description discloses key behaviors: it returns region index, semantic name, and mask PNG URL, and notes it is free. This adds useful context beyond the bare schema.

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 slightly verbose but well-structured, covering purpose, usage, output, and cost in a logical flow. It is not excessively redundant and remains readable.

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?

Given only one parameter and a clear schema, the description sufficiently explains the tool's role in the workflow, its input constraints, and its output format, making it complete for an agent to decide when and how to use it.

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?

The schema already describes the task_id parameter in full (Task ID from a completed generate_image call with model grok-imagine-image-2-0/text-to-image). The description mainly repeats this requirement without adding new parameter-specific semantics.

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?

Explicitly states the tool segments a Grok Imagine Image 2.0 generation into named regions for targeted editing, with a clear verb and resource. It is distinct from sibling tools like generate_image and grok_image_edit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear usage conditions: only works on task_ids from a Grok Image 2.0 generation, and outlines a recommended workflow (generate_image -> grok_segment_map -> grok_image_edit).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/elibarnett/kie-mcp'

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