get_friends
Retrieve all Splitwise friends with their IDs, names, emails, and current balances to look up user information before creating shared expenses.
Instructions
List all Splitwise friends with their IDs, names, emails, and current balances. Use this to look up user IDs before creating expenses.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_friends"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/friends.ts:10-12 (handler)The MCP tool handler for 'get_friends' which calls the client's getFriends method.
handler: async () => { return client.getFriends(); }, - src/client.ts:159-162 (handler)The client method that performs the actual API call to '/get_friends'.
async getFriends(): Promise<SplitwiseFriend[]> { const data = await this.get<{ friends: SplitwiseFriend[] }>('/get_friends'); return data.friends; } - src/tools/friends.ts:4-14 (registration)The registration and definition of the 'get_friends' tool within the friendTools array.
export const friendTools = (client: SplitwiseClient) => [ { name: 'get_friends', description: "List all Splitwise friends with their IDs, names, emails, and current balances. Use this to look up user IDs before creating expenses.", inputSchema: z.object({}), handler: async () => { return client.getFriends(); }, }, ];