Skip to main content
Glama

submit_receipt

Process receipt images/PDFs, including 'log this', 'save this receipt', 'expense this', 'add this to my expenses' or a shared receipt/invoice photo. Starts on call (no server preview); AI extracts vendor, amount, date, tax and category (usually 1–3 minutes; longer for PDFs/batches); poll get_last_receipt_result with the returned submissionId. Mixed images/PDFs work. Required for PDFs; use this flow for large files/batches: call filesToUpload for EVERY file; PUT each ONE AT A TIME to signed URLs, report file/count progress, then call ONCE with all uploadRefs as one batch, never once per file. photo accepts one ChatGPT image/PDF; photoBase64 only for one small image without file references. note maps to Notes L, tag to Tag K; batch defaults apply to all files and uploadRefs items may override.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "submit_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNoBatch-level project or client tag for every row; a file may override it. Stored in the Tag column (K).
noteNoBatch-level note for every file; a file may override it. Stored in the Notes column (L).
photoNoSingle attached receipt image or PDF supplied by ChatGPT. For multiple files or large files, use filesToUpload and uploadRefs instead.
filenameNoOptional filename (e.g., 'lunch_receipt.jpg')
mimeTypeNoMIME type of the file (default: image/jpeg)
uploadRefNoSingle-file shorthand for uploadRefs. Use uploadRefs when there is more than one file.
uploadRefsNoEvery uploadRef from the filesToUpload step, as ONE batch. If any file fails validation nothing is processed.
photoBase64NoLegacy fallback for MCP clients that send one small image as complete base64 data. ChatGPT should use photo or uploadRefs instead.
filesToUploadNoEvery file the user provided, in one call. Returns signedUrl + uploadRef per file; upload each, then call with uploadRefs.

Output Schema

NameRequiredDescriptionDefault
dataNo
filesNo
statusNo
messageNo
successYes
fileCountNo
statusCodeNo
submissionIdNo
spreadsheetUrlNo
reviewExpensesUrlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / filesToUpload / description
      Previous value: -"Request upload URLs for every file the user provided, in one call. Returns a signedUrl + uploadRef per file; upload each, then call again with uploadRefs."New value: +"Every file the user provided, in one call. Returns signedUrl + uploadRef per file; upload each, then call with uploadRefs."
    • changedInput schema / properties / uploadRefs / description
      Previous value: -"Submit previously uploaded files as ONE batch: every uploadRef from the filesToUpload step. If any file fails validation the whole batch is rejected and nothing is processed."New value: +"Every uploadRef from the filesToUpload step, as ONE batch. If any file fails validation nothing is processed."
  2. Changed4 schema fields changed
    • changedInput schema / properties / photo / properties / download_url / description
      Previous value: -"Temporary HTTPS URL supplied by ChatGPT for downloading the attachment."New value: +"ChatGPT temporary HTTPS attachment URL."
    • changedInput schema / properties / photo / properties / file_id / description
      Previous value: -"Attachment identifier supplied by ChatGPT."New value: +"ChatGPT attachment ID."
    • changedInput schema / properties / photo / properties / file_name / description
      Previous value: -"Original attachment filename supplied by ChatGPT."New value: +"ChatGPT attachment filename."
    • changedInput schema / properties / photo / properties / mime_type / description
      Previous value: -"Attachment MIME type supplied by ChatGPT."New value: +"ChatGPT attachment MIME type."
  3. Changed6 schema fields changed
    • changedInput schema / properties / filesToUpload / description
      Previous value: -"Request upload URLs for one or more files. Include EVERY file the user provided in a single call. Returns one signedUrl + uploadRef per file; upload each, then call this tool again with uploadRefs."New value: +"Request upload URLs for every file the user provided, in one call. Returns a signedUrl + uploadRef per file; upload each, then call again with uploadRefs."
    • changedInput schema / properties / filesToUpload / items / properties / mimeType / description
      Previous value: -"MIME type. Must match the Content-Type header used in the PUT exactly. The real format is re-detected from the file's contents on submit, so a close guess still works."New value: +"MIME type; must match the PUT Content-Type exactly. The real format is re-detected from the contents."
    • changedInput schema / properties / note / description
      Previous value: -"Batch-level context note applied to every file in the upload. Individual files may override this with their own note. Stored through the existing receipt-note pipeline in the Notes column (L)."New value: +"Batch-level note for every file; a file may override it. Stored in the Notes column (L)."
    • changedInput schema / properties / tag / description
      Previous value: -"Batch-level project or client tag applied to every expense row. Individual files may override it. Stored in the Tag column (K) through the same path as the web receipt uploader."New value: +"Batch-level project or client tag for every row; a file may override it. Stored in the Tag column (K)."
    • changedInput schema / properties / uploadRefs / description
      Previous value: -"Submit previously uploaded files as ONE batch. Include every uploadRef from the filesToUpload step. If any file fails validation the whole batch is rejected and nothing is processed."New value: +"Submit previously uploaded files as ONE batch: every uploadRef from the filesToUpload step. If any file fails validation the whole batch is rejected and nothing is processed."
    • changedInput schema / properties / uploadRefs / items / properties / note / description
      Previous value: -"Context note for this specific file. Overrides the batch-level note if both are provided. Uses the existing receipt-note pipeline and is stored in the Notes column (L)."New value: +"Note for this file; overrides the batch note. Stored in the Notes column (L)."
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "allOf": [
      +    {
      +      "if": {
      +        "properties": {
      +          "status": {
      +            "const": "upload_required"
      +          }
      +        },
      +        "required": [
      +          "status"
      +        ]
      +      },
      +      "then": {
      +        "required": [
      +          "data"
      +        ]
      +      }
      +    }
      +  ],
      +  "properties": {
      +    "data": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "expiresInSeconds": {
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "files": {
      +          "items": {
      +            "additionalProperties": true,
      +            "properties": {
      +              "filename": {
      +                "type": "string"
      +              },
      +              "id": {
      +                "type": "string"
      +              },
      +              "mimeType": {
      +                "type": "string"
      +              },
      +              "requiredHeaders": {
      +                "additionalProperties": {
      +                  "type": "string"
      +                },
      +                "type": "object"
      +              },
      +              "signedUrl": {
      +                "type": "string"
      +              },
      +              "uploadRef": {
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "requiredHeaders": {
      +          "additionalProperties": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        "reviewExpensesUrl": {
      +          "type": "string"
      +        },
      +        "signedUrl": {
      +          "type": "string"
      +        },
      +        "spreadsheetUrl": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "submissionId": {
      +          "type": "string"
      +        },
      +        "uploadRef": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "fileCount": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "files": {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "reviewExpensesUrl": {
      +      "type": "string"
      +    },
      +    "spreadsheetUrl": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "statusCode": {
      +      "type": "integer"
      +    },
      +    "submissionId": {
      +      "type": "string"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  5. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "description": "Standard ExpenseBot tool result envelope. `message` is the human-readable summary the AI cites; `data` is the structured payload (totals, breakdowns, ids, etc.). On failure, `success` is false and `error` carries a code/message/hint triple.",
      -  "properties": {
      -    "data": {
      -      "additionalProperties": true,
      -      "description": "Structured payload. Shape varies per tool — common keys: total, breakdown, comparison, sampleMeta, ids, expenseId, reportId, signupUrl, results.",
      -      "type": "object"
      -    },
      -    "error": {
      -      "additionalProperties": true,
      -      "description": "Present only when success === false.",
      -      "properties": {
      -        "code": {
      -          "type": "string"
      -        },
      -        "hint": {
      -          "type": "string"
      -        },
      -        "message": {
      -          "type": "string"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "message": {
      -      "description": "Human-readable result text. Always present on success; prefer rendering this verbatim before any further reasoning.",
      -      "type": "string"
      -    },
      -    "sampleMeta": {
      -      "additionalProperties": true,
      -      "description": "Set when the underlying dataset was truncated. isTruncated=true means the agent saw a sample of `sampleCount` of `totalCount` rows; aggregate totals are still accurate.",
      -      "properties": {
      -        "isTruncated": {
      -          "type": "boolean"
      -        },
      -        "sampleCount": {
      -          "type": "integer"
      -        },
      -        "totalCount": {
      -          "type": "integer"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "success": {
      -      "description": "False on tool errors; check before reading `data`.",
      -      "type": "boolean"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  6. Changed5 schema fields changed
    • changedInput schema / properties / photo / description
      Previous value: -"Base64-encoded image or PDF data (JPEG, PNG, HEIC, WebP, or PDF). Max 15MB. Only for small images — large payloads get truncated or dropped in transit; use uploadRef instead."New value: +"Single attached receipt image or PDF supplied by ChatGPT. For multiple files or large files, use filesToUpload and uploadRefs instead."
    • addedInput schema / properties / photo / properties
      Added value: +{
      +  "download_url": {
      +    "description": "Temporary HTTPS URL supplied by ChatGPT for downloading the attachment.",
      +    "format": "uri",
      +    "type": "string"
      +  },
      +  "file_id": {
      +    "description": "Attachment identifier supplied by ChatGPT.",
      +    "type": "string"
      +  },
      +  "file_name": {
      +    "description": "Original attachment filename supplied by ChatGPT.",
      +    "type": "string"
      +  },
      +  "mime_type": {
      +    "description": "Attachment MIME type supplied by ChatGPT.",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / photo / required
      Added value: +[
      +  "download_url",
      +  "file_id"
      +]
    • changedInput schema / properties / photo / type
      Previous value: -"string"New value: +"object"
    • addedInput schema / properties / photoBase64
      Added value: +{
      +  "description": "Legacy fallback for MCP clients that send one small image as complete base64 data. ChatGPT should use photo or uploadRefs instead.",
      +  "type": "string"
      +}
  7. First observed

TDQS

A4/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true), the description discloses behavior an agent could not otherwise infer: processing starts on call with no server preview, the extraction takes 1-3 minutes (longer for PDFs/batches), and results must be polled via get_last_receipt_result with the returned submissionId. It also states batch atomicity ('if any file fails validation nothing is processed') and rejects per-file submission.

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

Conciseness3/5

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

Almost every clause carries information, but it is delivered as one long run-on paragraph dense with parentheticals and semicolon-chained asides. Front-loading is good (the core action and resource come first), yet the workflow and parameter-routing instructions would be far more scannable as separate sentences or a numbered sequence.

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

Completeness4/5

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

For a 9-parameter, nested-schema, asynchronous tool with an output schema, the description covers the essential callers' needs: which parameter to use for which file shape, that the call is asynchronous, and how to retrieve results. It does not say what the polling result contains or what a partial/failed extraction looks like, which is left to the output schema and get_last_receipt_result.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents every parameter, including the tag/note batch-override relationship and the photo versus uploadRefs split. The description's added value, such as 'note maps to Notes L, tag to Tag K', largely restates what the nested properties already say. Baseline 3 applies since the schema does the heavy lifting.

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 gives a specific verb and resource: it processes receipt images/PDFs and extracts vendor, amount, date, tax and category. It also lists concrete user phrasings ('log this', 'expense this') that map to the tool. It does not name the closest siblings (add_cash_expense, parse_expense), so differentiation is inferred rather than stated.

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?

Strong when-to-use guidance: 'Required for PDFs', 'use this flow for large files/batches', and explicit parameter routing (photo for one ChatGPT image/PDF, photoBase64 only for one small image without file references). It also prescribes the upload cadence ('ONE AT A TIME') and forbids per-file invocation. The gap is that it never contrasts with manual-entry or parse-based siblings.

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.