Skip to main content
Glama

image_generate

Destructive

Generate an AI image from a text prompt using the configured API key, then optionally add it to the media library and set it as a post's featured image.

Instructions

Generate an image with AI from a text prompt, using the image API key configured in Keelhob settings (OpenAI-compatible by default). Optionally import it into the media library and set it as a post's featured image. If no key is configured, this returns guidance and you should use image_search instead.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>"
    },
    "name": "image_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeNo1024x1024
promptYes
filenameNo
attach_toNo
set_featuredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.2

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, and the description does not contradict that; it adds useful context about the required image API key (OpenAI-compatible by default) and the degraded behavior when no key exists. However, it never explains why the operation is flagged destructive—e.g. that set_featured can replace a post's existing featured image or that attach_to writes into the media library—and says nothing about cost, rate limits, or failure modes of the upstream API.

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?

Three tight sentences, front-loaded with the core action and ending with the fallback routing rule. No filler, no repetition of the tool name.

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?

For a five-parameter tool with no output schema and a destructive hint, the description covers the happy path and the no-key fallback but leaves the parameter surface and the destructive side effects unexplained. Enough to attempt a call, not enough to call it safely with the optional write-related flags.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry parameter meaning, and it largely does not. It only implicitly maps 'import it into the media library' and 'set it as a post's featured image' to attach_to/set_featured; size, filename, and the fact that attach_to is a post ID are left entirely undocumented.

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?

States a specific verb+resource ('Generate an image with AI from a text prompt') plus the secondary effects (import to media library, set featured image) and explicitly names the sibling it is not: image_search. An agent can distinguish it from image_search without inspecting either schema.

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?

Gives one explicit routing rule: if no API key is configured, the tool returns guidance and the agent should use image_search instead. That is a clear conditional hand-off, but there is no guidance on when to use the optional attach_to/set_featured side effects versus generating a standalone image, and no other exclusions.

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