add_revenue_entry
Add a new revenue opportunity to track bounties, grants, product sales, freelance gigs, or crypto earnings with details like amount, status, and deadlines.
Instructions
Track a new revenue opportunity (bounty, grant, product sale, freelance gig)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Revenue source type | |
| description | Yes | What is this opportunity | |
| amount_usd | Yes | Dollar amount (honest estimate, not inflated) | |
| status | No | pending | |
| url | No | Link to the opportunity | |
| deadline | No | Deadline (ISO date) | |
| notes | No | Additional notes |
Implementation Reference
- src/index.ts:402-419 (handler)The handler implementation for 'add_revenue_entry', which reads the DB, creates a new entry with generated ID and submitted_at, and saves it.
case "add_revenue_entry": { const db = loadDB(); const entry: RevenueEntry = { id: generateId(), source: (args as any).source, description: (args as any).description, amount_usd: (args as any).amount_usd, status: (args as any).status || "pending", url: (args as any).url, deadline: (args as any).deadline, submitted_at: new Date().toISOString(), notes: (args as any).notes, }; db.entries.push(entry); saveDB(db); return { content: [{ type: "text", text: `Added: ${entry.id} — ${entry.source} $${entry.amount_usd} (${entry.status})\n${entry.description}` }], }; - src/index.ts:265-281 (schema)The schema registration for 'add_revenue_entry', defining inputs like source, description, amount_usd, status, url, deadline, and notes.
{ name: "add_revenue_entry", description: "Track a new revenue opportunity (bounty, grant, product sale, freelance gig)", inputSchema: { type: "object" as const, required: ["source", "description", "amount_usd"], properties: { source: { type: "string", enum: ["bounty", "grant", "product", "freelance", "crypto"], description: "Revenue source type" }, description: { type: "string", description: "What is this opportunity" }, amount_usd: { type: "number", description: "Dollar amount (honest estimate, not inflated)" }, status: { type: "string", enum: ["pending", "submitted", "approved", "paid", "rejected"], default: "pending" }, url: { type: "string", description: "Link to the opportunity" }, deadline: { type: "string", description: "Deadline (ISO date)" }, notes: { type: "string", description: "Additional notes" }, }, }, },