Skip to main content
Glama

add_income_from_file

Import income from an attached screenshot, image (JPEG, PNG, WebP, HEIC/HEIF) or PDF (payment screenshots, wallet apps, payout or bank statements; max 10 MB). Two steps. STEP 1: call with the file and WITHOUT confirm. ExpenseBot parses it with the same importer as the app's Add Income screen, checks every row against the Income tab for duplicates, and returns a preview with previewId, exact row count, totals by currency, per-row details, duplicate flags and rejected rows. NOTHING is saved in step 1; the attachment is consent to parse, not to write. Show the parsed rows and duplicates, then STEP 2: call again with confirm: true and the previewId to write exactly those rows, including only user-approved changes (selectedIndexes, keepBothIndexes, rowEdits, tag, bulkNote). Flagged duplicates are skipped unless the user explicitly asks to keep them (keepBothIndexes). The preview expires after 15 minutes; an expired or unknown previewId never writes. After a successful confirm, show the returned spreadsheetUrl and reviewIncomeUrl. For visually complex reviews (mixed income/expense rows, many edits), send the user to the Add Income app link from get_spreadsheet_url.

Input Schema

NameRequiredDescriptionDefault
tagNoOptional client/project tag. In step 1 it pre-fills the staged rows; in step 2 it applies to the confirmed selection.
photoNoAttached image or PDF supplied by ChatGPT for step 1. The server downloads and parses the attachment securely.
confirmNoStep 2 only: true writes the staged rows. Omit it (with previewId absent) to parse and preview without writing.
bulkNoteNoStep 2 only: one note (max 120 chars) prepended to every confirmed row's Notes, same as the app's 'Add note to all entries'.
mimeTypeNoMIME type of the file (default: image/jpeg)
rowEditsNoStep 2 only: user-approved corrections, at most 50 rows (fields: date ISO YYYY-MM-DD, source, amount, currency, category, paymentMethod, description, notes, reference, fees, taxCollected, tag).
previewIdNoStep 2 only: the previewId returned by the step-1 call.
photoBase64NoLegacy fallback for MCP clients that send complete image/PDF bytes as base64. ChatGPT should use photo.
paymentMethodNoFallback payment rail for rows where the parser found none (Cash, Check, Bank transfer, Wallet app, Credit/Debit card, Payment processor, or Other).
keepBothIndexesNoStep 2 only: preview indexes of duplicate-flagged rows the user explicitly wants to keep anyway (the app's 'Keep Both').
selectedIndexesNoStep 2 only: preview row indexes to write. Omit to write all staged rows.

Output Schema

NameRequiredDescriptionDefault
totalNo
failedNo
dedupedNo
entriesNo
messageYes
previewNo
successYes
writtenNo
warningsNo
confirmedNo
expiresAtNo
previewIdNo
duplicatesNo
entryCountNo
finalAnswerNo
unattemptedNo
rejectedRowsNo
duplicateCountNo
maxChatEntriesNo
refundRowCountNo
spreadsheetUrlNo
reviewImportUrlNo
reviewIncomeUrlNo
tooLargeForChatNo
expiresInMinutesNo
idempotentReplayNo
responseGuidanceNo
totalsByCurrencyNo
projectionTruncatedNo
confirmationContractNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / rowEdits / description
      Previous value: -"Step 2 only: user-approved corrections, at most 50 rows. Fields: date (ISO YYYY-MM-DD), source, amount, currency, category, paymentMethod, description, notes, reference, fees, taxCollected, tag."New value: +"Step 2 only: user-approved corrections, at most 50 rows (fields: date ISO YYYY-MM-DD, source, amount, currency, category, paymentMethod, description, notes, reference, fees, taxCollected, tag)."
    • changedInput schema / properties / rowEdits / items / properties / fields / description
      Previous value: -"Only the user-approved income fields to replace on this staged row: date, source, amount, currency, category, paymentMethod, description, notes, reference, fees, taxCollected, or tag."New value: +"Only the user-approved fields to replace on this staged row (same field names as rowEdits)."
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "allOf": [
      +    {
      +      "if": {
      +        "properties": {
      +          "preview": {
      +            "const": true
      +          }
      +        },
      +        "required": [
      +          "preview"
      +        ]
      +      },
      +      "then": {
      +        "required": [
      +          "previewId",
      +          "expiresAt",
      +          "entryCount",
      +          "entries",
      +          "confirmationContract"
      +        ]
      +      }
      +    },
      +    {
      +      "if": {
      +        "properties": {
      +          "confirmed": {
      +            "const": true
      +          }
      +        },
      +        "required": [
      +          "confirmed"
      +        ]
      +      },
      +      "then": {
      +        "required": [
      +          "previewId",
      +          "written",
      +          "deduped",
      +          "failed",
      +          "unattempted",
      +          "total"
      +        ]
      +      }
      +    }
      +  ],
      +  "properties": {
      +    "confirmationContract": {
      +      "type": "string"
      +    },
      +    "confirmed": {
      +      "type": "boolean"
      +    },
      +    "deduped": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "duplicateCount": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "duplicates": {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "entries": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "amount": {
      +            "type": "number"
      +          },
      +          "currency": {
      +            "type": "string"
      +          },
      +          "date": {
      +            "format": "date",
      +            "type": "string"
      +          },
      +          "duplicate": {
      +            "type": "boolean"
      +          },
      +          "index": {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "payer": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "entryCount": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "expiresAt": {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "expiresInMinutes": {
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "failed": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "finalAnswer": {
      +      "type": "string"
      +    },
      +    "idempotentReplay": {
      +      "type": "boolean"
      +    },
      +    "maxChatEntries": {
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "preview": {
      +      "type": "boolean"
      +    },
      +    "previewId": {
      +      "type": "string"
      +    },
      +    "projectionTruncated": {
      +      "type": "boolean"
      +    },
      +    "refundRowCount": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "rejectedRows": {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "responseGuidance": {
      +      "type": "string"
      +    },
      +    "reviewImportUrl": {
      +      "type": "string"
      +    },
      +    "reviewIncomeUrl": {
      +      "type": "string"
      +    },
      +    "spreadsheetUrl": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "success": {
      +      "type": "boolean"
      +    },
      +    "tooLargeForChat": {
      +      "type": "boolean"
      +    },
      +    "total": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "totalsByCurrency": {
      +      "additionalProperties": {
      +        "type": "number"
      +      },
      +      "type": "object"
      +    },
      +    "unattempted": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "warnings": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "written": {
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "success",
      +    "message"
      +  ],
      +  "type": "object"
      +}
  3. 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
  4. Changed6 schema fields changed
    • changedInput schema / properties / photo / description
      Previous value: -"Base64-encoded image/PDF bytes (step 1). On ChatGPT you may pass the attached file reference object directly; the server fetches the bytes."New value: +"Attached image or PDF supplied by ChatGPT for step 1. The server downloads and parses the attachment securely."
    • 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 complete image/PDF bytes as base64. ChatGPT should use photo.",
      +  "type": "string"
      +}
    • addedInput schema / properties / rowEdits / items / properties / fields / description
      Added value: +"Only the user-approved income fields to replace on this staged row: date, source, amount, currency, category, paymentMethod, description, notes, reference, fees, taxCollected, or tag."
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare non-read-only but non-destructive; the description supplies the missing operational detail: nothing is written in step 1, the attachment is consent to parse only, previews expire after 15 minutes, and an expired or unknown previewId never writes. These are non-obvious safety behaviors that go well beyond the annotation flags.

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 resource and format list, then cleanly chunked into STEP 1 and STEP 2 with a closing fallback route. It is long for a single tool description, but nearly every clause carries actionable information; only the format enumeration in the first sentence borders on excess.

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 an 11-parameter, nested-object, two-phase mutation tool, the description covers the workflow, the write-safety boundary, expiry, duplicate handling, and post-confirm next steps (spreadsheetUrl, reviewIncomeUrl). With annotations and an output schema present, nothing an agent needs in order to call this correctly is missing.

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, but the description adds sequencing semantics the schema only implies: which parameters belong to step 2, that selectedIndexes/keepBothIndexes/rowEdits/bulkNote compose into 'only user-approved changes,' and that previewId ties step 2 back to step 1. Remaining duplication of per-field descriptions keeps it from a 5.

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?

States a specific verb and resource (import income from an attached screenshot/image/PDF), enumerates supported formats and size limit, and implicitly separates itself from add_income and add_income_from_csv by naming the file-based, two-step parse-then-confirm model. An agent can identify the tool and its scope without opening the schema.

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?

Gives an explicit two-step protocol (call without confirm, then call with confirm:true and previewId), states which step accepts which arguments, and routes visually complex reviews to the Add Income app link from get_spreadsheet_url. It also specifies the duplicate policy (skipped unless keepBothIndexes) so the agent knows the default behavior.

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.