Skip to main content
Glama

tool_image_to_base64

Convert image files to Base64 strings or data URIs. Accepts base64-encoded file payloads and returns both formats for easy embedding.

Instructions

[image] Image to Base64

Parameters:

  • file (bytes): File

  • outputFormat (string): Output

Outputs:

  • base64 (string): Base64

  • dataUri (string): Data URI

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoFile (base64 file payload)
base64NoBase64
dataUriNoData URI
outputFormatNoOutput
Behavior2/5

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

With no annotations, the description carries full responsibility for behavioral disclosure. It only lists inputs and outputs without explaining how the conversion works, what outputFormat values are allowed, or any side effects/constraints. It also inconsistently describes 'file' as bytes while the schema defines it as an object, adding confusion rather than clarity.

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 short and structurally clear, with a title, parameter list, and output list. It is front-loaded and easy to parse, though the content is mostly duplicated schema labels. Still, it is appropriately concise for a simple utility.

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

Completeness2/5

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

The description is incomplete for the tool's complexity. It does not explain what outputFormat options exist, whether both base64 and dataUri are always returned, how images are validated, or the relationship between the file object and the top-level base64/dataUri properties. The confusing schema (with base64/dataUri as inputs) is not clarified, leaving the agent with unresolved questions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema descriptions are merely labels ('File', 'Output', 'Base64', 'Data URI') and add no meaning. The description claims 'file (bytes)' which contradicts the schema's object type, misleading the agent. High schema coverage is offset by the lack of semantic detail and the incorrect type hint.

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 title '[image] Image to Base64' clearly conveys that the tool converts an image to a Base64 representation. The verb is implied ('convert'), but it distinguishes the resource (image) from generic file tools, though it does not explicitly differentiate from sibling tools like tool_file_to_base64.

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?

No guidance is provided about when to use this tool versus alternatives. It does not mention image-specific handling, output format choices, or exclusions. The description is purely declarative with no contextual usage advice.

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/maple-awa/tool-mcp'

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