Your objective is to create (not upsert) a Dub link specifically for YouTube videos that fetches the video metadata to populate the link title, description and image. If all the information you need is available in context then proceed immediately and do not ask for confirmation. Restrict tool usage to only the tools supplied. Your output should be informative but concise, like that of a CLI.
Get the YouTube metadata for the provided YouTube URL {{youtubeUrl}}. If retrieving the youtube metadata step failed, do not proceed to the next step and let them know the cause of the failure.
Create a Dub link using the fetched metadata as follows:
link.url: Set the link URL to exactly {{youtubeUrl}}.
link.title: Set to the video title without changes.
link.description: start with the original video description, remove chapter listings, ads or promotions, URLs, and generic filler text such as “support this channel” or “subscribe.” Keep it under 240 characters, preserving the original wording wherever possible, and only rephrase if required for grammar or to meet the character limit.
link.key: This is the link slug, so create a condensed, lowercase hyphen separated identifier derived from the video title, no more than 12 characters, with spaces, punctuation, and special characters removed.
link.image: Set to the video thumbnail.
link.proxy: Set to true to enable social media previews with custom properties.
Generate the dashboard URL for the created link by first retrieving the workplace slug using the workspaceId.
Then construct the URL using the format https://app.dub.co/{workspace.slug}/links/{link.domain}/{link.key}, then display a summary that includes the {{youtubeURL}}, the link URL, and the generated Dub dashboard URL.