Skip to main content
Glama

exportImageAsset

Retrieve generated images from sessions with base64 data and metadata, optionally saving to disk for local use.

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
sessionIdYesThe session UUID containing the asset
assetIdYesThe asset UUID to export
destinationPathNoOptional absolute path to save the image to disk. Only works when the server is running locally (stdio transport).
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly explains the return format ('Returns the image inline as base64 along with metadata'), describes the conditional behavior for local vs. remote usage ('Only works when the server is running locally'), and specifies the tool's purpose as an export operation. It doesn't mention rate limits, authentication needs, or error conditions, but provides substantial behavioral context.

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 well-structured and efficiently organized: purpose statement first, return format second, usage context third, and concrete examples last. Every sentence serves a distinct purpose with zero redundancy. The examples are appropriately placed after the conceptual explanation.

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?

For a tool with 3 parameters, 100% schema coverage, and no output schema, the description provides excellent context about behavior, return format, and conditional usage patterns. It explains what the tool returns (base64 + metadata) and the local/remote distinction. The main gap is the lack of output schema, but the description compensates well by describing the return format. It could mention error cases or rate limits for completeness.

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 the schema already documents all three parameters thoroughly. The description adds minimal value beyond the schema - it mentions the optional destinationPath parameter and its local-only restriction, but doesn't provide additional semantic context about sessionId or assetId beyond what's in the schema descriptions. This meets the baseline for high schema coverage.

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 specific action ('Export a generated image asset') and identifies the resources involved ('by session and asset ID'). It distinguishes from sibling tools like 'generateImage' by focusing on retrieval/export rather than creation, and from 'inspectImageSession' by targeting a specific asset rather than session metadata.

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?

The description provides explicit guidance on when to use this tool ('After generating an image with generateImage, use the sessionId and assetId to export') and includes a clear alternative usage pattern for local environments ('To save to disk (local/stdio only)'). It also implicitly distinguishes from other siblings by focusing on asset export rather than generation or inspection.

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