update_revenue_status
Modify the status of revenue entries to track progress through stages like pending, submitted, approved, paid, or rejected.
Instructions
Update status of a revenue entry (e.g. pending → submitted → paid)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Entry ID | |
| status | Yes | ||
| notes | No | Update notes |
Implementation Reference
- src/index.ts:422-434 (handler)The tool handler logic for 'update_revenue_status', which updates the status and notes of a revenue entry in the database.
case "update_revenue_status": { const db = loadDB(); const entry = db.entries.find((e) => e.id === (args as any).id); if (!entry) return { content: [{ type: "text", text: `Entry not found: ${(args as any).id}` }] }; const oldStatus = entry.status; entry.status = (args as any).status; if ((args as any).notes) entry.notes = (entry.notes || "") + `\n[${new Date().toISOString()}] ${(args as any).notes}`; if (entry.status === "paid") entry.paid_at = new Date().toISOString(); saveDB(db); return { content: [{ type: "text", text: `Updated: ${entry.id} — ${oldStatus} → ${entry.status}\n${entry.description}` }], }; } - src/index.ts:282-294 (schema)The tool definition and input schema for 'update_revenue_status'.
{ name: "update_revenue_status", description: "Update status of a revenue entry (e.g. pending → submitted → paid)", inputSchema: { type: "object" as const, required: ["id", "status"], properties: { id: { type: "string", description: "Entry ID" }, status: { type: "string", enum: ["pending", "submitted", "approved", "paid", "rejected"] }, notes: { type: "string", description: "Update notes" }, }, }, },