Skip to main content
Glama
Personal Expense Categorizer

Personal Expense Categorizer

by alihabbache

export_categorized_csv

Destructive

Export categorized bank transactions to a new CSV file with date, merchant, amount, and category columns. Refuse unsafe overwrites to protect existing files.

Instructions

Write the categorized transactions to a new CSV file (id,date,description,merchant,amount,category,kind,source). Refuses to overwrite an existing file unless overwrite is true, and even then only replaces files this tool previously exported. Ask the user before setting overwrite.

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": {
      "file_path": "<file_path>",
      "output_path": "<output_path>"
    },
    "name": "export_categorized_csv"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_pathYesAbsolute path to the bank-export CSV on this machine.
overwriteNoReplace output_path if it is an earlier export from this tool (default false).
column_mapNoExact header names, only needed when auto-detection fails.
date_formatNoOrder of numeric dates such as 03/04/2025. Default auto-detects.
output_pathYesAbsolute path for the new .csv file.
amount_conventionNoSign convention for a single Amount column. Default auto-detects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Annotations only say destructiveHint=true and readOnlyHint=false; the description adds the crucial nuance that destruction is scoped to this tool's own earlier exports, that a new file is created otherwise, and that user confirmation is required for overwrite. That is real behavior beyond what the structured fields convey.

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

Conciseness5/5

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

Two sentences, front-loaded with the action and output shape, followed by the safety constraint and the escalation instruction. Nothing is repeated and nothing is wasted.

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

Completeness3/5

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

With no output schema, the column list is a welcome substitute, and the overwrite guard is well covered. However, it never resolves whether this tool applies category rules itself or requires categorizing first — a sequencing ambiguity that matters given the raw bank-export input and the sibling categorize_transactions.

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 description coverage is 100%, so file_path, output_path, overwrite, column_map, date_format and amount_convention are already fully documented, including enum values. The description reinforces overwrite's semantics but adds no detail on the nested column_map or the auto-detection fallbacks — baseline 3.

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?

States a specific verb and resource — 'Write the categorized transactions to a new CSV file' — and even enumerates the exact output columns (id,date,description,merchant,amount,category,kind,source). The scope is unmistakable, but no sibling tool is named to explicitly contrast it with categorize_transactions or summarize_spending.

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?

Gives concrete conditional guidance for the risky path: it refuses to overwrite unless overwrite is true, only replaces its own prior exports, and explicitly tells the agent to ask the user before setting overwrite. What's missing is sequencing guidance — nothing says whether categorization must happen first or whether this tool does it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.