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.
Which tool
| Ask | Tool name contains | Pass |
|---|---|---|
| Search YouTube | youtube_search | q |
| One video's stats | youtube_video | v (the video id) |
| A channel page | youtube_channel | channelId |
| Transcript or subtitles | youtube_transcript | v (the video id) |
If the user gave a channel handle or a video URL and the tool wants an id, search first and take the id from the result. Do not guess an id.
To summarize a video, call the transcript tool and summarize that text. Do not ask the user to watch it.
CLI fallback
hasdata youtube-search-api --help
hasdata youtube-video-api --help
hasdata youtube-channel-api --help
hasdata youtube-transcript-api --help