delete_expense
Remove a specific expense from Splitwise by providing its ID to manage shared expense records.
Instructions
Delete a Splitwise expense by ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Splitwise expense ID to delete |
Implementation Reference
- src/tools/expenses.ts:80-83 (handler)The handler for the delete_expense MCP tool, which calls the client's deleteExpense method.
handler: async (args: { id: number }) => { await client.deleteExpense(args.id); return { success: true, deleted_id: args.id }; }, - src/client.ts:169-171 (handler)The actual implementation of the deleteExpense method on the SplitwiseClient class.
async deleteExpense(id: number): Promise<void> { await this.post(`/delete_expense/${id}`, {}); } - src/tools/expenses.ts:75-84 (registration)The registration of the delete_expense tool, including its name, description, and input schema.
name: 'delete_expense', description: 'Delete a Splitwise expense by ID.', inputSchema: z.object({ id: z.number().int().describe('Splitwise expense ID to delete'), }), handler: async (args: { id: number }) => { await client.deleteExpense(args.id); return { success: true, deleted_id: args.id }; }, },