Skip to main content
Glama

generate_image

Generate an original image with AI to accompany a post (#441). Describe the picture you want; the workspace's brand style guide is applied server-side, so do NOT restate colours or visual style. Takes 10-30 seconds. Costs one of the account's monthly image credits and returns the balance. Over MCP it returns an s3_key you pass to draft_post / save_draft / update_draft via the images field; over SMS/WhatsApp the picture comes back as an attachment. Either way it is saved to the user's media library. Use upload_image instead when the user already has a picture.

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": "generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeNoShape: square (1:1), portrait (2:3), or landscape (3:2). Default square.
styleNoVisual register (default: illustration).
promptYesWhat the image should show. Describe the picture, not the post.
workspaceNoOptional: the workspace (client) to answer from for this call only, by name (e.g. 'Acme') or numeric id, as returned by list_workspaces. Leave it out to use the current workspace. It does not change the current workspace; use select_workspace for that.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / workspace
      Added value: +{
      +  "description": "Optional: the workspace (client) to answer from for this call only, by name (e.g. 'Acme') or numeric id, as returned by list_workspaces. Leave it out to use the current workspace. It does not change the current workspace; use select_workspace for that.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare non-read-only and non-destructive; the description adds far more: 10-30 second latency, consumption of a monthly image credit with balance returned, the s3_key handoff to draft_post/save_draft/update_draft, the SMS/WhatsApp attachment variant, and persistence to the media library. Nothing here contradicts the annotations – generating and saving an asset is a consistent non-read-only, non-destructive write.

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?

Front-loaded with the core action, cost and latency, then the output/transport details, then the alternative tool. Every sentence carries operational content, though the single dense paragraph packs several distinct concerns (cost, transport, handoff, routing) that would read faster with light separation.

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?

There is no output schema, so the description correctly takes on the burden of explaining return values on both transports (s3_key over MCP, attachment over SMS) and the credit balance. For a 4-parameter generative tool, an agent has everything needed to call it and use the result.

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% and enums are self-documented, so the baseline is already 3; the description earns above that by constraining the prompt semantically ('describe the picture, not the post' and don't repeat brand styling) and by clarifying the workspace parameter's behavior via the surrounding context.

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 and resource ('Generate an original image with AI') plus the purpose ('to accompany a post'), which immediately separates it from read-only siblings like get_post. It also names the exact alternative, upload_image, so the agent can discriminate without opening a schema.

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?

Explicit routing rule: 'Use upload_image instead when the user already has a picture.' It also gives prompt-authoring guidance ('do NOT restate colours or visual style') because the brand style guide is applied server-side, which is exactly the kind of when/how guidance that prevents a bad call.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources