Skip to main content
Glama
domdomegg

openfoodfacts-mcp

Upload product image

upload_image

Upload a product image to Open Food Facts by specifying barcode, imagefield (front, ingredients, nutrition, packaging, other), and base64-encoded JPEG or PNG data. Requires OFF_USER_ID and OFF_PASSWORD.

Instructions

Upload a product image to Open Food Facts. Requires OFF_USER_ID and OFF_PASSWORD.

Prefer more photos over fewer. Panels with text (ingredients, nutrition, certifications, recycling instructions) are highest value as OFF can OCR them. Plain sides with just a colour or logo are lowest value but still worth uploading if you have them.

Use the most appropriate imagefield (front, ingredients, nutrition, packaging). Use "other" for additional photos — this uploads without selecting the image as a display image, which is useful when a good display image already exists or for supplementary angles.

The OFF server auto-selects images for front/nutrition/ingredients/packaging on upload unless one is already selected. If you get "status not ok" but a positive imgid, the image uploaded successfully but was not selected (e.g. a display image already exists).

For images on disk, base64-encode them first (e.g. via shell: base64 -i photo.jpg).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
barcodeYesProduct barcode
imagefieldYesImage type
image_dataYesBase64-encoded image data (JPEG or PNG)
lcNoLanguage code for the image (default: en)en
Behavior5/5

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

Discloses key behaviors beyond annotations: authentication requirements, auto-selection of images by the server, and handling of 'status not ok' with positive imgid. No contradiction with readOnlyHint=false, as upload is a write operation.

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 well-structured with clear paragraphs, each sentence contributing value. Slightly verbose but appropriate given the complexity; could be more concise but still effective.

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?

Given no output schema, the description adequately covers authentication, parameter usage, server behaviors, and error handling. Leaves no significant gaps for correct invocation.

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

Parameters4/5

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

Schema coverage is 100% with descriptions for all parameters. The description adds valuable context for 'imagefield' (usage guidance) and 'image_data' (encoding instruction), exceeding baseline expectations.

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 description clearly states the tool uploads a product image to Open Food Facts, with specific verb and resource. However, it does not explicitly distinguish from the sibling tool 'select_image', though it hints at image selection behavior.

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?

Provides explicit prerequisites (OFF_USER_ID/OFF_PASSWORD), guidance on image quality and type prioritization, instruction on selecting the appropriate imagefield, and handling of auto-selection and error responses. This covers when and how to use the tool comprehensively.

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/domdomegg/openfoodfacts-mcp'

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