youtube-knowledge-mcp 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +105 -34
- package/dist/brain-schemas.d.ts +10 -10
- package/dist/brain-schemas.d.ts.map +1 -1
- package/dist/brain-schemas.js +0 -4
- package/dist/brain-schemas.js.map +1 -1
- package/dist/http/app.d.ts +16 -0
- package/dist/http/app.d.ts.map +1 -0
- package/dist/http/app.js +176 -0
- package/dist/http/app.js.map +1 -0
- package/dist/http/auth.d.ts +38 -0
- package/dist/http/auth.d.ts.map +1 -0
- package/dist/http/auth.js +79 -0
- package/dist/http/auth.js.map +1 -0
- package/dist/http/config.d.ts +41 -0
- package/dist/http/config.d.ts.map +1 -0
- package/dist/http/config.js +65 -0
- package/dist/http/config.js.map +1 -0
- package/dist/http/rate-limiter.d.ts +24 -0
- package/dist/http/rate-limiter.d.ts.map +1 -0
- package/dist/http/rate-limiter.js +55 -0
- package/dist/http/rate-limiter.js.map +1 -0
- package/dist/http/sessions.d.ts +34 -0
- package/dist/http/sessions.d.ts.map +1 -0
- package/dist/http/sessions.js +62 -0
- package/dist/http/sessions.js.map +1 -0
- package/dist/http.d.ts +6 -48
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +35 -252
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -517
- package/dist/index.js.map +1 -1
- package/dist/prompts-brain.d.ts +4 -0
- package/dist/prompts-brain.d.ts.map +1 -0
- package/dist/prompts-brain.js +48 -0
- package/dist/prompts-brain.js.map +1 -0
- package/dist/prompts-research.d.ts +4 -0
- package/dist/prompts-research.d.ts.map +1 -0
- package/dist/prompts-research.js +74 -0
- package/dist/prompts-research.js.map +1 -0
- package/dist/prompts-shared.d.ts +13 -0
- package/dist/prompts-shared.d.ts.map +1 -0
- package/dist/prompts-shared.js +7 -0
- package/dist/prompts-shared.js.map +1 -0
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +5 -100
- package/dist/prompts.js.map +1 -1
- package/dist/registry/brain-tools.d.ts +4 -0
- package/dist/registry/brain-tools.d.ts.map +1 -0
- package/dist/registry/brain-tools.js +104 -0
- package/dist/registry/brain-tools.js.map +1 -0
- package/dist/registry/channel-tools.d.ts +4 -0
- package/dist/registry/channel-tools.d.ts.map +1 -0
- package/dist/registry/channel-tools.js +53 -0
- package/dist/registry/channel-tools.js.map +1 -0
- package/dist/registry/health-tools.d.ts +4 -0
- package/dist/registry/health-tools.d.ts.map +1 -0
- package/dist/registry/health-tools.js +21 -0
- package/dist/registry/health-tools.js.map +1 -0
- package/dist/registry/index.d.ts +8 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +27 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/library-tools.d.ts +4 -0
- package/dist/registry/library-tools.d.ts.map +1 -0
- package/dist/registry/library-tools.js +116 -0
- package/dist/registry/library-tools.js.map +1 -0
- package/dist/registry/media-tools.d.ts +4 -0
- package/dist/registry/media-tools.d.ts.map +1 -0
- package/dist/registry/media-tools.js +100 -0
- package/dist/registry/media-tools.js.map +1 -0
- package/dist/registry/thumbnail-tools.d.ts +7 -0
- package/dist/registry/thumbnail-tools.d.ts.map +1 -0
- package/dist/registry/thumbnail-tools.js +72 -0
- package/dist/registry/thumbnail-tools.js.map +1 -0
- package/dist/registry/transcript-tools.d.ts +4 -0
- package/dist/registry/transcript-tools.d.ts.map +1 -0
- package/dist/registry/transcript-tools.js +68 -0
- package/dist/registry/transcript-tools.js.map +1 -0
- package/dist/registry/types.d.ts +41 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/registry/types.js +17 -0
- package/dist/registry/types.js.map +1 -0
- package/dist/registry/video-tools.d.ts +4 -0
- package/dist/registry/video-tools.d.ts.map +1 -0
- package/dist/registry/video-tools.js +101 -0
- package/dist/registry/video-tools.js.map +1 -0
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +13 -10
- package/dist/resources.js.map +1 -1
- package/dist/schemas.d.ts +11 -2
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +5 -0
- package/dist/schemas.js.map +1 -1
- package/dist/thumbnail-resource.d.ts +8 -0
- package/dist/thumbnail-resource.d.ts.map +1 -0
- package/dist/thumbnail-resource.js +38 -0
- package/dist/thumbnail-resource.js.map +1 -0
- package/dist/thumbnail-schemas.d.ts +512 -0
- package/dist/thumbnail-schemas.d.ts.map +1 -0
- package/dist/thumbnail-schemas.js +95 -0
- package/dist/thumbnail-schemas.js.map +1 -0
- package/dist/tools/batch.js +1 -1
- package/dist/tools/batch.js.map +1 -1
- package/dist/tools/build-brain.js +1 -1
- package/dist/tools/build-brain.js.map +1 -1
- package/dist/tools/check-health.d.ts +2 -0
- package/dist/tools/check-health.d.ts.map +1 -1
- package/dist/tools/check-health.js +9 -0
- package/dist/tools/check-health.js.map +1 -1
- package/dist/tools/clips.d.ts +9 -41
- package/dist/tools/clips.d.ts.map +1 -1
- package/dist/tools/clips.js +52 -128
- package/dist/tools/clips.js.map +1 -1
- package/dist/tools/fetch-channel-thumbnails.d.ts +179 -0
- package/dist/tools/fetch-channel-thumbnails.d.ts.map +1 -0
- package/dist/tools/fetch-channel-thumbnails.js +123 -0
- package/dist/tools/fetch-channel-thumbnails.js.map +1 -0
- package/dist/tools/fetch-videos.d.ts +3 -0
- package/dist/tools/fetch-videos.d.ts.map +1 -1
- package/dist/tools/fetch-videos.js +3 -0
- package/dist/tools/fetch-videos.js.map +1 -1
- package/dist/tools/frames-subtitles.d.ts +44 -0
- package/dist/tools/frames-subtitles.d.ts.map +1 -0
- package/dist/tools/frames-subtitles.js +104 -0
- package/dist/tools/frames-subtitles.js.map +1 -0
- package/dist/tools/get-channel-info.d.ts +2 -0
- package/dist/tools/get-channel-info.d.ts.map +1 -1
- package/dist/tools/get-channel-info.js +8 -1
- package/dist/tools/get-channel-info.js.map +1 -1
- package/dist/tools/get-playlist-info.d.ts.map +1 -1
- package/dist/tools/get-playlist-info.js +1 -0
- package/dist/tools/get-playlist-info.js.map +1 -1
- package/dist/tools/get-thumbnail.d.ts +38 -0
- package/dist/tools/get-thumbnail.d.ts.map +1 -0
- package/dist/tools/get-thumbnail.js +152 -0
- package/dist/tools/get-thumbnail.js.map +1 -0
- package/dist/tools/get-transcript.d.ts.map +1 -1
- package/dist/tools/get-transcript.js +2 -14
- package/dist/tools/get-transcript.js.map +1 -1
- package/dist/tools/library.d.ts.map +1 -1
- package/dist/tools/library.js +13 -3
- package/dist/tools/library.js.map +1 -1
- package/dist/tools/list-channel-thumbnails.d.ts +235 -0
- package/dist/tools/list-channel-thumbnails.d.ts.map +1 -0
- package/dist/tools/list-channel-thumbnails.js +79 -0
- package/dist/tools/list-channel-thumbnails.js.map +1 -0
- package/dist/tools/save-to-library.d.ts.map +1 -1
- package/dist/tools/save-to-library.js +5 -1
- package/dist/tools/save-to-library.js.map +1 -1
- package/dist/tools/search-channels.d.ts +6 -0
- package/dist/tools/search-channels.d.ts.map +1 -1
- package/dist/tools/search-transcript.d.ts.map +1 -1
- package/dist/tools/search-transcript.js +6 -13
- package/dist/tools/search-transcript.js.map +1 -1
- package/dist/tools/search-videos.d.ts +3 -0
- package/dist/tools/search-videos.d.ts.map +1 -1
- package/dist/utils/batches.d.ts +15 -0
- package/dist/utils/batches.d.ts.map +1 -0
- package/dist/utils/batches.js +31 -0
- package/dist/utils/batches.js.map +1 -0
- package/dist/utils/brain-build.d.ts.map +1 -1
- package/dist/utils/brain-build.js +1 -12
- package/dist/utils/brain-build.js.map +1 -1
- package/dist/utils/brain-index.d.ts.map +1 -1
- package/dist/utils/brain-index.js +3 -2
- package/dist/utils/brain-index.js.map +1 -1
- package/dist/utils/brain-lock.d.ts +2 -18
- package/dist/utils/brain-lock.d.ts.map +1 -1
- package/dist/utils/brain-lock.js +4 -80
- package/dist/utils/brain-lock.js.map +1 -1
- package/dist/utils/brain-lookup.d.ts +8 -0
- package/dist/utils/brain-lookup.d.ts.map +1 -1
- package/dist/utils/brain-lookup.js +5 -31
- package/dist/utils/brain-lookup.js.map +1 -1
- package/dist/utils/brain-storage.d.ts.map +1 -1
- package/dist/utils/brain-storage.js +5 -5
- package/dist/utils/brain-storage.js.map +1 -1
- package/dist/utils/caption-probe.d.ts +7 -0
- package/dist/utils/caption-probe.d.ts.map +1 -0
- package/dist/utils/caption-probe.js +36 -0
- package/dist/utils/caption-probe.js.map +1 -0
- package/dist/utils/channel-images.d.ts +16 -0
- package/dist/utils/channel-images.d.ts.map +1 -0
- package/dist/utils/channel-images.js +35 -0
- package/dist/utils/channel-images.js.map +1 -0
- package/dist/utils/channel-lookup.d.ts +5 -0
- package/dist/utils/channel-lookup.d.ts.map +1 -0
- package/dist/utils/channel-lookup.js +37 -0
- package/dist/utils/channel-lookup.js.map +1 -0
- package/dist/utils/chapters.d.ts +11 -0
- package/dist/utils/chapters.d.ts.map +1 -0
- package/dist/utils/chapters.js +24 -0
- package/dist/utils/chapters.js.map +1 -0
- package/dist/utils/clips.d.ts.map +1 -1
- package/dist/utils/clips.js +18 -26
- package/dist/utils/clips.js.map +1 -1
- package/dist/utils/env.d.ts +26 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/env.js +72 -0
- package/dist/utils/env.js.map +1 -0
- package/dist/utils/errors.d.ts +1 -1
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +20 -2
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/file-lock.d.ts +34 -0
- package/dist/utils/file-lock.d.ts.map +1 -0
- package/dist/utils/file-lock.js +91 -0
- package/dist/utils/file-lock.js.map +1 -0
- package/dist/utils/flat-listing.d.ts +89 -0
- package/dist/utils/flat-listing.d.ts.map +1 -0
- package/dist/utils/flat-listing.js +68 -0
- package/dist/utils/flat-listing.js.map +1 -0
- package/dist/utils/format.d.ts +1 -3
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +1 -5
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/guard.d.ts +21 -0
- package/dist/utils/guard.d.ts.map +1 -0
- package/dist/utils/guard.js +105 -0
- package/dist/utils/guard.js.map +1 -0
- package/dist/utils/image-dimensions.d.ts +19 -0
- package/dist/utils/image-dimensions.d.ts.map +1 -0
- package/dist/utils/image-dimensions.js +93 -0
- package/dist/utils/image-dimensions.js.map +1 -0
- package/dist/utils/image-fetch.d.ts +31 -0
- package/dist/utils/image-fetch.d.ts.map +1 -0
- package/dist/utils/image-fetch.js +141 -0
- package/dist/utils/image-fetch.js.map +1 -0
- package/dist/utils/json-file.d.ts +14 -5
- package/dist/utils/json-file.d.ts.map +1 -1
- package/dist/utils/json-file.js +24 -9
- package/dist/utils/json-file.js.map +1 -1
- package/dist/utils/paths.d.ts +10 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +14 -0
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/pattern.d.ts +30 -0
- package/dist/utils/pattern.d.ts.map +1 -0
- package/dist/utils/pattern.js +130 -0
- package/dist/utils/pattern.js.map +1 -0
- package/dist/utils/search-index.d.ts.map +1 -1
- package/dist/utils/search-index.js +9 -4
- package/dist/utils/search-index.js.map +1 -1
- package/dist/utils/storage.d.ts.map +1 -1
- package/dist/utils/storage.js +14 -8
- package/dist/utils/storage.js.map +1 -1
- package/dist/utils/subtitles.d.ts +7 -0
- package/dist/utils/subtitles.d.ts.map +1 -0
- package/dist/utils/subtitles.js +30 -0
- package/dist/utils/subtitles.js.map +1 -0
- package/dist/utils/thumbnail-entry.d.ts +19 -0
- package/dist/utils/thumbnail-entry.d.ts.map +1 -0
- package/dist/utils/thumbnail-entry.js +119 -0
- package/dist/utils/thumbnail-entry.js.map +1 -0
- package/dist/utils/thumbnail-fetch.d.ts +37 -0
- package/dist/utils/thumbnail-fetch.d.ts.map +1 -0
- package/dist/utils/thumbnail-fetch.js +89 -0
- package/dist/utils/thumbnail-fetch.js.map +1 -0
- package/dist/utils/thumbnail-ladder.d.ts +44 -0
- package/dist/utils/thumbnail-ladder.d.ts.map +1 -0
- package/dist/utils/thumbnail-ladder.js +68 -0
- package/dist/utils/thumbnail-ladder.js.map +1 -0
- package/dist/utils/thumbnail-listing.d.ts +16 -0
- package/dist/utils/thumbnail-listing.d.ts.map +1 -0
- package/dist/utils/thumbnail-listing.js +26 -0
- package/dist/utils/thumbnail-listing.js.map +1 -0
- package/dist/utils/thumbnail-paths.d.ts +20 -0
- package/dist/utils/thumbnail-paths.d.ts.map +1 -0
- package/dist/utils/thumbnail-paths.js +35 -0
- package/dist/utils/thumbnail-paths.js.map +1 -0
- package/dist/utils/thumbnail-store.d.ts +19 -0
- package/dist/utils/thumbnail-store.d.ts.map +1 -0
- package/dist/utils/thumbnail-store.js +125 -0
- package/dist/utils/thumbnail-store.js.map +1 -0
- package/dist/utils/transcript-cache.d.ts +20 -0
- package/dist/utils/transcript-cache.d.ts.map +1 -0
- package/dist/utils/transcript-cache.js +127 -0
- package/dist/utils/transcript-cache.js.map +1 -0
- package/dist/utils/transcript-search.d.ts +20 -0
- package/dist/utils/transcript-search.d.ts.map +1 -0
- package/dist/utils/transcript-search.js +35 -0
- package/dist/utils/transcript-search.js.map +1 -0
- package/dist/utils/transcript.d.ts +10 -31
- package/dist/utils/transcript.d.ts.map +1 -1
- package/dist/utils/transcript.js +2 -64
- package/dist/utils/transcript.js.map +1 -1
- package/dist/utils/validate-youtube.d.ts +35 -0
- package/dist/utils/validate-youtube.d.ts.map +1 -0
- package/dist/utils/validate-youtube.js +87 -0
- package/dist/utils/validate-youtube.js.map +1 -0
- package/dist/utils/validate.d.ts +11 -4
- package/dist/utils/validate.d.ts.map +1 -1
- package/dist/utils/validate.js +43 -36
- package/dist/utils/validate.js.map +1 -1
- package/dist/utils/version.d.ts +2 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +19 -0
- package/dist/utils/version.js.map +1 -0
- package/dist/utils/youtube-channel.d.ts +44 -0
- package/dist/utils/youtube-channel.d.ts.map +1 -0
- package/dist/utils/youtube-channel.js +61 -0
- package/dist/utils/youtube-channel.js.map +1 -0
- package/dist/utils/youtube-download.d.ts +27 -0
- package/dist/utils/youtube-download.d.ts.map +1 -0
- package/dist/utils/youtube-download.js +118 -0
- package/dist/utils/youtube-download.js.map +1 -0
- package/dist/utils/youtube-schemas.d.ts +394 -0
- package/dist/utils/youtube-schemas.d.ts.map +1 -0
- package/dist/utils/youtube-schemas.js +118 -0
- package/dist/utils/youtube-schemas.js.map +1 -0
- package/dist/utils/youtube-search.d.ts +14 -0
- package/dist/utils/youtube-search.d.ts.map +1 -0
- package/dist/utils/youtube-search.js +39 -0
- package/dist/utils/youtube-search.js.map +1 -0
- package/dist/utils/youtube-url.d.ts +25 -0
- package/dist/utils/youtube-url.d.ts.map +1 -0
- package/dist/utils/youtube-url.js +75 -0
- package/dist/utils/youtube-url.js.map +1 -0
- package/dist/utils/youtube-video.d.ts +47 -0
- package/dist/utils/youtube-video.d.ts.map +1 -0
- package/dist/utils/youtube-video.js +98 -0
- package/dist/utils/youtube-video.js.map +1 -0
- package/dist/utils/youtube.d.ts +10 -122
- package/dist/utils/youtube.d.ts.map +1 -1
- package/dist/utils/youtube.js +11 -486
- package/dist/utils/youtube.js.map +1 -1
- package/dist/utils/ytdlp-env.d.ts +33 -0
- package/dist/utils/ytdlp-env.d.ts.map +1 -0
- package/dist/utils/ytdlp-env.js +121 -0
- package/dist/utils/ytdlp-env.js.map +1 -0
- package/dist/utils/ytdlp-limiter.d.ts +24 -0
- package/dist/utils/ytdlp-limiter.d.ts.map +1 -0
- package/dist/utils/ytdlp-limiter.js +69 -0
- package/dist/utils/ytdlp-limiter.js.map +1 -0
- package/dist/utils/ytdlp-parse.d.ts +13 -0
- package/dist/utils/ytdlp-parse.d.ts.map +1 -0
- package/dist/utils/ytdlp-parse.js +48 -0
- package/dist/utils/ytdlp-parse.js.map +1 -0
- package/dist/utils/ytdlp.d.ts +13 -18
- package/dist/utils/ytdlp.d.ts.map +1 -1
- package/dist/utils/ytdlp.js +21 -110
- package/dist/utils/ytdlp.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts-brain.js","sourceRoot":"","sources":["../src/prompts-brain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,6EAA6E;AAC7E,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,MAAM,CAAC,cAAc,CACnB,cAAc,EACd;QACE,KAAK,EAAE,+BAA+B;QACtC,WAAW,EACT,qHAAqH;QACvH,UAAU,EAAE;YACV,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;YAC7D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;SAC/E;KACF,EACD,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CACrB,WAAW,CACT;QACE,yCAAyC,OAAO,2BAA2B;QAC3E,EAAE;QACF,iCAAiC,KAAK,IAAI,KAAK,qCAAqC;QACpF,mDAAmD;QACnD,oFAAoF;QACpF,8DAA8D;QAC9D,mFAAmF;QACnF,qFAAqF;QACrF,uEAAuE;QACvE,4CAA4C;QAC5C,EAAE;QACF,mFAAmF;QACnF,wFAAwF;QACxF,mFAAmF;QACnF,uCAAuC;KACxC,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CACJ,CAAC;IAEF,MAAM,CAAC,cAAc,CACnB,aAAa,EACb;QACE,KAAK,EAAE,6BAA6B;QACpC,WAAW,EACT,4FAA4F;QAC9F,UAAU,EAAE;YACV,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;YAClF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;SACvD;KACF,EACD,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CACxB,WAAW,CACT;QACE,qBAAqB,OAAO,6BAA6B,QAAQ,EAAE;QACnE,EAAE;QACF,iFAAiF;QACjF,sEAAsE;QACtE,uFAAuF;QACvF,EAAE;QACF,gFAAgF;QAChF,kFAAkF;QAClF,kEAAkE;KACnE,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
/** Prompts that survey more than one video: comparisons, research, and a channel's output and thumbnails. */
|
|
3
|
+
export declare function registerResearchPrompts(server: McpServer): void;
|
|
4
|
+
//# sourceMappingURL=prompts-research.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts-research.d.ts","sourceRoot":"","sources":["../src/prompts-research.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,6GAA6G;AAC7G,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAsG/D"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { userMessage } from './prompts-shared.js';
|
|
3
|
+
/** Prompts that survey more than one video: comparisons, research, and a channel's output and thumbnails. */
|
|
4
|
+
export function registerResearchPrompts(server) {
|
|
5
|
+
server.registerPrompt('compare_videos', {
|
|
6
|
+
title: 'Compare several videos',
|
|
7
|
+
description: 'Compare how multiple videos treat the same topic, and where they disagree.',
|
|
8
|
+
argsSchema: {
|
|
9
|
+
videos: z.string().describe('Comma-separated video IDs or URLs'),
|
|
10
|
+
focus: z.string().optional().describe('A specific question to compare them on'),
|
|
11
|
+
},
|
|
12
|
+
}, ({ videos, focus }) => userMessage([
|
|
13
|
+
`Compare these videos: ${videos}`,
|
|
14
|
+
'',
|
|
15
|
+
'Call get_transcripts once with all of them rather than fetching each separately.',
|
|
16
|
+
focus === undefined ? '' : `Focus on: ${focus}`,
|
|
17
|
+
'',
|
|
18
|
+
'Report where they agree, where they genuinely disagree (not just differ in emphasis),',
|
|
19
|
+
'and what each covers that the others do not. Attribute every claim to a specific video.',
|
|
20
|
+
]
|
|
21
|
+
.filter(Boolean)
|
|
22
|
+
.join('\n')));
|
|
23
|
+
server.registerPrompt('research_topic', {
|
|
24
|
+
title: 'Research a topic on YouTube',
|
|
25
|
+
description: 'Search for videos on a topic, survey them cheaply, then read the ones worth reading.',
|
|
26
|
+
argsSchema: {
|
|
27
|
+
topic: z.string().describe('What to research'),
|
|
28
|
+
depth: z
|
|
29
|
+
.enum(['survey', 'deep'])
|
|
30
|
+
.optional()
|
|
31
|
+
.describe('survey reads metadata only; deep reads transcripts. Default: survey'),
|
|
32
|
+
},
|
|
33
|
+
}, ({ topic, depth }) => userMessage([
|
|
34
|
+
`Research "${topic}" on YouTube.`,
|
|
35
|
+
'',
|
|
36
|
+
'1. search_videos to find candidates, and search_channels for authoritative sources.',
|
|
37
|
+
'2. Judge relevance from titles, durations and view counts before fetching anything large.',
|
|
38
|
+
depth === 'deep'
|
|
39
|
+
? '3. get_transcripts for the shortlist, then search_transcript to locate specific claims.'
|
|
40
|
+
: '3. get_video_info and get_chapters for the shortlist. Only read a transcript if a video looks essential.',
|
|
41
|
+
'',
|
|
42
|
+
'Report what the consensus is, where sources disagree, and which video best answers the question.',
|
|
43
|
+
].join('\n')));
|
|
44
|
+
server.registerPrompt('channel_deep_dive', {
|
|
45
|
+
title: 'Survey a channel',
|
|
46
|
+
description: "Characterize a channel's output and identify its most substantial videos.",
|
|
47
|
+
argsSchema: {
|
|
48
|
+
channel: z.string().describe('Channel URL, @handle, or name'),
|
|
49
|
+
limit: z.string().optional().describe('How many videos to survey. Default: 20'),
|
|
50
|
+
},
|
|
51
|
+
}, ({ channel, limit }) => userMessage([
|
|
52
|
+
`Survey the YouTube channel ${channel}.`,
|
|
53
|
+
'',
|
|
54
|
+
`1. get_channel_info for context, then digest_playlist with limit=${limit ?? '20'}.`,
|
|
55
|
+
'2. Identify recurring themes, the format the channel favours, and how it has changed over time.',
|
|
56
|
+
'3. Name the three videos most worth watching and say why.',
|
|
57
|
+
].join('\n')));
|
|
58
|
+
server.registerPrompt('study_thumbnails', {
|
|
59
|
+
title: "Study a channel's thumbnails",
|
|
60
|
+
description: "Save a channel's thumbnails, look at a sample, and describe the recurring layout, colour and text patterns with the videos as citations.",
|
|
61
|
+
argsSchema: {
|
|
62
|
+
channel: z.string().describe('Channel URL, @handle, or name'),
|
|
63
|
+
sample: z.string().optional().describe('How many thumbnails to look at. Default: 6'),
|
|
64
|
+
},
|
|
65
|
+
}, ({ channel, sample }) => userMessage([
|
|
66
|
+
`Study the thumbnails of the YouTube channel ${channel}.`,
|
|
67
|
+
'',
|
|
68
|
+
'1. Call fetch_channel_thumbnails for the channel (local mode), or get_thumbnail on a few videos from fetch_videos if only the remote tools are available.',
|
|
69
|
+
`2. Look at ${sample ?? '6'} of them with get_thumbnail, spread across the channel's history, plus the avatar.`,
|
|
70
|
+
'3. Describe what recurs: composition, face placement, colour palette, text size and wording, and how these changed over time.',
|
|
71
|
+
'4. Cite each observation with the video ids it comes from. Do not describe an image you have not looked at.',
|
|
72
|
+
].join('\n')));
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=prompts-research.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts-research.js","sourceRoot":"","sources":["../src/prompts-research.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,6GAA6G;AAC7G,MAAM,UAAU,uBAAuB,CAAC,MAAiB;IACvD,MAAM,CAAC,cAAc,CACnB,gBAAgB,EAChB;QACE,KAAK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ACnB;QACE,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,2EAA2E;QACxF,UAAU,EAAE;YACV,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;YAC7D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;SAChF;KACF,EACD,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CACrB,WAAW,CACT;QACE,8BAA8B,OAAO,GAAG;QACxC,EAAE;QACF,oEAAoE,KAAK,IAAI,IAAI,GAAG;QACpF,iGAAiG;QACjG,2DAA2D;KAC5D,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CACJ,CAAC;IAEF,MAAM,CAAC,cAAc,CACnB,kBAAkB,EAClB;QACE,KAAK,EAAE,8BAA8B;QACrC,WAAW,EACT,0IAA0I;QAC5I,UAAU,EAAE;YACV,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;YAC7D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;SACrF;KACF,EACD,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CACtB,WAAW,CACT;QACE,+CAA+C,OAAO,GAAG;QACzD,EAAE;QACF,2JAA2J;QAC3J,cAAc,MAAM,IAAI,GAAG,oFAAoF;QAC/G,+HAA+H;QAC/H,6GAA6G;KAC9G,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** The two things every prompt needs. */
|
|
3
|
+
export declare function userMessage(text: string): {
|
|
4
|
+
messages: {
|
|
5
|
+
role: 'user';
|
|
6
|
+
content: {
|
|
7
|
+
type: 'text';
|
|
8
|
+
text: string;
|
|
9
|
+
};
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
export declare const video: z.ZodString;
|
|
13
|
+
//# sourceMappingURL=prompts-shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts-shared.d.ts","sourceRoot":"","sources":["../src/prompts-shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yCAAyC;AAEzC,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG;IACzC,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,EAAE,CAAC;CACvE,CAEA;AAED,eAAO,MAAM,KAAK,aAAiD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** The two things every prompt needs. */
|
|
3
|
+
export function userMessage(text) {
|
|
4
|
+
return { messages: [{ role: 'user', content: { type: 'text', text } }] };
|
|
5
|
+
}
|
|
6
|
+
export const video = z.string().describe('YouTube video ID or URL');
|
|
7
|
+
//# sourceMappingURL=prompts-shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts-shared.js","sourceRoot":"","sources":["../src/prompts-shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yCAAyC;AAEzC,MAAM,UAAU,WAAW,CAAC,IAAY;IAGtC,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC;AAC7F,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC"}
|
package/dist/prompts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiCzE,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAyH/E"}
|
package/dist/prompts.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { completable } from '@modelcontextprotocol/sdk/server/completable.js';
|
|
3
3
|
import { listTags } from './utils/storage.js';
|
|
4
|
+
import { registerBrainPrompts } from './prompts-brain.js';
|
|
5
|
+
import { registerResearchPrompts } from './prompts-research.js';
|
|
6
|
+
import { userMessage, video } from './prompts-shared.js';
|
|
4
7
|
/**
|
|
5
8
|
* Reusable workflows, exposed as MCP prompts.
|
|
6
9
|
*
|
|
7
10
|
* These encode the sequences that were previously buried in the server's
|
|
8
11
|
* instructions string, where a client could read them but not invoke them.
|
|
9
12
|
*/
|
|
10
|
-
function userMessage(text) {
|
|
11
|
-
return { messages: [{ role: 'user', content: { type: 'text', text } }] };
|
|
12
|
-
}
|
|
13
|
-
const video = z.string().describe('YouTube video ID or URL');
|
|
14
13
|
/**
|
|
15
14
|
* An optional prompt argument that offers completions.
|
|
16
15
|
*
|
|
@@ -62,59 +61,7 @@ export function registerPrompts(server, mode) {
|
|
|
62
61
|
'',
|
|
63
62
|
'Keep a [MM:SS] reference on each step so it can be checked against the video.',
|
|
64
63
|
].join('\n')));
|
|
65
|
-
server
|
|
66
|
-
title: 'Compare several videos',
|
|
67
|
-
description: 'Compare how multiple videos treat the same topic, and where they disagree.',
|
|
68
|
-
argsSchema: {
|
|
69
|
-
videos: z.string().describe('Comma-separated video IDs or URLs'),
|
|
70
|
-
focus: z.string().optional().describe('A specific question to compare them on'),
|
|
71
|
-
},
|
|
72
|
-
}, ({ videos, focus }) => userMessage([
|
|
73
|
-
`Compare these videos: ${videos}`,
|
|
74
|
-
'',
|
|
75
|
-
'Call get_transcripts once with all of them rather than fetching each separately.',
|
|
76
|
-
focus === undefined ? '' : `Focus on: ${focus}`,
|
|
77
|
-
'',
|
|
78
|
-
'Report where they agree, where they genuinely disagree (not just differ in emphasis),',
|
|
79
|
-
'and what each covers that the others do not. Attribute every claim to a specific video.',
|
|
80
|
-
]
|
|
81
|
-
.filter(Boolean)
|
|
82
|
-
.join('\n')));
|
|
83
|
-
server.registerPrompt('research_topic', {
|
|
84
|
-
title: 'Research a topic on YouTube',
|
|
85
|
-
description: 'Search for videos on a topic, survey them cheaply, then read the ones worth reading.',
|
|
86
|
-
argsSchema: {
|
|
87
|
-
topic: z.string().describe('What to research'),
|
|
88
|
-
depth: z
|
|
89
|
-
.enum(['survey', 'deep'])
|
|
90
|
-
.optional()
|
|
91
|
-
.describe('survey reads metadata only; deep reads transcripts. Default: survey'),
|
|
92
|
-
},
|
|
93
|
-
}, ({ topic, depth }) => userMessage([
|
|
94
|
-
`Research "${topic}" on YouTube.`,
|
|
95
|
-
'',
|
|
96
|
-
'1. search_videos to find candidates, and search_channels for authoritative sources.',
|
|
97
|
-
'2. Judge relevance from titles, durations and view counts before fetching anything large.',
|
|
98
|
-
depth === 'deep'
|
|
99
|
-
? '3. get_transcripts for the shortlist, then search_transcript to locate specific claims.'
|
|
100
|
-
: '3. get_video_info and get_chapters for the shortlist. Only read a transcript if a video looks essential.',
|
|
101
|
-
'',
|
|
102
|
-
'Report what the consensus is, where sources disagree, and which video best answers the question.',
|
|
103
|
-
].join('\n')));
|
|
104
|
-
server.registerPrompt('channel_deep_dive', {
|
|
105
|
-
title: 'Survey a channel',
|
|
106
|
-
description: "Characterize a channel's output and identify its most substantial videos.",
|
|
107
|
-
argsSchema: {
|
|
108
|
-
channel: z.string().describe('Channel URL, @handle, or name'),
|
|
109
|
-
limit: z.string().optional().describe('How many videos to survey. Default: 20'),
|
|
110
|
-
},
|
|
111
|
-
}, ({ channel, limit }) => userMessage([
|
|
112
|
-
`Survey the YouTube channel ${channel}.`,
|
|
113
|
-
'',
|
|
114
|
-
`1. get_channel_info for context, then digest_playlist with limit=${limit ?? '20'}.`,
|
|
115
|
-
'2. Identify recurring themes, the format the channel favours, and how it has changed over time.',
|
|
116
|
-
'3. Name the three videos most worth watching and say why.',
|
|
117
|
-
].join('\n')));
|
|
64
|
+
registerResearchPrompts(server);
|
|
118
65
|
server.registerPrompt('clip_from_quote', {
|
|
119
66
|
title: 'Clip a moment from a quote',
|
|
120
67
|
description: 'Find a phrase in a video and cut a clip around it — the search-then-extract workflow.',
|
|
@@ -138,51 +85,9 @@ export function registerPrompts(server, mode) {
|
|
|
138
85
|
'Report the clip path and the timestamp it came from.',
|
|
139
86
|
].join('\n'));
|
|
140
87
|
});
|
|
141
|
-
// Library prompts only exist where the library does.
|
|
142
88
|
if (mode !== 'stdio')
|
|
143
89
|
return;
|
|
144
|
-
server
|
|
145
|
-
title: 'Create a brain for a YouTuber',
|
|
146
|
-
description: 'Read a channel into a searchable corpus, then write a grounded account of the creator from what they actually said.',
|
|
147
|
-
argsSchema: {
|
|
148
|
-
channel: z.string().describe('Channel URL, @handle, or name'),
|
|
149
|
-
limit: z.string().optional().describe('How many videos to read. Default: 100'),
|
|
150
|
-
},
|
|
151
|
-
}, ({ channel, limit }) => userMessage([
|
|
152
|
-
`Build a brain for the YouTube channel ${channel}, then write its profile.`,
|
|
153
|
-
'',
|
|
154
|
-
`1. build_brain with maxVideos=${limit ?? '100'}. This takes a while. If it reports`,
|
|
155
|
-
' stoppedEarly, call it again until it does not.',
|
|
156
|
-
'2. get_brain_info to see what was actually read — a profile written over a channel',
|
|
157
|
-
' that is half unread is a profile of the half that loaded.',
|
|
158
|
-
'3. Probe the corpus with several ask_brain calls: the subjects it returns to, the',
|
|
159
|
-
' positions it argues for, the advice it repeats, how it opens and closes a video.',
|
|
160
|
-
' The recurring phrases in get_brain_info are a good place to start.',
|
|
161
|
-
'4. save_brain_profile with what you found.',
|
|
162
|
-
'',
|
|
163
|
-
'Every claim in the profile must be supported by a passage you retrieved, cited as',
|
|
164
|
-
'[MM:SS] with its link. Where the corpus does not support a claim, leave the claim out.',
|
|
165
|
-
'Do not describe the creator as a person, a personality or a brand — describe what',
|
|
166
|
-
'their videos say and how they say it.',
|
|
167
|
-
].join('\n')));
|
|
168
|
-
server.registerPrompt('ask_creator', {
|
|
169
|
-
title: 'Ask what a creator has said',
|
|
170
|
-
description: 'Answer a question strictly from a channel brain, citing the moments the answer comes from.',
|
|
171
|
-
argsSchema: {
|
|
172
|
-
channel: z.string().describe('Channel URL, @handle, or name of an existing brain'),
|
|
173
|
-
question: z.string().describe('What you want to know'),
|
|
174
|
-
},
|
|
175
|
-
}, ({ channel, question }) => userMessage([
|
|
176
|
-
`Answer this about ${channel}, using only their brain: ${question}`,
|
|
177
|
-
'',
|
|
178
|
-
'1. ask_brain with the question. Then ask again with the words the creator would',
|
|
179
|
-
' actually use — passages are matched as spoken, not as summarised.',
|
|
180
|
-
'2. Answer from the passages you got back, citing each point as [MM:SS] with its link.',
|
|
181
|
-
'',
|
|
182
|
-
'If the passages do not answer the question, say so and say what they do cover.',
|
|
183
|
-
'Do not fill the gap from what you already know about this person: an answer that',
|
|
184
|
-
'cannot be traced to a timestamp is not an answer from the brain.',
|
|
185
|
-
].join('\n')));
|
|
90
|
+
registerBrainPrompts(server);
|
|
186
91
|
server.registerPrompt('review_library', {
|
|
187
92
|
title: 'Review the knowledge library',
|
|
188
93
|
description: 'Survey what is saved locally on a topic and synthesize it.',
|
package/dist/prompts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;;GAKG;AAEH;;;;;;;;;;GAUG;AACH,SAAS,mBAAmB,CAC1B,MAAmB;AACnB,2EAA2E;AAC3E,QAA0D;IAE1D,OAAO,WAAW,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE,EAAE,QAAQ,CAAC,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,MAAiB,EAAE,IAAsB;IACvE,MAAM,CAAC,cAAc,CACnB,iBAAiB,EACjB;QACE,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EACT,qGAAqG;QACvG,UAAU,EAAE;YACV,KAAK;YACL,KAAK,EAAE,CAAC;iBACL,IAAI,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;iBACvC,QAAQ,EAAE;iBACV,QAAQ,CAAC,+CAA+C,CAAC;SAC7D;KACF,EACD,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAA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AAK,yBAAyB;YAClE,4EAA4E;YAC5E,4BAA4B,GAAG,iCAAiC,GAAG,gCAAgC;YACnG,EAAE;YACF,sDAAsD;SACvD,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO;IAE7B,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAE7B,MAAM,CAAC,cAAc,CACnB,gBAAgB,EAChB;QACE,KAAK,EAAE,8BAA8B;QACrC,WAAW,EAAE,4DAA4D;QACzE,UAAU,EAAE;YACV,2EAA2E;YAC3E,GAAG,EAAE,mBAAmB,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;gBACpF,MAAM,MAAM,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;gBAC3C,MAAM,IAAI,GAAG,MAAM,QAAQ,EAAE,CAAC;gBAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YAChF,CAAC,CAAC;SACH;KACF,EACD,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CACV,WAAW,CACT;QACE,GAAG,KAAK,SAAS;YACf,CAAC,CAAC,2DAA2D;YAC7D,CAAC,CAAC,sCAAsC,GAAG,IAAI;QACjD,EAAE;QACF,uCAAuC;QACvC,kGAAkG;QAClG,EAAE;QACF,kFAAkF;QAClF,mCAAmC;KACpC,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type ToolDefinition } from './types.js';
|
|
2
|
+
/** Channel brains. Local like the library, and for the same reason: a brain is tens of megabytes of one user's reading, and in HTTP mode any client could fill the server's disk by naming a channel. */
|
|
3
|
+
export declare const brainTools: ToolDefinition[];
|
|
4
|
+
//# sourceMappingURL=brain-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brain-tools.d.ts","sourceRoot":"","sources":["../../src/registry/brain-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAwB7D,yMAAyM;AACzM,eAAO,MAAM,UAAU,EAAE,cAAc,EAsGtC,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { defineTool } from './types.js';
|
|
2
|
+
import { askBrainSchema, askBrainOutputSchema, askBrainHandler } from '../tools/ask-brain.js';
|
|
3
|
+
import { listBrainsSchema, listBrainsOutputSchema, listBrainsHandler, getBrainInfoSchema, getBrainInfoOutputSchema, getBrainInfoHandler, } from '../tools/brain-info.js';
|
|
4
|
+
import { buildBrainSchema, buildBrainOutputSchema, buildBrainHandler, } from '../tools/build-brain.js';
|
|
5
|
+
import { saveBrainProfileSchema, saveBrainProfileOutputSchema, saveBrainProfileHandler, deleteBrainSchema, deleteBrainOutputSchema, deleteBrainHandler, } from '../tools/manage-brain.js';
|
|
6
|
+
/** Channel brains. Local like the library, and for the same reason: a brain is tens of megabytes of one user's reading, and in HTTP mode any client could fill the server's disk by naming a channel. */
|
|
7
|
+
export const brainTools = [
|
|
8
|
+
defineTool({
|
|
9
|
+
name: 'build_brain',
|
|
10
|
+
mode: 'stdio',
|
|
11
|
+
title: 'Build a Channel Brain',
|
|
12
|
+
description: "Read a channel's videos into a searchable corpus of timestamped passages, so you can later ask what its creator has said about anything. Long-running: several hundred videos is several hundred fetches. Safe to interrupt and call again — it continues where it stopped, and on a finished brain it picks up new uploads. The since and minDurationSeconds filters describe the brain, not just the call: narrowing one discards the passages of the videos it excludes, and widening it reads them again. Ask it questions with ask_brain.",
|
|
13
|
+
inputSchema: buildBrainSchema,
|
|
14
|
+
outputSchema: buildBrainOutputSchema,
|
|
15
|
+
annotations: {
|
|
16
|
+
readOnlyHint: false,
|
|
17
|
+
// A plain build only adds, but narrowing a filter drops the passages
|
|
18
|
+
// of videos it excludes, and a client should be able to ask first.
|
|
19
|
+
destructiveHint: true,
|
|
20
|
+
// Re-running converges on the same brain rather than duplicating
|
|
21
|
+
// anything: that is the same code path as resuming.
|
|
22
|
+
idempotentHint: true,
|
|
23
|
+
openWorldHint: true,
|
|
24
|
+
},
|
|
25
|
+
handler: buildBrainHandler,
|
|
26
|
+
}),
|
|
27
|
+
defineTool({
|
|
28
|
+
name: 'ask_brain',
|
|
29
|
+
mode: 'stdio',
|
|
30
|
+
title: 'Ask a Channel Brain',
|
|
31
|
+
description: 'Search everything a creator has said, across every video in their brain. Returns the passages that match, each with the timestamp and a link that opens the video at that moment, so every claim can be checked. Matches the words as spoken, so phrase the query the way the creator would say it. Requires build_brain first.',
|
|
32
|
+
inputSchema: askBrainSchema,
|
|
33
|
+
outputSchema: askBrainOutputSchema,
|
|
34
|
+
annotations: {
|
|
35
|
+
readOnlyHint: true,
|
|
36
|
+
destructiveHint: false,
|
|
37
|
+
idempotentHint: true,
|
|
38
|
+
openWorldHint: false,
|
|
39
|
+
},
|
|
40
|
+
handler: askBrainHandler,
|
|
41
|
+
}),
|
|
42
|
+
defineTool({
|
|
43
|
+
name: 'list_brains',
|
|
44
|
+
mode: 'stdio',
|
|
45
|
+
title: 'List Channel Brains',
|
|
46
|
+
description: 'List every channel brain built locally, with how much of each channel is indexed and whether a written profile exists.',
|
|
47
|
+
inputSchema: listBrainsSchema,
|
|
48
|
+
outputSchema: listBrainsOutputSchema,
|
|
49
|
+
annotations: {
|
|
50
|
+
readOnlyHint: true,
|
|
51
|
+
destructiveHint: false,
|
|
52
|
+
idempotentHint: true,
|
|
53
|
+
openWorldHint: false,
|
|
54
|
+
},
|
|
55
|
+
handler: listBrainsHandler,
|
|
56
|
+
}),
|
|
57
|
+
defineTool({
|
|
58
|
+
name: 'get_brain_info',
|
|
59
|
+
mode: 'stdio',
|
|
60
|
+
title: 'Get Channel Brain Details',
|
|
61
|
+
description: "What a brain actually covers: how many videos were read, how many had no captions, how many are still outstanding, the channel's upload rhythm and speaking rate, and the phrases it repeats across videos. Read this before trusting an answer built from ask_brain.",
|
|
62
|
+
inputSchema: getBrainInfoSchema,
|
|
63
|
+
outputSchema: getBrainInfoOutputSchema,
|
|
64
|
+
annotations: {
|
|
65
|
+
readOnlyHint: true,
|
|
66
|
+
destructiveHint: false,
|
|
67
|
+
idempotentHint: true,
|
|
68
|
+
openWorldHint: false,
|
|
69
|
+
},
|
|
70
|
+
handler: getBrainInfoHandler,
|
|
71
|
+
}),
|
|
72
|
+
defineTool({
|
|
73
|
+
name: 'save_brain_profile',
|
|
74
|
+
mode: 'stdio',
|
|
75
|
+
title: 'Save a Channel Brain Profile',
|
|
76
|
+
description: 'Store a written account of a creator alongside their brain — voice, recurring arguments, how their thinking has changed. Write it from passages returned by ask_brain and cite them, because this server cannot check a claim it was handed. Overwrites any existing profile for that channel.',
|
|
77
|
+
inputSchema: saveBrainProfileSchema,
|
|
78
|
+
outputSchema: saveBrainProfileOutputSchema,
|
|
79
|
+
annotations: {
|
|
80
|
+
readOnlyHint: false,
|
|
81
|
+
// Replaces the previous profile in place; the old text is not recoverable.
|
|
82
|
+
destructiveHint: true,
|
|
83
|
+
idempotentHint: true,
|
|
84
|
+
openWorldHint: false,
|
|
85
|
+
},
|
|
86
|
+
handler: saveBrainProfileHandler,
|
|
87
|
+
}),
|
|
88
|
+
defineTool({
|
|
89
|
+
name: 'delete_brain',
|
|
90
|
+
mode: 'stdio',
|
|
91
|
+
title: 'Delete a Channel Brain',
|
|
92
|
+
description: 'Permanently delete a channel brain: its passages, its manifest and its profile. The transcripts it was built from stay cached, so rebuilding is much faster than the first build was.',
|
|
93
|
+
inputSchema: deleteBrainSchema,
|
|
94
|
+
outputSchema: deleteBrainOutputSchema,
|
|
95
|
+
annotations: {
|
|
96
|
+
readOnlyHint: false,
|
|
97
|
+
destructiveHint: true,
|
|
98
|
+
idempotentHint: true,
|
|
99
|
+
openWorldHint: false,
|
|
100
|
+
},
|
|
101
|
+
handler: deleteBrainHandler,
|
|
102
|
+
}),
|
|
103
|
+
];
|
|
104
|
+
//# sourceMappingURL=brain-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brain-tools.js","sourceRoot":"","sources":["../../src/registry/brain-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAuB,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAC5B,uBAAuB,EACvB,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAElC,yMAAyM;AACzM,MAAM,CAAC,MAAM,UAAU,GAAqB;IAC1C,UAAU,CAAC;QACT,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EACT,ghBAAghB;QAClhB,WAAW,EAAE,gBAAgB;QAC7B,YAAY,EAAE,sBAAsB;QACpC,WAAW,EAAE;YACX,YAAY,EAAE,KAAK;YACnB,qEAAqE;YACrE,mEAAmE;YACnE,eAAe,EAAE,IAAI;YACrB,iEAAiE;YACjE,oDAAoD;YACpD,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;QACD,OAAO,EAAE,iBAAiB;KAC3B,CAAC;IACF,UAAU,CAAC;QACT,IAAI,EAAE,WAAW;QACjB,IAAI,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rB;QACD,OAAO,EAAE,uBAAuB;KACjC,CAAC;IACF,UAAU,CAAC;QACT,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EACT,uLAAuL;QACzL,WAAW,EAAE,iBAAiB;QAC9B,YAAY,EAAE,uBAAuB;QACrC,WAAW,EAAE;YACX,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,IAAI;YACrB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,KAAK;SACrB;QACD,OAAO,EAAE,kBAAkB;KAC5B,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel-tools.d.ts","sourceRoot":"","sources":["../../src/registry/channel-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAiB7D,2CAA2C;AAC3C,eAAO,MAAM,YAAY,EAAE,cAAc,EAiDxC,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineTool } from './types.js';
|
|
2
|
+
import { getChannelInfoSchema, getChannelInfoOutputSchema, getChannelInfoHandler, } from '../tools/get-channel-info.js';
|
|
3
|
+
import { getPlaylistInfoSchema, getPlaylistInfoOutputSchema, getPlaylistInfoHandler, } from '../tools/get-playlist-info.js';
|
|
4
|
+
import { searchChannelsSchema, searchChannelsOutputSchema, searchChannelsHandler, } from '../tools/search-channels.js';
|
|
5
|
+
/** Channels and playlists. Remote-safe. */
|
|
6
|
+
export const channelTools = [
|
|
7
|
+
defineTool({
|
|
8
|
+
name: 'get_channel_info',
|
|
9
|
+
mode: 'all',
|
|
10
|
+
title: 'Get YouTube Channel Info',
|
|
11
|
+
description: 'Get metadata for a YouTube channel. Returns channel name, handle, subscriber count, description, and channel URL.',
|
|
12
|
+
inputSchema: getChannelInfoSchema,
|
|
13
|
+
outputSchema: getChannelInfoOutputSchema,
|
|
14
|
+
annotations: {
|
|
15
|
+
readOnlyHint: true,
|
|
16
|
+
destructiveHint: false,
|
|
17
|
+
idempotentHint: true,
|
|
18
|
+
openWorldHint: true,
|
|
19
|
+
},
|
|
20
|
+
handler: getChannelInfoHandler,
|
|
21
|
+
}),
|
|
22
|
+
defineTool({
|
|
23
|
+
name: 'search_channels',
|
|
24
|
+
mode: 'all',
|
|
25
|
+
title: 'Search YouTube Channels',
|
|
26
|
+
description: 'Search YouTube for channels by keyword or phrase. Returns channel names, handles, subscriber counts, descriptions, and URLs.',
|
|
27
|
+
inputSchema: searchChannelsSchema,
|
|
28
|
+
outputSchema: searchChannelsOutputSchema,
|
|
29
|
+
annotations: {
|
|
30
|
+
readOnlyHint: true,
|
|
31
|
+
destructiveHint: false,
|
|
32
|
+
idempotentHint: true,
|
|
33
|
+
openWorldHint: true,
|
|
34
|
+
},
|
|
35
|
+
handler: searchChannelsHandler,
|
|
36
|
+
}),
|
|
37
|
+
defineTool({
|
|
38
|
+
name: 'get_playlist_info',
|
|
39
|
+
mode: 'all',
|
|
40
|
+
title: 'Get YouTube Playlist Info',
|
|
41
|
+
description: 'Get metadata for a YouTube playlist. Returns title, channel, video count, last updated date, and description.',
|
|
42
|
+
inputSchema: getPlaylistInfoSchema,
|
|
43
|
+
outputSchema: getPlaylistInfoOutputSchema,
|
|
44
|
+
annotations: {
|
|
45
|
+
readOnlyHint: true,
|
|
46
|
+
destructiveHint: false,
|
|
47
|
+
idempotentHint: true,
|
|
48
|
+
openWorldHint: true,
|
|
49
|
+
},
|
|
50
|
+
handler: getPlaylistInfoHandler,
|
|
51
|
+
}),
|
|
52
|
+
];
|
|
53
|
+
//# sourceMappingURL=channel-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel-tools.js","sourceRoot":"","sources":["../../src/registry/channel-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAuB,MAAM,YAAY,CAAC;AAC7D,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1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AAC;CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health-tools.d.ts","sourceRoot":"","sources":["../../src/registry/health-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAO7D,gCAAgC;AAChC,eAAO,MAAM,WAAW,EAAE,cAAc,EAiBvC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineTool } from './types.js';
|
|
2
|
+
import { checkHealthSchema, checkHealthOutputSchema, checkHealthHandler, } from '../tools/check-health.js';
|
|
3
|
+
/** Diagnostics. Remote-safe. */
|
|
4
|
+
export const healthTools = [
|
|
5
|
+
defineTool({
|
|
6
|
+
name: 'check_health',
|
|
7
|
+
mode: 'all',
|
|
8
|
+
title: 'Check Server Health',
|
|
9
|
+
description: 'Report whether yt-dlp and ffmpeg are installed, their versions, and whether yt-dlp is stale. Call this first when tools start failing unexpectedly — an outdated yt-dlp is the most common cause.',
|
|
10
|
+
inputSchema: checkHealthSchema,
|
|
11
|
+
outputSchema: checkHealthOutputSchema,
|
|
12
|
+
annotations: {
|
|
13
|
+
readOnlyHint: true,
|
|
14
|
+
destructiveHint: false,
|
|
15
|
+
idempotentHint: true,
|
|
16
|
+
openWorldHint: false,
|
|
17
|
+
},
|
|
18
|
+
handler: checkHealthHandler,
|
|
19
|
+
}),
|
|
20
|
+
];
|
|
21
|
+
//# sourceMappingURL=health-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health-tools.js","sourceRoot":"","sources":["../../src/registry/health-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAuB,MAAM,YAAY,CAAC;AAC7D,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAElC,gCAAgC;AAChC,MAAM,CAAC,MAAM,WAAW,GAAqB;IAC3C,UAAU,CAAC;QACT,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EACT,mMAAmM;QACrM,WAAW,EAAE,iBAAiB;QAC9B,YAAY,EAAE,uBAAuB;QACrC,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,KAAK;SACrB;QACD,OAAO,EAAE,kBAAkB;KAC5B,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import type { ToolDefinition } from './types.js';
|
|
3
|
+
export type { ToolDefinition, ToolMode } from './types.js';
|
|
4
|
+
/** Every tool the server can offer, in the order clients see them. */
|
|
5
|
+
export declare const TOOLS: ToolDefinition[];
|
|
6
|
+
/** Registers the tools the transport may carry: everything on stdio, remote-safe ones over HTTP. */
|
|
7
|
+
export declare function registerTools(server: McpServer, mode: 'stdio' | 'http'): void;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AASzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3D,sEAAsE;AACtE,eAAO,MAAM,KAAK,EAAE,cAAc,EASjC,CAAC;AAEF,oGAAoG;AACpG,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAI7E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { brainTools } from './brain-tools.js';
|
|
2
|
+
import { channelTools } from './channel-tools.js';
|
|
3
|
+
import { healthTools } from './health-tools.js';
|
|
4
|
+
import { libraryTools } from './library-tools.js';
|
|
5
|
+
import { mediaTools } from './media-tools.js';
|
|
6
|
+
import { thumbnailTools } from './thumbnail-tools.js';
|
|
7
|
+
import { transcriptTools } from './transcript-tools.js';
|
|
8
|
+
import { videoTools } from './video-tools.js';
|
|
9
|
+
/** Every tool the server can offer, in the order clients see them. */
|
|
10
|
+
export const TOOLS = [
|
|
11
|
+
...videoTools,
|
|
12
|
+
...channelTools,
|
|
13
|
+
...transcriptTools,
|
|
14
|
+
...healthTools,
|
|
15
|
+
...libraryTools,
|
|
16
|
+
...mediaTools,
|
|
17
|
+
...brainTools,
|
|
18
|
+
...thumbnailTools,
|
|
19
|
+
];
|
|
20
|
+
/** Registers the tools the transport may carry: everything on stdio, remote-safe ones over HTTP. */
|
|
21
|
+
export function registerTools(server, mode) {
|
|
22
|
+
for (const tool of TOOLS) {
|
|
23
|
+
if (tool.mode === 'all' || mode === 'stdio')
|
|
24
|
+
tool.register(server, mode);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAK9C,sEAAsE;AACtE,MAAM,CAAC,MAAM,KAAK,GAAqB;IACrC,GAAG,UAAU;IACb,GAAG,YAAY;IACf,GAAG,eAAe;IAClB,GAAG,WAAW;IACd,GAAG,YAAY;IACf,GAAG,UAAU;IACb,GAAG,UAAU;IACb,GAAG,cAAc;CAClB,CAAC;AAEF,oGAAoG;AACpG,MAAM,UAAU,aAAa,CAAC,MAAiB,EAAE,IAAsB;IACrE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,OAAO;YAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-tools.d.ts","sourceRoot":"","sources":["../../src/registry/library-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AA6B7D,qFAAqF;AACrF,eAAO,MAAM,YAAY,EAAE,cAAc,EAoHxC,CAAC"}
|