Skip to main content
Glama

Media Generator — Images, Videos & Audios

generate_image

Input: A textual input in prompt provide by user in the form of image prompt.

Output: We will return the image url output to the user.

Functionality: This tool is used to generate an image based on a text prompt. User will provide a prompt and the tool will generate an image based on the prompt.

Steps:

  1. We will get the user_id from the request context.

  2. We will validate the user's generation tokens.

  3. We will call the Generate Image API with the prompt provided by the user.

  4. This Generate Image API will return a JSON response with the image url.

  5. We will return the image url to the user.

INSTRUCTION FOR CLIENT MODEL:

  • Extract the required input parameter 'prompt' (type: string) from the user's provided prompt. The prompt should describe the image to generate.

  • Ignore any extraneous information in the user's input.

  • Pass the extracted 'prompt' value to this tool as the 'prompt' parameter.

  • Do not require the user to specify parameter names; extract the value from natural language.

  • Example: For user input "Generate an image of a cat in a spacesuit on Mars", extract 'cat in a spacesuit on Mars' as the prompt.

Input Schema

NameRequiredDescriptionDefault
promptYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedOutput schema / description
      Removed value: -"Generic wrapper for non-object return types."
  2. First observed

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose meaningful behavior: user_id is pulled from request context, the user's generation tokens are validated (implying quota/authorization gating), an external Generate Image API is called, and the image URL is returned. It omits failure modes, token exhaustion behavior, and latency/rate limits, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The Input/Output/Functionality sections restate the same idea three times before the actual guidance, and the five numbered steps describe internal implementation (context lookup, API call) rather than agent-relevant behavior. The useful extraction instructions are buried at the end rather than front-loaded.

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

Completeness4/5

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

An output schema exists, so the return value need not be explained, yet the description still names the image URL result. Given one required parameter, no annotations, and a simple generation contract, the description covers enough for an agent to call it correctly, though it says nothing about error or token-exhaustion responses.

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 description coverage is 0% for the single 'prompt' parameter, so the description must compensate, and it does: it explains the value should describe the image to generate, that it is extracted from natural language rather than named by the user, and gives a concrete example ('cat in a spacesuit on Mars'). Format constraints (length limits, style keywords, negative prompts) are still unstated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('generate an image based on a text prompt') and the Functionality line confirms it plainly. It never names or contrasts with close siblings such as edit_image_with_text, upscale_image, or logo_generator, so sibling differentiation is left to inference.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no statement of when to pick this over edit_image_with_text or logo_generator, and no prerequisites in the usage sense. The 'INSTRUCTION FOR CLIENT MODEL' block addresses argument extraction, not tool selection, so it does not satisfy this dimension.

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.