Skip to main content
Glama

add_income_from_csv

Use this to import the user's CSV/TSV/text income export (max 500 KB). Step 1 stages a duplicate-checked previewId without writing Income rows. Show it and obtain approval. Step 2 uses confirm:true and that previewId to write the approved rows/edits; duplicates require explicit keep approval. Unknown or expired previews never write (15-minute expiry). Return spreadsheetUrl and reviewIncomeUrl after success. Accepts user-provided attachments or inline text, not arbitrary web URLs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNoOptional client/project tag for staged or confirmed rows.
confirmNoStep 2: true writes the staged selection only after user approval.
csvTextNoStep 1 inline CSV/TSV/text fallback; ChatGPT should use csvContent.
bulkNoteNoStep 2 note prepended to confirmed rows (max 120 characters).
rowEditsNoStep 2 approved edits; at most 50 selected preview rows.
previewIdNoStep 2 ID returned by the unexpired preview.
csvContentNoStep 1 ChatGPT attachment; securely downloaded and decoded.
paymentMethodNoFallback payment rail only when absent from the parsed row.
keepBothIndexesNoStep 2 duplicate indexes the user explicitly approved keeping.
selectedIndexesNoStep 2 preview row indexes to write; omit for all staged rows.

Output Schema

TableJSON 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. Changed15 schema fields changed
    • changedInput schema / properties / bulkNote / description
      Previous value: -"Step 2 only: one note (max 120 chars) prepended to every confirmed row's Notes, same as the app's 'Add note to all entries'."New value: +"Step 2 note prepended to confirmed rows (max 120 characters)."
    • changedInput schema / properties / confirm / description
      Previous value: -"Step 2 only: true writes the staged rows. Omit it (with previewId absent) to parse and preview without writing."New value: +"Step 2: true writes the staged selection only after user approval."
    • changedInput schema / properties / csvContent / description
      Previous value: -"Attached CSV/TSV/text file supplied by ChatGPT for step 1. The server downloads and decodes the attachment securely."New value: +"Step 1 ChatGPT attachment; securely downloaded and decoded."
    • changedInput schema / properties / csvText / description
      Previous value: -"Legacy fallback for MCP clients that send raw CSV/TSV/text content inline. ChatGPT should use csvContent."New value: +"Step 1 inline CSV/TSV/text fallback; ChatGPT should use csvContent."
    • changedInput schema / properties / keepBothIndexes / description
      Previous value: -"Step 2 only: preview indexes of duplicate-flagged rows the user explicitly wants to keep anyway (the app's 'Keep Both')."New value: +"Step 2 duplicate indexes the user explicitly approved keeping."
    • changedInput schema / properties / paymentMethod / description
      Previous value: -"Fallback payment rail for rows where the parser found none (Cash, Check, Bank transfer, Wallet app, Credit/Debit card, Payment processor, or Other)."New value: +"Fallback payment rail only when absent from the parsed row."
    • changedInput schema / properties / previewId / description
      Previous value: -"Step 2 only: the previewId returned by the step-1 call."New value: +"Step 2 ID returned by the unexpired preview."
    • 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 approved edits; at most 50 selected preview rows."
    • changedInput schema / properties / rowEdits / items / properties / fields / additionalProperties
      Previous value: -trueNew value: +false
    • 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 approved replacements on this staged row."
    • addedInput schema / properties / rowEdits / items / properties / fields / properties
      Added value: +{
      +  "amount": {
      +    "description": "Non-zero income amount.",
      +    "type": [
      +      "number",
      +      "string",
      +      "boolean"
      +    ]
      +  },
      +  "category": {
      +    "description": "Income category.",
      +    "type": [
      +      "string",
      +      "number",
      +      "boolean",
      +      "null"
      +    ]
      +  },
      +  "currency": {
      +    "description": "Currency code.",
      +    "type": [
      +      "string",
      +      "number",
      +      "boolean",
      +      "null"
      +    ]
      +  },
      +  "date": {
      +    "description": "ISO YYYY-MM-DD calendar date.",
      +    "type": "string"
      +  },
      +  "description": {
      +    "description": "Income description.",
      +    "type": [
      +      "string",
      +      "number",
      +      "boolean",
      +      "null"
      +    ]
      +  },
      +  "fees": {
      +    "description": "Non-negative platform fees.",
      +    "type": [
      +      "number",
      +      "string",
      +      "boolean",
      +      "null"
      +    ]
      +  },
      +  "notes": {
      +    "description": "Income notes.",
      +    "type": [
      +      "string",
      +      "number",
      +      "boolean",
      +      "null"
      +    ]
      +  },
      +  "paymentMethod": {
      +    "description": "Payment rail.",
      +    "type": [
      +      "string",
      +      "number",
      +      "boolean",
      +      "null"
      +    ]
      +  },
      +  "reference": {
      +    "description": "Income reference.",
      +    "type": [
      +      "string",
      +      "number",
      +      "boolean",
      +      "null"
      +    ]
      +  },
      +  "source": {
      +    "description": "Income source label.",
      +    "type": [
      +      "string",
      +      "number",
      +      "boolean"
      +    ]
      +  },
      +  "tag": {
      +    "description": "Client/project tag.",
      +    "type": [
      +      "string",
      +      "number",
      +      "boolean",
      +      "null"
      +    ]
      +  },
      +  "taxCollected": {
      +    "description": "Non-negative collected tax.",
      +    "type": [
      +      "number",
      +      "string",
      +      "boolean",
      +      "null"
      +    ]
      +  }
      +}
    • addedInput schema / properties / rowEdits / items / properties / index / minimum
      Added value: +0
    • addedInput schema / properties / rowEdits / maxItems
      Added value: +50
    • changedInput schema / properties / selectedIndexes / description
      Previous value: -"Step 2 only: preview row indexes to write. Omit to write all staged rows."New value: +"Step 2 preview row indexes to write; omit for all staged rows."
    • changedInput schema / properties / tag / description
      Previous value: -"Optional client/project tag. In step 1 it pre-fills the staged rows; in step 2 it applies to the confirmed selection."New value: +"Optional client/project tag for staged or confirmed rows."
  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 / csvContent / description
      Previous value: -"Raw CSV/TSV/text content (step 1). On ChatGPT you may pass the attached file reference object directly; the server fetches and decodes the bytes."New value: +"Attached CSV/TSV/text file supplied by ChatGPT for step 1. The server downloads and decodes the attachment securely."
    • addedInput schema / properties / csvContent / 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 / csvContent / required
      Added value: +[
      +  "download_url",
      +  "file_id"
      +]
    • changedInput schema / properties / csvContent / type
      Previous value: -"string"New value: +"object"
    • addedInput schema / properties / csvText
      Added value: +{
      +  "description": "Legacy fallback for MCP clients that send raw CSV/TSV/text content inline. ChatGPT should use csvContent.",
      +  "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.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that Step 1 writes nothing, that duplicates require explicit keep approval, that unknown/expired previews never write (15-minute expiry), and which URLs are returned. These are the safety-critical behaviors an agent needs before invoking a write path.

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-loads the purpose and the size limit, then walks the two steps in order, and every sentence carries operational content. It is dense and the long sentences could be split, but nothing is wasted for a tool of this complexity.

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 ten parameters, nested objects, and an output schema, the description covers the full call lifecycle: input sources, the staged-then-confirmed flow, duplicate handling, expiry, and the returned URLs. Nothing an agent needs to call it 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 cross-parameter semantics the schema alone lacks: confirm:true must be paired with the previewId from Step 1, and rowEdits/keepBothIndexes operate on staged rows. This meaningfully clarifies how the parameters interact across the two calls.

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 the user's CSV/TSV/text income export') and bounds the input with a size limit (max 500 KB). The CSV-import scope clearly separates it from add_income and add_income_from_file, so an agent can distinguish it 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 Guidelines4/5

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

It lays out a concrete two-step workflow (Step 1 stage preview, Step 2 confirm) and states an explicit exclusion: accepts user-provided attachments or inline text, not arbitrary web URLs. It never names a sibling alternative such as add_income_from_file, so the routing guidance is strong but not fully comparative.

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.