Skip to main content
Glama

Upload image

upload_image

Upload an image file to attach it to a space and receive Markdown code for embedding it in a page. Accepts PNG, JPEG, GIF, or WebP up to 5 MB; supply the image via path, base64 data, or URL.

Instructions

Attach an image to a space and get back the Markdown to embed it in a page. Use this to put screenshots and diagrams into the pages you write, so whoever reads the page later — human or agent — can see what you saw. ACCEPTS: PNG, JPEG, GIF, WebP. Max 5 MB. SVG is rejected (script-injection vector). The format is detected from the file's own bytes, not its name. HOW TO SUPPLY THE IMAGE — give exactly one of: • path — absolute path to an image file on this machine. Prefer this: the bytes never pass through the conversation. • data — base64 of the file's bytes (a "data:image/png;base64,..." URI is also accepted). • source_url — a public http(s) URL; the server fetches it. If you can only SEE an image (e.g. a screenshot another tool returned), you cannot re-encode it from what you see — you need the file. Save it to disk, then pass its "path". Counts against the workspace's image storage quota (Free 50 MB, Pro 5 GB).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoBase64 of the image FILE'S BYTES (a "data:image/png;base64,..." URI is accepted too). Not a description of the image, and not something you can produce from an image you only viewed.
pathNoAbsolute path to an image file on this machine. Best option — the bytes never enter the conversation.
spaceNoSpace UUID or "workspaceSlug/spaceSlug" path. Optional for space-scoped tokens.
alt_textNoAlt text for the returned Markdown snippet.
filenameNoOriginal filename to record (cosmetic; defaults to image.<ext>).
source_urlNoPublic http(s) URL the server fetches the image from. Must be publicly reachable — private/loopback addresses are refused.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, etc.), the description reveals key behaviors: format detection from bytes, SVG rejection due to script-injection risk, quota impact, and the limitation that a viewed image cannot be re-encoded. These are not evident from annotations and enrich the agent's understanding.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is excessively verbose, repeating parameter details already present in the schema and embedding extensive explanatory text. It could be condensed to the essential purpose and critical usage notes without losing clarity. The structure is also messy, mixing acceptance criteria and guidance in a single long paragraph.

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?

The description covers all necessary aspects: purpose, usage context, parameter semantics, behavioral side effects, and limitations. It even hints at the return format ('get back the Markdown'). Given the lack of output schema, it provides sufficient context for an agent to invoke the tool correctly.

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

Parameters5/5

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

Although the schema already describes each parameter (100% coverage), the description adds semantic nuance: it explains why 'path' is preferred ('the bytes never enter the conversation'), that 'data' cannot be derived from a viewed image, and that 'source_url' must be publicly reachable. This goes beyond the schema's literal description and helps correct usage.

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 states a specific verb ('Attach') and resource ('an image to a space'), and clarifies the output ('get back the Markdown'). It clearly distinguishes the tool's purpose from siblings, as no other sibling handles image upload.

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 it ('Use this to put screenshots and diagrams') and how to supply the image, including preferred methods (path over data) and constraints (e.g., 'If you can only SEE an image... you cannot re-encode it'). It implicitly explains when not to use (e.g., when you only have a view, not a file).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/hoornet/agentdocs-mcp'

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