Skip to main content
Glama

KcalSnap

Estimate calories and macros from a food photo

analyze_food
Idempotent

Uses one prepaid credit with a Bearer API key, or costs 0.01 USDC per successful analysis on Base. Buy card credits at https://kcalsnap.com/developers/credits/. Submit JPEG, PNG, or static WebP base64 (2 MB, max 2048px per side; optional data URL prefix is accepted). Returns foods, estimated grams, kcal, protein, carbs, fat and USDA/AI provenance. x402 payment goes in params._meta["x402/payment"]. Keep the same idempotency_key and payment on retry. Images go to our model provider; KcalSnap stores result text for 24 hours. Portion estimates are uncertain.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "image_base64": "<image_base64>",
      "mime_type": "<mime_type>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "analyze_food"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoOptional meal context that a photo cannot show, such as cooking oil, milk type, sauces, preparation method, or hidden ingredients (up to 280 Unicode characters). Only pass real user-provided details; never invent context.
languageNoen
mime_typeYes
image_base64Yes
idempotency_keyYes
known_total_gramsNoOptional measured weight of all edible food detected in the image, excluding the plate and inedible parts. At most two decimals. Component proportions remain photo estimates. Omit if only part of the meal was weighed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (which only say mutation, open-world, idempotent, non-destructive), it discloses pricing (one prepaid credit or 0.01 USDC per successful analysis on Base), where the x402 payment must be placed, that only successful analyses are charged, the exact retry contract for idempotency_key, and the data-handling posture (images sent to a model provider, result text retained 24 hours). It also sets an honest accuracy expectation about portion estimates. This is exactly the behavioral context annotations cannot carry, and nothing contradicts them.

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?

Six dense sentences with essentially no filler — payment, input limits, return fields, retry rule, privacy, and accuracy warning each carry unique information. The ordering is the weak point: it leads with billing mechanics instead of what the tool does, so an agent scanning the first sentence learns the cost before the purpose.

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?

For a paid, external, image-processing tool with no output schema, the definition covers inputs, pricing and payment placement, retry/idempotency behavior, return fields, privacy and retention, and accuracy limits. The remaining gaps (error responses, what happens when no food is detected) are minor relative to how much a caller needs before invoking it correctly.

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?

With only 33% schema coverage, the description compensates well: it supplies the image format list, the 2 MB size cap, the 2048px-per-side limit and tolerance of a data URL prefix, all of which are absent from the schema for image_base64. Most importantly it reveals that the x402 payment object belongs in params._meta["x402/payment"], a parameter location the schema does not document at all. `language` and the exact charge trigger are not elaborated, keeping it short of a 5.

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 names the concrete resource (base64 JPEG/PNG/WebP food photo) and enumerates the return payload (foods, grams, kcal, protein, carbs, fat, USDA/AI provenance), which together make clear it estimates nutrition from an image. The verb itself is never stated and the opening sentence is about billing rather than purpose, so the agent must assemble the purpose from the later sentences plus the title. It is unambiguous once read, but not front-loaded.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Operational when-to guidance is present: pass real user-provided context in `note`, omit `known_total_grams` when only part of the meal was weighed, and reuse the same idempotency_key and payment on retry. What is missing is routing guidance against alternatives — the sibling check_balance is never referenced, and there is no statement of when NOT to use this tool (e.g. non-food images).

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.