How to Populate Link Cards with Claude
Get link card data with Claude and ToolRouter. Fetch rich preview metadata from any URL for embeds.
ToolLink PreviewClaude fetches link card metadata and can immediately format it into the structure your application needs. Ask it to return the data as a JSON object matching your schema, or describe the card layout and it formats the output accordingly.
Connect ToolRouter to Claude
1Open connector settings Open Settings
2Add a custom connector with these details
Name
ToolRouterURL
https://api.toolrouter.com/mcp3Let Claude set you up Open Claude
Steps
Once connected (see setup above), use the Link Preview tool:
- Ask: "Get link card metadata for: [paste URL]"
- Claude returns the structured preview data
- Ask: "Format this as a JSON object with title, description, image, and url fields"
- Use the formatted data to render your link card component
Example Prompt
Try this with Claude using the Link Preview tool
Fetch link preview data for this URL and return it as a JSON object I can use to render a link card: title, description, thumbnail_url, site_name, url — https://example.com/article
Tips
- Ask Claude to format the output to match your exact data schema
- Request that Claude flag when a thumbnail image URL is from a CDN vs an absolute page URL
- Test with a range of URLs — news sites, GitHub, YouTube — to see how metadata varies