Skip to main content
Glama

Generate image with SmartAPI

generate_image

Generate an image from a detailed prompt using the SmartAPI image generation endpoint, saving the result as a local file in PNG, JPEG, or WebP format.

Instructions

Generate one image through the paid SmartAPI gpt-image-2 endpoint and save it as a local file. Use only when the user asks to create an image. The call spends SmartAPI balance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoRequested WIDTHxHEIGHT or auto. SmartAPI returns the normalized effective size.auto
promptYesDetailed prompt describing the image to generate.
qualityNoImage generation quality.high
filenameNoOptional filename without extension. Existing files are never overwritten.
output_formatNoFile format for the generated image.png

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
request_idYes
output_formatYes
charged_tokensYes
effective_sizeYes
Behavior4/5

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

The description adds behavioral context beyond annotations: it mentions the tool spends SmartAPI balance, confirms it saves a local file, and notes that existing files are never overwritten (from schema). Annotations are minimal, so the description effectively carries the burden of disclosure.

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?

The description is three efficient sentences, front-loaded with the core action. Every sentence adds value: action, usage condition, and cost/behavior. No fluff or redundancy.

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?

Given the tool has 5 parameters and an output schema, the description covers the essential behavioral aspects (endpoint, cost, saving) but does not mention the output format or the return structure. It is mostly complete for an agent to understand usage.

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 description coverage is 100%, so baseline is 3. The description does not add per-parameter details beyond the schema, but it provides overarching context (paid endpoint, local saving) that indirectly helps. No significant extra parameter-level meaning is added.

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?

The description clearly states the verb 'generate' and the resource 'image', specifying the paid SmartAPI gpt-image-2 endpoint and that it saves as a local file. This is specific and distinguishes the tool from potential alternatives, even though no siblings are listed.

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?

The description explicitly says 'Use only when the user asks to create an image.' This provides a clear condition for when the tool should be invoked. However, it does not mention when not to use it or discuss alternatives, but with no siblings the guidance is adequate.

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/smrcdr/smartapi-images'

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