How to fetch
- If a HasData tool is connected, call the one whose name matches the task below. Read that tool's schema and fill the fields it asks for. Do not run a shell command when the tool exists.
- If no HasData tool is connected, ask the user to press Connect on the HasData connector for this chat. Do not install software and do not ask them to paste an API key.
- Use the
hasdatacommand only when the connector cannot be connected and the binary is already on PATH. Runhasdata --helpand use a TikTok command only if it is listed.
Which tool
| Ask | Tool name contains | Pass |
|---|---|---|
| Profile | tiktok_profile | handle (no @ sign) |
| Posts from an account | tiktok_posts | handle |
| Search videos or accounts | tiktok_search | keyword |
| Comments on a video | tiktok_comments | videoId |
Search uses keyword, not q. If the user gave a video URL and the comments tool wants videoId, take the id from that URL. Do not invent engagement numbers.