Skip to main content
Glama

Turn a photo into a table

photo_to_sheet

Use this when the user has a photo of a receipt, a notebook page, a shop shelf, a chat screenshot with orders, a timesheet or a printed log and wants it as a table or spreadsheet. Pass the attached photo as file, or image_url (a public https link), or image_base64; add hint when the user says which columns they want. Returns the rows and columns in the page's own language with numbers written plainly, the totals on the page, the cells hard to read, sum checks (quantity x price, column total, tax, row totals) that flag a wrong sum, CSV text, and links to a printable page and CSV file kept for 24 hours. It copies what is visible and never invents values. Not for photos of people. For a product photo meant for a listing, use describe_product_photo.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "image_base64": "/9j/4AAQSkZJRgAB"
    },
    "name": "photo_to_sheet"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoThe photo the user attached in the chat.
hintNoOptional: what the content is or which columns the person wants, for example 'stock count, item and quantity only'.
image_urlNoA public https link to one JPEG, PNG, WebP or HEIC image, up to 8 MB.
image_base64NoThe image bytes as base64 (a data: URL is accepted), up to 8 MB.

Output Schema

NameRequiredDescriptionDefault
csvYes
kindYes
rowsYes
linksYes
notesYes
titleYes
checksYes
noticeYes
sourceYes
statusYes
totalsYes
columnsYes
messageYes
unclearYes
currencyYes
transcriptYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations by describing the return payload (rows/columns in the page's own language, plain numbers, page totals, unreadable cells, sum checks that flag wrong sums, CSV text) and disclosing a retention window of 24 hours for the printable page and CSV file. The 'copies what is visible and never invents values' guarantee is useful behavioral context. Minor gap: it does not say what happens when an image is unreadable in whole or which of file/image_url/image_base64 wins if several are supplied, though the annotations already cover the open-world, non-idempotent write profile.

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?

Front-loaded with the triggering situation, then inputs, then outputs, then exclusions - a sensible order with almost no filler. It is a single dense block, so the boundary sentence ('Not for photos of people') and the return-value inventory would scan better separated, but every sentence carries information.

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 4-parameter, zero-required, open-world extraction tool with a nested file object, the definition covers triggering conditions, input selection, expected outputs, a no-hallucination guarantee, artifact retention, and sibling routing. An output schema exists, yet the description still tells the agent the shape of the answer well enough to set user expectations, with no meaningful omissions.

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%, so the baseline is 3; the description lifts this by stating that the three image inputs are alternatives ('pass ... as file, or image_url ..., or image_base64'), a relationship the flat schema does not express, and by clarifying that hint is optional and column-oriented. It does not add size/format limits beyond what the schema already states.

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 names a specific transformation (photo -> table/spreadsheet) and enumerates the exact source materials it handles: receipts, notebook pages, shop shelves, chat screenshots with orders, timesheets, printed logs. It also draws a hard boundary against 'photos of people' and routes product-listing photos to describe_product_photo, so an agent can separate it from text_to_sheet and voice_to_sheet by input modality alone.

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?

Explicit when-to-use ('the user has a photo of ... and wants it as a table'), explicit when-not ('Not for photos of people'), and an explicit alternative ('For a product photo meant for a listing, use describe_product_photo'). The hint parameter is also tied to a concrete trigger phrase ('when the user says which columns they want').

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.