import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
export function registerPresentationGuideResource(server: McpServer): void {
server.resource(
"presentation-guide",
"torrentclaw://presentation-guide",
{
description:
"Best practices for presenting torrent search results to users in a user-friendly, actionable format",
mimeType: "text/markdown",
},
async (uri) => {
const guide = `# TorrentClaw Results Presentation Guide
## Critical Requirements
When presenting torrent search results to users, you MUST follow these practices to make results actionable and user-friendly:
### 1. Clickable Magnet Links
**ALWAYS** make magnet links clickable using markdown format:
β
**CORRECT**:
- [π₯ Download](magnet:?xt=urn:btih:41159dc60579839533e04796df0e96bfa4864cb4&...)
- [π§² Magnet](magnet:?xt=urn:btih:41159dc60579839533e04796df0e96bfa4864cb4&...)
β **INCORRECT**:
- magnet:?xt=urn:btih:41159dc60579839533e04796df0e96bfa4864cb4 (not clickable)
- Showing only the info hash without full magnet URI
### 2. Content URL for Browsing
**ALWAYS** include the TorrentClaw content URL so users can explore all seasons/episodes:
β
**CORRECT**:
[π View all seasons and episodes on TorrentClaw](https://torrentclaw.com/shows/entrevias-2022-91260)
This allows users to:
- Browse all available seasons
- See all torrents for each episode
- Explore different quality options
### 3. User-Friendly Presentation Format
**For TV Shows** (especially when searching by season):
\`\`\`markdown
### EntrevΓas - Temporada 4
**Episodio 1** (S04E01)
- 720p HDTV β’ 879 MB β’ 6 seeders β’ [π₯ Download](magnet:?xt=urn:btih:...)
**Episodio 2** (S04E02)
- 1080p WEB-DL β’ 2.5 GB β’ 0 seeders β οΈ No active seeders β’ [π₯ Download](magnet:?xt=urn:btih:...)
- 720p HDTV β’ 976 MB β’ 1 seeder β’ [π₯ Download](magnet:?xt=urn:btih:...)
**Episodio 3** (S04E03)
- 720p HDTV β’ 795 MB β’ 2 seeders β’ [π₯ Download](magnet:?xt=urn:btih:...)
[π View all seasons on TorrentClaw](https://torrentclaw.com/shows/...)
\`\`\`
**For Movies**:
\`\`\`markdown
### Inception (2010)
IMDb: 8.8 | TMDB: 8.4
**Available Torrents:**
1. **2160p BluRay** β’ 15.2 GB β’ 147 seeders β’ [π₯ Download](magnet:?xt=...)
2. **1080p BluRay** β’ 2.0 GB β’ 847 seeders β Recommended β’ [π₯ Download](magnet:?xt=...)
3. **720p WEB-DL** β’ 1.2 GB β’ 234 seeders β’ [π₯ Download](magnet:?xt=...)
[π View on TorrentClaw](https://torrentclaw.com/movies/...)
\`\`\`
### 4. Helpful User Guidance
Provide context and recommendations:
- β
Recommend torrents with most seeders
- β
Warn when torrents have 0 seeders: "β οΈ No active seeders"
- β
Mark best option: "β Recommended" (based on seeders + quality)
- β
Suggest alternatives if requested season has no seeders
- β
Offer to search different quality/season
### 5. What NOT to Do
β **Never** present results in plain text tables without clickable links
β **Never** show truncated magnet links
β **Never** omit the content URL
β **Never** show info hashes without the full magnet URI
β **Never** present results without indicating seeder count
### 6. Example of Good vs Bad Presentation
**β BAD** (what user reported as not practical):
\`\`\`
ββββββββββββ¬ββββββββββββ¬βββββββββ¬ββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β Episodio β Calidad β TamaΓ±o β Seeders β Magnet β
ββββββββββββΌββββββββββββΌβββββββββΌββββββββββββΌβββββββββββββββββββββββββββββββββββ€
β S04E01 β 720p HDTV β 879 MB β 6 seeders β magnet:?xt=urn:btih:41159dc... β
ββββββββββββ΄ββββββββββββ΄βββββββββ΄ββββββββββββ΄βββββββββββββββββββββββββββββββββββ
\`\`\`
**β
GOOD**:
\`\`\`markdown
**S04E01**
720p HDTV β’ 879 MB β’ 6 seeders β’ [π₯ Download](magnet:?xt=urn:btih:41159dc60579839533e04796df0e96bfa4864cb4&...)
[π View all episodes on TorrentClaw](https://torrentclaw.com/shows/entrevias-2022-91260)
\`\`\`
## Summary
The key is to make results **actionable**: users should be able to:
1. Click magnet links to start downloading immediately
2. Click content URL to explore more options
3. Quickly identify which torrents are best (seeders)
4. Understand warnings (no seeders)
**Remember**: You're not just displaying data, you're helping users take action.
`;
return {
contents: [
{
uri: uri.href,
mimeType: "text/markdown",
text: guide,
},
],
};
},
);
}