The order is fixed by what each call accepts: dingtalk_search_users takes a keyword and hands back user IDs, dingtalk_get_user_info takes one of those IDs, and dingtalk_send_message needs the user before it can deliver content. dingtalk_search_users returns a paged result with hasMore and totalCount rather than a single answer, so an ambiguous name still has to be narrowed before anything is sent. The surface stops at private messages to one user — there is no group or channel call here.
A small DingTalk messaging server, 3 tools covering user lookup and direct messages for one registered DingTalk app.
- Name-to-ID resolution: dingtalk_search_users searches the directory by keyword, exactly or loosely, and returns the matching user IDs together with a total count and a has-more flag.
- Profile detail for a resolved user: dingtalk_get_user_info takes a user_id and returns that user's details.
- Direct delivery: dingtalk_send_message posts private message content to a specific user.
A DingTalk app registered on the account whose directory you are searching, with DINGTALK_APP_KEY and DINGTALK_APP_SECRET in the environment.
One command plus a key — npx -y @darrenyao/server-dingtalk, then supply credentials
