splitwise_resolve_friend
Turn a friend's name or email into their Splitwise user ID with ranked fuzzy matches, confirming probable candidates before creating expenses, adding group members, or deleting friends.
Instructions
Turn a friend's name (or email) into their Splitwise user id, with ranked fuzzy candidates.
Calls GET /get_friends (not cached — friends change) and scores every friend with
difflib.SequenceMatcher on case- and accent-folded text: the best of "first last",
the first name, the last name, the email local-part and the full email. Returns the top
limit candidates with their scores.
A friend is resolved ONLY on an exact match (1.000 on one of those fields, for exactly one friend, and no other friend's name or email starting with the query). A wrong id here is a wrong person — the expense, the group membership or the deletion lands on someone else — so a close-but-not-exact candidate ("Daniela" vs "Daniel", 0.923) is reported as probable and must be confirmed with the user. No fuzzy candidate is offered for a query under 4 characters or whose numbers differ.
When to Use:
Before
splitwise_create_expense,splitwise_add_user_to_group,splitwise_get_friendorsplitwise_delete_friend, when the user named a person ("split it with Jon").
When NOT to Use:
For balances with each friend — use
splitwise_get_balances/splitwise_get_friends.For groups or categories — use
splitwise_resolve_group/splitwise_resolve_category.Someone who is not your friend yet: they will not be listed — add them with
splitwise_create_friend.
Returns:
The resolution line plus a markdown table (rank, First Last (id N), email, score,
matched on); or, with response_format json, {query, resolution, ambiguous_count, reason, resolved, probable, candidates: [{id, first_name, last_name, email, score, matched_on}]} where resolution is exact | probable | ambiguous | none,
ambiguous_count (always present, 0 unless ambiguous) says how many candidates are in
contention, resolved is set only for exact, and probable only for probable.
Examples: params = {"query": "Jon"} params = {"query": "maria garcia", "limit": 3, "response_format": "json"}
Error Handling:
A 401 means the API key is missing or was regenerated. With no friends at all the tool
says so. Anything but exact means: ask the user, do not pick.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |