Skip to main content
Glama

exportImageAsset

DestructiveIdempotent

Export a generated image asset by session and asset ID. Get the image as base64 with metadata, or save to disk locally.

Instructions

Export a generated image asset by session and asset ID.

Returns the image inline as base64 along with metadata (format, dimensions, size).

When running locally (stdio transport), you can optionally provide a destinationPath to save the image to disk.

USAGE: After generating an image with generateImage, use the sessionId and assetId to export: exportImageAsset(sessionId="...", assetId="...")

To save to disk (local/stdio only): exportImageAsset(sessionId="...", assetId="...", destinationPath="/Users/me/project/images/logo.png")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetIdYesThe asset UUID to export
sessionIdYesThe session UUID containing the asset
destinationPathNoOptional absolute path to save the image to disk. Only works when the server is running locally (stdio transport).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
sizeNo
errorNo
formatNo
successYes
Behavior2/5

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

Annotations include destructiveHint: true, but the description does not clarify what destructive action occurs (e.g., does exporting consume or delete the asset?). The description primarily describes a read-like operation (returning base64 and metadata), which may conflict with the destructive hint, though not explicitly contradictory.

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 well-structured with a clear header, explanatory text, and usage examples. It is slightly repetitive in the usage section (mirroring function call), but overall efficient and front-loaded with key information.

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 the tool has an output schema (no need to describe return values), the description covers dependencies, transport-specific behavior, and usage flow. It is fully adequate for correct invocation.

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 the description adds meaningful context for each parameter: sessionId and assetId are UUIDs from a generation step, and destinationPath is conditionally available only on local/stdio transport. This enhances understanding beyond the schema.

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 tool exports a generated image asset by session and asset ID. It uses specific verbs and resource names, and the context distinguishes it from siblings like generateImage or inspectImageSession.

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 provides explicit usage context: use after generateImage with sessionId and assetId, and mentions optional local disk saving. It lacks explicit when-not-to-use or alternatives, but the context is clear enough.

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/securecoders/opengraph-io-mcp'

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