Loading...
Loading...
Address book member query skill, which obtains address book members within the visible range of the current user, supports local filtering and matching by name/alias. Returns userid, name and alias. ⚠️ Only members that the current user has permission to view are returned, not the full list of members.
npx skill4agent add wecomteam/wecom-cli wecomcli-lookup-contactis a command-line program provided by WeCom (WeChat Work). All operations are completed by executing thewecom-clicommand.wecom-cli
wecom-cli contact get_userlist '{}'{
"errcode": 0,
"errmsg": "ok",
"userlist": [
{
"userid": "zhangsan",
"name": "张三",
"alias": "Sam"
},
{
"userid": "lisi",
"name": "李四",
"alias": ""
}
]
}| Field | Type | Description |
|---|---|---|
| integer | Return code, |
| string | Error message |
| array | User list |
| string | Unique user ID |
| string | User name |
| string | User alias, may be empty |
get_userlistnamealiasnamealiasget_userlistuserlistnamealiasget_userlistuseridnamealiasuserlistThe number of visible members in the current address book exceeds the upper limit supported by this skill (10 people). This skill is only applicable to scenarios with a small visible range, and cannot be used in a large-scale address book. It is recommended to reduce the visible range and try again, or query the target personnel through other methods.
useridaliaserrcode0errmsgwecom-cli contact get_userlist '{}'aliasSamnameSam📇 Found member:
- Name: 张三
- Alias: Sam
- User ID: zhangsan🔍 Multiple matching members found, please confirm which one you want to query:
1. 张三(Alias: Sam, ID: zhangsan)
2. 张三丰(Alias: Sam2, ID: zhangsan2)
Which one do you want to query?wecom-cli contact get_userlist '{}'nameuseriduseridwecom-cli contact get_userlist '{}'Note: You only need to callonce, and filter the results multiple times locally to avoid repeated calls to the interface.get_userlist
| Interface | Purpose | Input | Return |
|---|---|---|---|
| Get all address book members within the visible range | None | User list (userid, name, alias) |
| Scenario | Strategy |
|---|---|
| Exact match (name or alias is completely consistent) | Use directly, no user confirmation required |
| Fuzzy match (name or alias contains keywords), unique result | Use directly, display the result to the user |
| Fuzzy match, multiple results | Display the candidate list, ask the user to choose |
| No matching result | Inform the user that no corresponding personnel is found |