finance_expense_log
Log and categorize financial expenses with description, amount, currency, and category for organized tracking.
Instructions
Create a formatted expense entry for tracking
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | Expense description | |
| amount | Yes | Expense amount | |
| currency | No | Currency | USD |
| category | No | other |
Implementation Reference
- src/modules/finance.ts:47-56 (handler)The implementation of the 'finance_expense_log' tool, which takes expense details and returns a formatted markdown string for logging.
server.tool("finance_expense_log", "Create a formatted expense entry for tracking", { description: z.string().describe("Expense description"), amount: z.number().describe("Expense amount"), currency: z.string().default("USD").describe("Currency"), category: z.enum(["food", "transport", "housing", "tools", "subscriptions", "marketing", "other"]).default("other") }, async ({ description, amount, currency, category }) => { const date = new Date().toISOString().split("T")[0]; const entry = `${date} | ${category.toUpperCase()} | ${description} | ${formatCurrency(amount, currency)}`; return { content: [{ type: "text", text: `**Expense Logged**\n\n\`${entry}\`\n\nAppend to your expense tracking file or spreadsheet.` }] }; });