Skip to main content
Glama

upload_image_from_content

Upload a single image attachment to an eLabFTW experiment or item from base64-encoded content. Returns the new upload ID and size.

Instructions

Upload a single image attachment to an eLabFTW experiment or item from base64-encoded content. WRITE OPERATION — requires the update write scope. Only image/png, image/jpeg, image/gif and image/tiff are accepted. Returns the new upload id and size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
commentNo
filenameYes
mime_typeNo
entity_typeYes
content_base64Yes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and discharges much of it: it discloses the write/auth requirement (update scope), the validation constraint (allowed mime types), and the return contents (upload id and size). Gaps remain around size limits, idempotency, and permitted entity_type values, keeping it out of the top band.

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?

Four short sentences, each earning its place: purpose, auth/operation class, accepted formats, and return. The most decision-relevant facts (what it does and that it is a write) are front-loaded with zero filler.

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

Completeness3/5

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

An output schema exists so the return format need not be spelled out, and the auth/mime facts are supplied. However, for a 6-parameter write tool with zero schema descriptions and no annotations, the unexplained parameter semantics and missing accepted entity_type values leave real gaps for an agent trying to invoke it correctly.

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 coverage is 0% across 6 parameters, so the description must compensate but largely does not. It loosely hints at entity_type ('experiment or item') and content_base64 ('from base64-encoded content'), while filename, mime_type, and comment are never explained and no accepted entity_type values are given.

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?

Specific verb (upload), resource (a single image attachment), target (eLabFTW experiment or item) and source (base64-encoded content) are all stated. No sibling tool performs uploads, so an agent can immediately place it. The purpose is self-contained and unambiguous.

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?

It states the operation class (WRITE OPERATION), the required scope (update write scope), and the accepted input types (png/jpeg/gif/tiff), which are effective gating conditions. It stops short of explicitly naming a when-not or an alternative, but no sibling offers a competing path, so little is left ambiguous.

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