Skip to main content
Glama

Attach an image (base64) to a draft

set_draft_media_from_base64
Destructive

Decodes a base64-encoded image and attaches it to an existing draft. Use this tool ONLY for images shared directly in the conversation as attachments (not a public URL). For PDF documents and videos, use set_draft_media_from_url with a public URL instead (e.g. from Canva, Google Drive, or any public hosting).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesBase64-encoded image content (without the data:…;base64, prefix)
typeYesMedia type — images only. For PDF/video, use set_draft_media_from_url.
titleNoMedia title (optional)
altTextNoAlt text for the image (optional)
draftIdYesThe draft identifier
mimeTypeYesMIME type of the image, e.g. image/png, image/jpeg, image/gif, image/webp

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the agent knows this is a mutating operation. The description adds useful context (attachment-based input, decode behavior, existing-draft requirement) but does not disclose what the destructive flag implies — e.g. whether attaching replaces existing draft media or what happens on failure. With annotations carrying the safety profile, this is a modest but real addition.

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?

Three tight sentences with no filler, and the core action plus its scope ('existing draft') is front-loaded ahead of the routing guidance. Every clause either defines the operation or routes the agent.

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 six-parameter, no-output-schema mutation tool, the description covers input mode, target resource, and alternatives adequately, and the schema covers all parameters fully. The only meaningful gap is the unstated effect on pre-existing draft media, which the destructive annotation hints at but does not explain.

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% and includes the base64 prefix caveat, MIME type format, and the enum constraint on type. The description adds no parameter-level syntax beyond what the schema already states, so the baseline 3 applies.

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?

States a specific verb and resource: decodes base64 image and attaches it to an existing draft. It explicitly distinguishes itself from the sibling set_draft_media_from_url, so an agent can route correctly without opening either schema.

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?

Gives an explicit ONLY condition ('images shared directly in the conversation as attachments') and an explicit exclusion with the alternative named for PDF/video ('use set_draft_media_from_url with a public URL'). When-to-use and when-not-to-use are both covered.

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.

Resources