mcp-scraper 0.50.0 → 0.51.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.
@@ -11,7 +11,7 @@ import "../chunk-G3P3ZDB4.js";
11
11
  import "../chunk-3ZUBQQPQ.js";
12
12
  import {
13
13
  PACKAGE_VERSION
14
- } from "../chunk-C7NN57WH.js";
14
+ } from "../chunk-73MUQSWC.js";
15
15
 
16
16
  // src/cli/human-cli.ts
17
17
  import { Command } from "commander";
@@ -107,7 +107,7 @@ function renderInstallTerminal(options) {
107
107
  }
108
108
 
109
109
  // src/version.ts
110
- var PACKAGE_VERSION = "0.50.0";
110
+ var PACKAGE_VERSION = "0.51.0";
111
111
 
112
112
  // bin/mcp-scraper-install.ts
113
113
  var noColor = process.argv.includes("--no-color") || process.env.NO_COLOR !== void 0 || process.env.FORCE_COLOR === "0" || !process.stdout.isTTY;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/install-terminal.ts","../../src/version.ts","../../bin/mcp-scraper-install.ts"],"sourcesContent":["export interface InstallTerminalOptions {\n color?: boolean\n version: string\n apiKeyConfigured?: boolean\n}\n\ntype Tone = 'cyan' | 'lime' | 'amber' | 'red' | 'muted' | 'bold'\n\nconst CODES: Record<Tone | 'reset', string> = {\n reset: '\\x1b[0m',\n cyan: '\\x1b[36m',\n lime: '\\x1b[32m',\n amber: '\\x1b[33m',\n red: '\\x1b[31m',\n muted: '\\x1b[90m',\n bold: '\\x1b[1m',\n}\n\nfunction colorize(value: string, tone: Tone, enabled: boolean): string {\n if (!enabled) return value\n return `${CODES[tone]}${value}${CODES.reset}`\n}\n\nfunction toolRow(label: string, tools: string[], enabled: boolean): string {\n const padded = label.padEnd(9, ' ')\n return ` ${colorize(padded, 'muted', enabled)} ${tools.join(colorize(' . ', 'muted', enabled))}`\n}\n\nexport function renderInstallTerminal(options: InstallTerminalOptions): string {\n const color = options.color ?? true\n const apiKeyValue = options.apiKeyConfigured ? '$MCP_SCRAPER_API_KEY' : 'sk_live_your_key'\n const ascii = String.raw`\n __ __ ____ ____ \n| \\/ |/ ___| _ \\\n| |\\/| | | | |_) |\n| | | | |___| __/\n|_| |_|\\____|_|\n\n ____ ____ ____ _ ____ _____ ____\n/ ___| / ___| _ \\ / \\ | _ \\| ____| _ \\\n\\___ \\| | | |_) | / _ \\ | |_) | _| | |_) |\n ___) | |___| _ < / ___ \\| __/| |___| _ <\n|____/ \\____|_| \\_\\/_/ \\_\\_| |_____|_| \\_\\\n`\n\n const claudeCommand = [\n `MCP_SCRAPER_API_KEY=${apiKeyValue} npx -y -p mcp-scraper@latest \\\\`,\n ' mcp-scraper-cli agent install claude --apply',\n ].join('\\n')\n\n const codexConfig = [\n '[mcp_servers.mcp-scraper]',\n 'command = \"npx\"',\n 'args = [\"-y\", \"-p\", \"mcp-scraper@latest\", \"mcp-scraper\"]',\n `env = { MCP_SCRAPER_API_KEY = \"${apiKeyValue}\" }`,\n ].join('\\n')\n\n return [\n colorize(`mcp-scraper v${options.version}`, 'bold', color),\n colorize('> mcp-scraper-install', 'muted', color),\n colorize(ascii, 'amber', color),\n `${colorize('MCP Scraper Agent', 'cyan', color)} . v${options.version} . mcpscraper.dev`,\n '1/1 install surfaces ready',\n colorize('Newest: any approved connection read can become an indexed Memory snapshot in one call. OAuth stays tenant-isolated and provider content is redacted and marked untrusted.', 'lime', color),\n '',\n `${colorize('Tools', 'cyan', color)} ${colorize('(246 MCP tools)', 'muted', color)}`,\n toolRow('search', ['harvest_paa', 'search_serp', 'maps_search', 'maps_place_intel'], color),\n toolRow('extract', ['extract_url', 'map_site_urls', 'extract_site', 'audit_site', 'directory_workflow'], color),\n toolRow('build', ['create_editorial_reading_room', 'rank_tracker_workflow', 'portable HTML'], color),\n toolRow('media', ['youtube_harvest', 'youtube_transcribe', 'facebook_ad_search', 'facebook_page_intel', 'facebook_ad_transcribe', 'facebook_video_transcribe', 'instagram_profile_content', 'instagram_media_download', 'reddit_thread'], color),\n toolRow('browser', ['browser_open', 'browser_profile_connect', 'browser_profile_list', 'browser_close', 'browser_screenshot', 'browser_read', 'browser_locate', 'browser_replay_mark', 'browser_replay_annotate'], color),\n toolRow('connect', ['list_service_connections', 'describe_service_connection_tool', 'import_service_connection_to_memory', 'export_connected_service_data', 'renew_connected_data_download', 'read_service_connection', 'call_service_connection_action'], color),\n toolRow('commons', ['commons_search_entities', 'commons_get_entity_linkset', 'commons_prepare_entity', 'commons_submit_entity', 'commons_prepare_publication', 'commons_claim_publication', 'commons_publish_editorial', 'commons_get_publication'], color),\n toolRow('account', ['credits_info', 'reports', 'MCP resources'], color),\n toolRow('memory', ['memory-put', 'memory-get', 'memory-search', 'list-vaults', 'record-fact', 'list-scheduled-actions'], color),\n `${colorize('Workflows', 'cyan', color)} ${colorize('(MCP + CLI + API)', 'muted', color)}`,\n toolRow('route', ['workflow_list', 'workflow_suggest', 'workflow_run', 'workflow_step', 'workflow_status', 'workflow_artifact_read'], color),\n toolRow('seo', ['directory', 'agent-packet', 'competitive audit', 'map/serp comparison', 'PAA/AIO briefs', 'scheduled runs'], color),\n '',\n colorize('Usage tips:', 'amber', color),\n 'Run mcp-scraper-install for this visible card. Run mcp-scraper-cli for setup utilities and subcommands.',\n 'Run mcp-scraper in a human terminal to print this card; MCP clients get the same command as a silent stdio server.',\n 'Explicit card command: npx -y -p mcp-scraper@latest mcp-scraper-install',\n 'Hosted browser sessions use direct/no-proxy egress by default.',\n 'Customer auth setup: run browser_profile_connect, send the watch_url, let the user sign in, then call browser_profile_list until AUTHENTICATED.',\n 'Connected account ranges: call export_connected_service_data once. It handles Gmail, Calendar, Zoom, and Resend pagination; do not loop read_service_connection over individual records.',\n 'Connected account RAG: call import_service_connection_to_memory for one bounded approved read. It writes a redacted, untrusted snapshot to a stable Memory path and embeds it for search.',\n 'Stack logins / reconnect: run browser_profile_connect again with the same profile name and another domain to add accounts or refresh a login.',\n 'Start with workflow_suggest for broad jobs like market analysis, ICP research, CRO audits, brand briefs, content gaps, and AI visibility.',\n 'For MCP clients, use mcp-scraper so one install can mix SERP, Maps, browser, reports, and saved MCP resources.',\n 'If you hit the concurrency limit, add an extra slot for $5/month with mcp-scraper-cli billing concurrency checkout.',\n '',\n `${colorize('Ready.', 'lime', color)} Install the combined MCP server with one command:`,\n '',\n colorize('Setup doctor', 'amber', color),\n 'npx -y -p mcp-scraper@latest mcp-scraper-cli doctor',\n '',\n colorize('Hosted profile setup', 'amber', color),\n 'In your MCP client, call browser_profile_connect with email=\"seo@example.com\" and domain=\"chatgpt.com\".',\n 'Give the returned watch_url to the user. After they sign in, call browser_profile_list, then browser_open with the returned profile. Add more logins by calling browser_profile_connect again with the same profile and a new domain.',\n '',\n colorize('Claude Code one-command setup', 'amber', color),\n claudeCommand,\n 'Then fully exit Claude Code and open a new Claude terminal. Check with: claude mcp list',\n '',\n colorize('Codex config', 'amber', color),\n codexConfig,\n '',\n colorize('Claude Desktop Extension', 'amber', color),\n 'Download: https://mcpscraper.dev/downloads/mcp-scraper.mcpb',\n '',\n colorize('Safety note:', 'muted', color),\n 'mcp-scraper prints this card only when stdin/stdout are an interactive TTY. In MCP clients it writes only JSON-RPC to stdout.',\n 'Use --stdio or MCP_SCRAPER_FORCE_STDIO=1 to force server mode from a terminal.',\n '',\n ].join('\\n')\n}\n","export const PACKAGE_VERSION = '0.50.0'\n","#!/usr/bin/env node\nimport { renderInstallTerminal } from '../src/install-terminal.js'\nimport { PACKAGE_VERSION } from '../src/version.js'\n\nconst noColor =\n process.argv.includes('--no-color') ||\n process.env.NO_COLOR !== undefined ||\n process.env.FORCE_COLOR === '0' ||\n !process.stdout.isTTY\n\nconst help = process.argv.includes('--help') || process.argv.includes('-h')\nif (help) {\n process.stdout.write([\n 'Usage: mcp-scraper-install [--no-color]',\n '',\n 'Prints the branded MCP Scraper terminal install card and copyable install commands.',\n 'mcp-scraper prints the same card in a human terminal and runs as the MCP stdio server in clients.',\n '',\n ].join('\\n'))\n process.exit(0)\n}\n\nprocess.stdout.write(renderInstallTer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../src/version.ts","../../bin/mcp-scraper-install.ts"],"sourcesContent":["export interface InstallTerminalOptions {\n color?: boolean\n version: string\n apiKeyConfigured?: boolean\n}\n\ntype Tone = 'cyan' | 'lime' | 'amber' | 'red' | 'muted' | 'bold'\n\nconst CODES: Record<Tone | 'reset', string> = {\n reset: '\\x1b[0m',\n cyan: '\\x1b[36m',\n lime: '\\x1b[32m',\n amber: '\\x1b[33m',\n red: '\\x1b[31m',\n muted: '\\x1b[90m',\n bold: '\\x1b[1m',\n}\n\nfunction colorize(value: string, tone: Tone, enabled: boolean): string {\n if (!enabled) return value\n return `${CODES[tone]}${value}${CODES.reset}`\n}\n\nfunction toolRow(label: string, tools: string[], enabled: boolean): string {\n const padded = label.padEnd(9, ' ')\n return ` ${colorize(padded, 'muted', enabled)} ${tools.join(colorize(' . ', 'muted', enabled))}`\n}\n\nexport function renderInstallTerminal(options: InstallTerminalOptions): string {\n const color = options.color ?? true\n const apiKeyValue = options.apiKeyConfigured ? '$MCP_SCRAPER_API_KEY' : 'sk_live_your_key'\n const ascii = String.raw`\n __ __ ____ ____ \n| \\/ |/ ___| _ \\\n| |\\/| | | | |_) |\n| | | | |___| __/\n|_| |_|\\____|_|\n\n ____ ____ ____ _ ____ _____ ____\n/ ___| / ___| _ \\ / \\ | _ \\| ____| _ \\\n\\___ \\| | | |_) | / _ \\ | |_) | _| | |_) |\n ___) | |___| _ < / ___ \\| __/| |___| _ <\n|____/ \\____|_| \\_\\/_/ \\_\\_| |_____|_| \\_\\\n`\n\n const claudeCommand = [\n `MCP_SCRAPER_API_KEY=${apiKeyValue} npx -y -p mcp-scraper@latest \\\\`,\n ' mcp-scraper-cli agent install claude --apply',\n ].join('\\n')\n\n const codexConfig = [\n '[mcp_servers.mcp-scraper]',\n 'command = \"npx\"',\n 'args = [\"-y\", \"-p\", \"mcp-scraper@latest\", \"mcp-scraper\"]',\n `env = { MCP_SCRAPER_API_KEY = \"${apiKeyValue}\" }`,\n ].join('\\n')\n\n return [\n colorize(`mcp-scraper v${options.version}`, 'bold', color),\n colorize('> mcp-scraper-install', 'muted', color),\n colorize(ascii, 'amber', color),\n `${colorize('MCP Scraper Agent', 'cyan', color)} . v${options.version} . mcpscraper.dev`,\n '1/1 install surfaces ready',\n colorize('Newest: any approved connection read can become an indexed Memory snapshot in one call. OAuth stays tenant-isolated and provider content is redacted and marked untrusted.', 'lime', color),\n '',\n `${colorize('Tools', 'cyan', color)} ${colorize('(246 MCP tools)', 'muted', color)}`,\n toolRow('search', ['harvest_paa', 'search_serp', 'maps_search', 'maps_place_intel'], color),\n toolRow('extract', ['extract_url', 'map_site_urls', 'extract_site', 'audit_site', 'directory_workflow'], color),\n toolRow('build', ['create_editorial_reading_room', 'rank_tracker_workflow', 'portable HTML'], color),\n toolRow('media', ['youtube_harvest', 'youtube_transcribe', 'facebook_ad_search', 'facebook_page_intel', 'facebook_ad_transcribe', 'facebook_video_transcribe', 'instagram_profile_content', 'instagram_media_download', 'reddit_thread'], color),\n toolRow('browser', ['browser_open', 'browser_profile_connect', 'browser_profile_list', 'browser_close', 'browser_screenshot', 'browser_read', 'browser_locate', 'browser_replay_mark', 'browser_replay_annotate'], color),\n toolRow('connect', ['list_service_connections', 'describe_service_connection_tool', 'import_service_connection_to_memory', 'export_connected_service_data', 'renew_connected_data_download', 'read_service_connection', 'call_service_connection_action'], color),\n toolRow('commons', ['commons_search_entities', 'commons_get_entity_linkset', 'commons_prepare_entity', 'commons_submit_entity', 'commons_prepare_publication', 'commons_claim_publication', 'commons_publish_editorial', 'commons_get_publication'], color),\n toolRow('account', ['credits_info', 'reports', 'MCP resources'], color),\n toolRow('memory', ['memory-put', 'memory-get', 'memory-search', 'list-vaults', 'record-fact', 'list-scheduled-actions'], color),\n `${colorize('Workflows', 'cyan', color)} ${colorize('(MCP + CLI + API)', 'muted', color)}`,\n toolRow('route', ['workflow_list', 'workflow_suggest', 'workflow_run', 'workflow_step', 'workflow_status', 'workflow_artifact_read'], color),\n toolRow('seo', ['directory', 'agent-packet', 'competitive audit', 'map/serp comparison', 'PAA/AIO briefs', 'scheduled runs'], color),\n '',\n colorize('Usage tips:', 'amber', color),\n 'Run mcp-scraper-install for this visible card. Run mcp-scraper-cli for setup utilities and subcommands.',\n 'Run mcp-scraper in a human terminal to print this card; MCP clients get the same command as a silent stdio server.',\n 'Explicit card command: npx -y -p mcp-scraper@latest mcp-scraper-install',\n 'Hosted browser sessions use direct/no-proxy egress by default.',\n 'Customer auth setup: run browser_profile_connect, send the watch_url, let the user sign in, then call browser_profile_list until AUTHENTICATED.',\n 'Connected account ranges: call export_connected_service_data once. It handles Gmail, Calendar, Zoom, and Resend pagination; do not loop read_service_connection over individual records.',\n 'Connected account RAG: call import_service_connection_to_memory for one bounded approved read. It writes a redacted, untrusted snapshot to a stable Memory path and embeds it for search.',\n 'Stack logins / reconnect: run browser_profile_connect again with the same profile name and another domain to add accounts or refresh a login.',\n 'Start with workflow_suggest for broad jobs like market analysis, ICP research, CRO audits, brand briefs, content gaps, and AI visibility.',\n 'For MCP clients, use mcp-scraper so one install can mix SERP, Maps, browser, reports, and saved MCP resources.',\n 'If you hit the concurrency limit, add an extra slot for $5/month with mcp-scraper-cli billing concurrency checkout.',\n '',\n `${colorize('Ready.', 'lime', color)} Install the combined MCP server with one command:`,\n '',\n colorize('Setup doctor', 'amber', color),\n 'npx -y -p mcp-scraper@latest mcp-scraper-cli doctor',\n '',\n colorize('Hosted profile setup', 'amber', color),\n 'In your MCP client, call browser_profile_connect with email=\"seo@example.com\" and domain=\"chatgpt.com\".',\n 'Give the returned watch_url to the user. After they sign in, call browser_profile_list, then browser_open with the returned profile. Add more logins by calling browser_profile_connect again with the same profile and a new domain.',\n '',\n colorize('Claude Code one-command setup', 'amber', color),\n claudeCommand,\n 'Then fully exit Claude Code and open a new Claude terminal. Check with: claude mcp list',\n '',\n colorize('Codex config', 'amber', color),\n codexConfig,\n '',\n colorize('Claude Desktop Extension', 'amber', color),\n 'Download: https://mcpscraper.dev/downloads/mcp-scraper.mcpb',\n '',\n colorize('Safety note:', 'muted', color),\n 'mcp-scraper prints this card only when stdin/stdout are an interactive TTY. In MCP clients it writes only JSON-RPC to stdout.',\n 'Use --stdio or MCP_SCRAPER_FORCE_STDIO=1 to force server mode from a terminal.',\n '',\n ].join('\\n')\n}\n","export const PACKAGE_VERSION = '0.51.0'\n","#!/usr/bin/env node\nimport { renderInstallTerminal } from '../src/install-terminal.js'\nimport { PACKAGE_VERSION } from '../src/version.js'\n\nconst noColor =\n process.argv.includes('--no-color') ||\n process.env.NO_COLOR !== undefined ||\n process.env.FORCE_COLOR === '0' ||\n !process.stdout.isTTY\n\nconst help = process.argv.includes('--help') || process.argv.includes('-h')\nif (help) {\n process.stdout.write([\n 'Usage: mcp-scraper-install [--no-color]',\n '',\n 'Prints the branded MCP Scraper terminal install card and copyable install commands.',\n 'mcp-scraper prints the same card in a human terminal and runs as the MCP stdio server in clients.',\n '',\n ].join('\\n'))\n process.exit(0)\n}\n\nprocess.stdout.write(renderInstallTerminal({\n version: PACKAGE_VERSION,\n color: !noColor,\n apiKeyConfigured: Boolean(process.env.MCP_SCRAPER_API_KEY?.trim()),\n}))\n"],"mappings":";;;;AAQA,IAAM,QAAwC;AAAA,EAC5C,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AACR;AAEA,SAAS,SAAS,OAAe,MAAY,SAA0B;AACrE,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO,GAAG,MAAM,IAAI,CAAC,GAAG,KAAK,GAAG,MAAM,KAAK;AAC7C;AAEA,SAAS,QAAQ,OAAe,OAAiB,SAA0B;AACzE,QAAM,SAAS,MAAM,OAAO,GAAG,GAAG;AAClC,SAAO,KAAK,SAAS,QAAQ,SAAS,OAAO,CAAC,IAAI,MAAM,KAAK,SAAS,SAAS,SAAS,OAAO,CAAC,CAAC;AACnG;AAEO,SAAS,sBAAsB,SAAyC;AAC7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A,EACF,EAAE,KAAK,IAAI;AACb;;;ACpHO,IAAM,kBAAkB;;;ACI/B,IAAM,UACJ,QAAQ,KAAK,SAAS,YAAY,KAClC,QAAQ,IAAI,aAAa,UACzB,QAAQ,IAAI,gBAAgB,OAC5B,CAAC,QAAQ,OAAO;AAElB,IAAM,OAAO,QAAQ,KAAK,SAAS,QAAQ,KAAK,QAAQ,KAAK,SAAS,IAAI;AAC1E,IAAI,MAAM;AACR,UAAQ,OAAO,MAAM;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,KAAK,IAAI,CAAC;AACZ,UAAQ,KAAK,CAAC;AAChB;AAEA,QAAQ,OAAO,MAAM,sBAAsB;AAAA,EACzC,SAAS;AAAA,EACT,OAAO,CAAC;AAAA,EACR,kBAAkB,QAAQ,QAAQ,IAAI,qBAAqB,KAAK,CAAC;AACnE,CAAC,CAAC;","names":[]}
@@ -4,7 +4,7 @@ import {
4
4
  } from "../chunk-QH63IZTX.js";
5
5
  import {
6
6
  PACKAGE_VERSION
7
- } from "../chunk-C7NN57WH.js";
7
+ } from "../chunk-73MUQSWC.js";
8
8
 
9
9
  // bin/mcp-scraper-install.ts
10
10
  var noColor = process.argv.includes("--no-color") || process.env.NO_COLOR !== void 0 || process.env.FORCE_COLOR === "0" || !process.stdout.isTTY;
@@ -979,7 +979,7 @@ render();
979
979
  }
980
980
 
981
981
  // src/version.ts
982
- var PACKAGE_VERSION = "0.50.0";
982
+ var PACKAGE_VERSION = "0.51.0";
983
983
 
984
984
  // src/mcp/browser-agent-tool-schemas.ts
985
985
  var import_zod = require("zod");
@@ -5517,7 +5517,8 @@ ${t.topQuestions.map((q) => `- ${q}`).join("\n")}` : ""
5517
5517
  ${q.threadUrl}` : ""}`).join("\n");
5518
5518
  const full = [
5519
5519
  `# Reddit Trending: "${d.topic || input.topic}"${subreddit ? ` in r/${subreddit}` : ""}`,
5520
- `**${totals.threads} threads \xB7 ${totals.upvotes} upvotes \xB7 ${totals.comments} comments** \xB7 last ${d.window === "7d" ? "week" : "month"} \xB7 ${d.threadsScraped ?? 0} of ${d.candidatesFound ?? threads.length} discovered scraped${d.partial ? " (partial \u2014 hit the time limit)" : ""}`,
5520
+ `**${totals.threads} threads \xB7 ${totals.upvotes} upvotes \xB7 ${totals.comments} comments** \xB7 last ${d.window === "7d" ? "week" : "month"} \xB7 ${d.threadsScraped ?? 0} of ${d.candidatesFound ?? threads.length} discovered scraped${d.partial ? " (partial)" : ""}`,
5521
+ d.degradedResult ? `**Discovery degraded:** ${(d.degradationReasons ?? []).join(", ") || "no usable discovery surface"}${d.retryRecommended ? " \xB7 retry recommended" : ""}${d.billingRefunded ? " \xB7 discovery charge refunded" : ""}` : d.discoverySource === "reddit_search_fallback" ? "**Discovery fallback:** direct Reddit search was used after the primary SERP returned no usable threads." : "",
5521
5522
  `
5522
5523
  ## Ranked threads
5523
5524
  ${threadBlocks || "_No threads found._"}`,
@@ -5549,7 +5550,13 @@ ${questionList || "_No questions extracted._"}`,
5549
5550
  threadsScraped: Number(d.threadsScraped ?? 0),
5550
5551
  candidatesFound: Number(d.candidatesFound ?? threads.length),
5551
5552
  partial: Boolean(d.partial),
5552
- searchQuery: d.searchQuery ?? ""
5553
+ searchQuery: d.searchQuery ?? "",
5554
+ discoverySource: d.discoverySource ?? "google_serp",
5555
+ resultQuality: d.resultQuality ?? "complete",
5556
+ degradedResult: Boolean(d.degradedResult),
5557
+ degradationReasons: d.degradationReasons ?? [],
5558
+ retryRecommended: Boolean(d.retryRecommended),
5559
+ billingRefunded: Boolean(d.billingRefunded)
5553
5560
  }
5554
5561
  };
5555
5562
  }
@@ -7085,7 +7092,10 @@ seam is noted so you can chain them.
7085
7092
  handles Reddit's bot wall itself (no login needed). Find threads first with \`search_serp\` or \`reddit_trending\`.
7086
7093
  - DISCOVER what a niche is talking about (topic, no known thread) -> **reddit_trending** (takes a topic, optional
7087
7094
  subreddit; returns the last 30 days' top threads ranked by engagement plus the questions people asked \u2014
7088
- feed winning \`rankedThreads[].url\` values into \`reddit_thread\` for the full comment tree).
7095
+ feed winning \`rankedThreads[].url\` values into \`reddit_thread\` for the full comment tree). It uses bounded
7096
+ direct Reddit discovery when the primary SERP is empty. Before interpreting an empty result, inspect
7097
+ \`resultQuality\`, \`discoverySource\`, \`degradationReasons\`, \`retryRecommended\`, and \`billingRefunded\`;
7098
+ a degraded empty result is not evidence that the topic has no Reddit discussion.
7089
7099
 
7090
7100
  ## Other sites & logins (browser agent)
7091
7101
  For an arbitrary site or a logged-in dashboard with no dedicated tool, use the browser_* agent. **First
@@ -7135,6 +7145,12 @@ Multi-step orchestrations \u2014 prefer these over hand-chaining primitives when
7135
7145
  versioning reusable website templates; use the saved-template tools above for those jobs.
7136
7146
  - The creation tool is a renderer, not a research or writing model. Preserve source truth in each
7137
7147
  \`sourceLabel\`; do not hand it raw source material and expect it to invent the editorial architecture.
7148
+ - One edition may contain up to 100 articles. Images may appear as structured article/card heroes or as
7149
+ Markdown body images. Use \`site.ogImage\` for the collection social preview and \`article.ogImage\` for an
7150
+ article override; otherwise the article hero, then collection image, is reused. Every image requires useful
7151
+ alt text. Preserve caption, credit, source URL, and rights context when known; a reachable URL does not prove
7152
+ reuse rights. Static artifacts include collection OG tags and update article tags in-browser, while crawler-
7153
+ perfect per-article unfurls require the publishing host to serve article-specific metadata.
7138
7154
  - ${savesReportsLocally ? "This local stdio server writes one self-contained HTML file and returns its localPath so the user can open it." : "This hosted server creates a private seven-day HTML artifact and returns a signed download URL; use renew_editorial_reading_room_download after the URL expires."}
7139
7155
 
7140
7156
  ## Local Sourcebook listings
@@ -7226,6 +7242,17 @@ deliberate edits and migrations. Use
7226
7242
  they'll filter/sort by exact value. **memory-search** is meaning-based over full content (embeds, slower);
7227
7243
  **memory-list** filters one vault by kind/tags (fast, exact).
7228
7244
 
7245
+ Choose the read surface by completeness, not convenience. **list-vaults** is the account inventory and
7246
+ reports each vault's note count. **memory-list** returns the complete metadata inventory for one vault but
7247
+ no note bodies, plus a sorted complete folder inventory derived from those paths; use it to identify every
7248
+ stable \`vault + path\` address. **list-memory-tags** returns the
7249
+ complete account-wide canonical tag inventory, including aliases, usage counts, and per-vault distribution.
7250
+ **memory-search** returns ranked
7251
+ content chunks, not an exhaustive inventory or complete documents: deduplicate hits by vault/path and call
7252
+ **memory-get** for every note whose full meaning matters. When the user explicitly needs every full note for
7253
+ backup, migration, or corpus-wide audit, use **memory-export** one vault at a time; do not pull the entire
7254
+ corpus merely to edit one note.
7255
+
7229
7256
  For People, Deals, Projects, Tasks, and Communications, use the returned contract rather than guessing:
7230
7257
  People only holds a real person or organization hub. Its contact card uses \`phone\`, \`text_phone\`, and
7231
7258
  \`email\` for Call/Text/Email; \`memories\` for durable person context; and linked Deals, Projects,
@@ -7284,19 +7311,35 @@ Tags are live vocabulary, not improvised labels: **list-memory-tags** shows what
7284
7311
  reusable, and has no exact, alias, or near-equivalent. Use **memory-backlinks**,
7285
7312
  **memory-graph-universe**, and **memory-graph-path** to trace the linked universe across vaults.
7286
7313
 
7287
- **Always inspect the complete tag inventory and related notes first.** Use hybrid Smart RAG by default:
7314
+ **Always inspect the complete tag inventory and related notes first.** When the user wants to find, recall,
7315
+ understand, or connect something and does not already provide an exact vault/path, start with hybrid Smart
7316
+ RAG through **memory-search**. The exceptions are exhaustive inventory (**memory-list**), title-only lookup
7317
+ (**memory-suggest**), an exact known note (**memory-get**), and an explicit full-vault export (**memory-export**).
7318
+ For hybrid retrieval,
7288
7319
  form 3 focused queries (2\u20134 when useful), fuse exact tag/metadata/vault/date and semantic matches into 50
7289
7320
  candidates, expand the top 8 seeds by one link/backlink hop with at most 5 neighbors each, then Jina-rerank
7290
7321
  the combined pool to the best 30. Graph neighbors are candidates, never automatic links; add only links
7291
- supported by the note contents.
7322
+ supported by the note contents. A search hit is a discovery excerpt, not the note: call **memory-get** and read
7323
+ the complete note before relying on it for an answer, summary, edit, relationship, or durable write. Read the
7324
+ strong candidates, not every low-ranked hit.
7292
7325
 
7293
7326
  Scrape deposits are raw evidence and therefore go to **Library** through **library-ingest**, with the full
7294
7327
  Library template and source metadata. If the source contains durable applicable guidance, create a separate
7295
7328
  Knowledge companion through prepare-memory-write + memory-capture and link it to the Library source with
7296
7329
  derived_from; do not replace the raw source with the guide.
7297
7330
 
7298
- For an update, call **memory-get** first and pass its revision as baseRevision. Preserve the existing
7299
- title, source, capture time, content context, and props unless the request deliberately changes them.
7331
+ For an update, identify the existing note by its stable \`vault + path\`, call **memory-get** first, and pass
7332
+ its revision as \`baseRevision\`. **memory-put replaces the entire content body; it is not a text patch.**
7333
+ Merge the requested change into the full body returned by memory-get, then send that complete merged body.
7334
+ Its supplied \`props\` patch existing metadata, so omit unchanged props and use an empty array only when the
7335
+ user deliberately wants to clear a link list. Preserve the existing title, source, capture time, surrounding
7336
+ content, links, template sections, and unsupported uncertainty unless the request deliberately changes them.
7337
+ A title change does not create a new note identity; keep the path unless the user explicitly asks to move it.
7338
+ Never convert an edit into a new path just because search returned a similar title. If \`baseRevision\`
7339
+ conflicts, reconcile the returned current body with the requested change and retry against the new revision;
7340
+ do not resend the stale full body unchanged. Treat Agent Inbox, optimizer rollups, channel messages, and other
7341
+ system-managed notes through their purpose-built tools when available rather than rewriting their backing
7342
+ notes with memory-put.
7300
7343
  If a legacy backend does not return props, do not overwrite an existing linked note through that surface;
7301
7344
  report that link preservation cannot be proved. After the write, read it back and search a distinctive
7302
7345
  phrase to verify persistence and indexing.
@@ -8671,7 +8714,22 @@ var EditorialReadingRoomSiteSchema = import_zod6.z.object({
8671
8714
  issueLabel: import_zod6.z.string().trim().min(1).max(100).default("Current edition").describe("Issue, date, or collection label in the home-page issue line."),
8672
8715
  eyebrow: import_zod6.z.string().trim().min(1).max(120).default("A guided collection").describe("Short editorial eyebrow above the home-page headline."),
8673
8716
  heroTitle: import_zod6.z.string().trim().min(1).max(180).describe("Outcome-led home-page headline for the whole reading room."),
8674
- startLabel: import_zod6.z.string().trim().min(1).max(60).default("Start reading").describe("Label for the primary start-reading button.")
8717
+ startLabel: import_zod6.z.string().trim().min(1).max(60).default("Start reading").describe("Label for the primary start-reading button."),
8718
+ ogImage: import_zod6.z.object({
8719
+ url: import_zod6.z.string().url().refine((value) => /^https?:\/\//i.test(value), "Image URL must use HTTP or HTTPS.").describe("Public HTTP(S) image URL used for the reading-room home page social preview."),
8720
+ alt: import_zod6.z.string().trim().min(1).max(500).describe("Accessible description and og:image:alt text."),
8721
+ width: import_zod6.z.number().int().positive().optional().describe("Optional intrinsic width in pixels."),
8722
+ height: import_zod6.z.number().int().positive().optional().describe("Optional intrinsic height in pixels.")
8723
+ }).strict().optional().describe("Optional collection-level Open Graph image. Individual articles may override it.")
8724
+ }).strict();
8725
+ var EditorialReadingRoomImageSchema = import_zod6.z.object({
8726
+ url: import_zod6.z.string().url().refine((value) => /^https?:\/\//i.test(value), "Image URL must use HTTP or HTTPS.").describe("Public HTTP(S) image URL."),
8727
+ alt: import_zod6.z.string().trim().min(1).max(500).describe("Required accessible description of the image."),
8728
+ caption: import_zod6.z.string().trim().max(1e3).optional().describe("Optional visible caption."),
8729
+ credit: import_zod6.z.string().trim().max(500).optional().describe("Optional visible creator, publisher, or rights credit."),
8730
+ sourceUrl: import_zod6.z.string().url().refine((value) => /^https?:\/\//i.test(value), "Source URL must use HTTP or HTTPS.").optional().describe("Optional public HTTP(S) source page for provenance or rights context."),
8731
+ width: import_zod6.z.number().int().positive().optional().describe("Optional intrinsic width in pixels."),
8732
+ height: import_zod6.z.number().int().positive().optional().describe("Optional intrinsic height in pixels.")
8675
8733
  }).strict();
8676
8734
  var EditorialReadingRoomArticleSchema = import_zod6.z.object({
8677
8735
  slug: import_zod6.z.string().trim().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).max(80).describe("Unique kebab-case article identifier."),
@@ -8684,7 +8742,9 @@ var EditorialReadingRoomArticleSchema = import_zod6.z.object({
8684
8742
  sourceLabel: import_zod6.z.string().trim().min(1).max(500).describe("Visible provenance label naming the material this article was derived from. Do not invent a source."),
8685
8743
  revision: import_zod6.z.string().trim().min(1).max(80).optional().describe("Optional revision identifier or version label."),
8686
8744
  updatedAt: import_zod6.z.string().trim().min(1).max(80).optional().describe("Optional human-readable source update date."),
8687
- markdown: import_zod6.z.string().min(1).max(1e5).describe("Complete article body in Markdown. Use H2/H3 headings for jump links, short paragraphs, concrete examples, and tables only where they improve comparison.")
8745
+ image: EditorialReadingRoomImageSchema.optional().describe("Optional article image shown on cards and above the article body. Markdown images remain supported inside the body."),
8746
+ ogImage: EditorialReadingRoomImageSchema.optional().describe("Optional article-specific social preview image. Defaults to article.image, then site.ogImage."),
8747
+ markdown: import_zod6.z.string().min(1).max(1e5).describe("Complete article body in Markdown. Standard Markdown images are allowed with descriptive alt text. Use H2/H3 headings for jump links, short paragraphs, concrete examples, and tables only where they improve comparison.")
8688
8748
  }).strict();
8689
8749
  var EditorialReadingRoomGuideInputSchema = {
8690
8750
  focus: import_zod6.z.enum(["workflow", "content_contract", "example"]).default("workflow").describe("Which part of the reusable editorial-reading-room guide to return. Start with workflow; fetch the content contract or compact example only when needed.")
@@ -8697,7 +8757,7 @@ var EditorialReadingRoomGuideOutputSchema = {
8697
8757
  var CreateEditorialReadingRoomInputSchema = {
8698
8758
  site: EditorialReadingRoomSiteSchema,
8699
8759
  deck: import_zod6.z.string().trim().min(1).max(1e3).describe("Two or three sentences that explain the collection\u2019s value and scope without generic marketing language."),
8700
- articles: import_zod6.z.array(EditorialReadingRoomArticleSchema).min(1).max(40).describe("One to forty fully authored articles, with no more than 2,000,000 Markdown bytes combined. Read all in-scope source material before composing them; preserve distinctions, uncertainty, and provenance instead of flattening the corpus."),
8760
+ articles: import_zod6.z.array(EditorialReadingRoomArticleSchema).min(1).max(100).describe("One to one hundred fully authored articles, with no more than 2,000,000 Markdown bytes combined. Articles may include structured card/hero images, article-specific Open Graph images, and Markdown body images. Read all in-scope source material before composing them; preserve distinctions, uncertainty, image provenance, and rights context instead of flattening the corpus."),
8701
8761
  filename: import_zod6.z.string().trim().regex(/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/).max(120).optional().describe("Optional download filename. The server always normalizes it to a safe .html filename.")
8702
8762
  };
8703
8763
  var EditorialReadingRoomArtifactSchema = import_zod6.z.object({
@@ -9524,7 +9584,13 @@ var RedditTrendingOutputSchema = {
9524
9584
  threadsScraped: import_zod6.z.number().int().min(0),
9525
9585
  candidatesFound: import_zod6.z.number().int().min(0),
9526
9586
  partial: import_zod6.z.boolean(),
9527
- searchQuery: import_zod6.z.string()
9587
+ searchQuery: import_zod6.z.string(),
9588
+ discoverySource: import_zod6.z.enum(["google_serp", "reddit_search_fallback", "none"]),
9589
+ resultQuality: import_zod6.z.enum(["complete", "partial", "degraded"]),
9590
+ degradedResult: import_zod6.z.boolean(),
9591
+ degradationReasons: import_zod6.z.array(import_zod6.z.string()),
9592
+ retryRecommended: import_zod6.z.boolean(),
9593
+ billingRefunded: import_zod6.z.boolean()
9528
9594
  };
9529
9595
  var FacebookPageIntelOutputSchema = {
9530
9596
  advertiserName: NullableString2,
@@ -10690,10 +10756,11 @@ var WORKFLOW_GUIDE = `Create an editorial reading room only after doing the inte
10690
10756
  2. Read every in-scope source before designing the page. Build a source inventory with purpose, authority, overlap, and provenance.
10691
10757
  3. Architect the corpus into a small editorial edition. Prefer one article per real question, decision, lesson, or reusable pattern. Merge duplicate material; preserve meaningful distinctions and uncertainty.
10692
10758
  4. Write the collection-level promise: a specific hero title and deck that explain what the reader will understand or be able to do.
10693
- 5. Author complete articles in Markdown. Use H2/H3 headings as a useful table of contents, short paragraphs, concrete examples, and tables only when they materially improve comparison.
10694
- 6. Preserve provenance in sourceLabel. Never invent a source, fact, result, quote, or certainty that the source material does not support.
10695
- 7. Call create_editorial_reading_room with the finished site metadata, deck, and ordered articles. Do not ask the renderer to discover, research, or write the content for you.
10696
- 8. Inspect the returned page at both mobile and desktop sizes. Verify navigation, jump links, article order, typography, overflow, source labels, and that the page opens without a build step.
10759
+ 5. Author complete articles in Markdown. Use H2/H3 headings as a useful table of contents, short paragraphs, concrete examples, and tables only when they materially improve comparison. Markdown images are supported inside the body.
10760
+ 6. Choose images only when they help the reader identify, understand, compare, or remember the material. Use article.image for the card/article hero, article.ogImage for a distinct social preview, and site.ogImage for the collection default. Every image needs descriptive alt text; preserve caption, credit, source URL, and rights context when known. Never invent attribution or imply usage rights.
10761
+ 7. Preserve provenance in sourceLabel. Never invent a source, fact, result, quote, or certainty that the source material does not support.
10762
+ 8. Call create_editorial_reading_room with the finished site metadata, deck, and ordered articles. Do not ask the renderer to discover, research, or write the content for you.
10763
+ 9. Inspect the returned page at both mobile and desktop sizes. Verify navigation, jump links, article order, images, alt text, typography, overflow, source labels, social metadata, and that the page opens without a build step.
10697
10764
 
10698
10765
  The renderer owns the reusable New York Times-inspired reading surface, responsive hamburger navigation, search, article jump links, progress, text-size controls, evening mode, and portable single-file HTML delivery.`;
10699
10766
  var CONTENT_CONTRACT = `Editorial reading-room content contract
@@ -10706,13 +10773,16 @@ var CONTENT_CONTRACT = `Editorial reading-room content contract
10706
10773
  - site.eyebrow: collection framing, not a duplicate headline.
10707
10774
  - site.heroTitle: specific outcome or understanding promised by the collection.
10708
10775
  - site.startLabel: concise reading CTA.
10776
+ - site.ogImage: optional collection-level Open Graph image with required alt text.
10709
10777
  - deck: two or three concrete sentences covering value and scope.
10710
- - articles: 1-40 complete editorial pieces, each with a unique slug and order.
10778
+ - articles: 1-100 complete editorial pieces, each with a unique slug and order.
10711
10779
  - article.category: a repeated grouping label when multiple pieces belong together.
10712
10780
  - article.kicker: short framing line.
10713
10781
  - article.title: the question, decision, lesson, or reusable pattern.
10714
10782
  - article.summary: what the reader will understand.
10715
10783
  - article.sourceLabel: visible, truthful provenance.
10784
+ - article.image: optional card/article hero image with alt text and optional caption, credit, source URL, and dimensions.
10785
+ - article.ogImage: optional article-specific social image; otherwise article.image, then site.ogImage is used.
10716
10786
  - article.markdown: full body with useful H2/H3 headings.
10717
10787
 
10718
10788
  Quality gates:
@@ -10721,6 +10791,7 @@ Quality gates:
10721
10791
  - Do not use placeholder copy.
10722
10792
  - Keep headings descriptive enough to work as jump links.
10723
10793
  - Prefer a coherent reading sequence over source-file order.
10794
+ - Use only public HTTP(S) image URLs. Preserve provenance and rights context; an available URL is not proof of reuse rights.
10724
10795
  - If the corpus is too thin for multiple articles, create one strong article instead of padding the edition.`;
10725
10796
  var EXAMPLE = `Compact example:
10726
10797
 
@@ -10734,7 +10805,11 @@ var EXAMPLE = `Compact example:
10734
10805
  "issueLabel": "Pattern library",
10735
10806
  "eyebrow": "A practical field guide",
10736
10807
  "heroTitle": "Make every saved note easier to find and reuse",
10737
- "startLabel": "Begin with the pattern"
10808
+ "startLabel": "Begin with the pattern",
10809
+ "ogImage": {
10810
+ "url": "https://example.com/reading-room-social.jpg",
10811
+ "alt": "Connected notes arranged as a navigable editorial collection"
10812
+ }
10738
10813
  },
10739
10814
  "deck": "A concise guide to placing new material in the right vault, connecting it to natural neighbors, and preserving source evidence without turning memory into a generic notes bucket.",
10740
10815
  "articles": [{
@@ -10746,6 +10821,12 @@ var EXAMPLE = `Compact example:
10746
10821
  "summary": "A useful note is not only stored; it is classified, connected, and made retrievable.",
10747
10822
  "sourceType": "Workflow synthesis",
10748
10823
  "sourceLabel": "Derived from the MCP Memory capture contract supplied by the user.",
10824
+ "image": {
10825
+ "url": "https://example.com/graph-operation.jpg",
10826
+ "alt": "A source note connected to related project and knowledge notes",
10827
+ "caption": "Useful captures become connected retrieval objects.",
10828
+ "sourceUrl": "https://example.com/source"
10829
+ },
10749
10830
  "markdown": "## Start with the destination\\n\\nChoose the vault whose job matches the material...\\n\\n## Connect natural neighbors\\n\\nLink only relationships supported by the notes..."
10750
10831
  }]
10751
10832
  }`;
@@ -11539,7 +11620,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
11539
11620
  }, async (input) => formatRedditThread(await executor.redditThread(input), input));
11540
11621
  server.registerTool("reddit_trending", {
11541
11622
  title: "Reddit Trending",
11542
- description: "Discover the top Reddit conversations about a topic from the last week or month: finds relevant recent threads via a Google site:reddit.com search (optionally scoped to one subreddit), scrapes them for real upvotes, comments, and the questions people asked, and ranks by engagement (upvotes + 2x comments). Scraping runs in parallel across the discovered threads; set includeComments:false for a fast, cheap discovery-only sweep (relevant thread list, no engagement stats, no per-thread billing) and then read the ones you want with reddit_thread. Not for reading one known thread URL \u2014 use reddit_thread for that.",
11623
+ description: "Discover top Reddit conversations from the last week or month. It tries Google site:reddit.com discovery, falls back to a bounded direct Reddit search when that SERP is empty or unavailable, then optionally scrapes threads for real upvotes, comments, questions, and engagement ranking. Inspect resultQuality, discoverySource, degradationReasons, retryRecommended, and billingRefunded before treating an empty result as a genuine lack of discussion. Set includeComments:false for a cheap discovery-only sweep; use reddit_thread for one known URL.",
11543
11624
  inputSchema: RedditTrendingInputSchema,
11544
11625
  outputSchema: recordOutputSchema("reddit_trending", RedditTrendingOutputSchema),
11545
11626
  annotations: liveWebToolAnnotations("Reddit Trending")
@@ -11778,7 +11859,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
11778
11859
  }, async (input) => executor.commonsPreparePublication(input));
11779
11860
  server.registerTool("commons_validate_publication", {
11780
11861
  title: "Validate Transparent Commons Publication",
11781
- description: "Validate a publication name claim or a complete source-grounded editorial edition without writing. Use operation claim before commons_claim_publication and operation publish before commons_publish_editorial. This uses the editorial reading-room contract and checks ownership plus revision conflicts.",
11862
+ description: "Validate a publication name claim or a complete source-grounded editorial edition without writing. Publish validation accepts up to 100 articles plus structured article/card images, Markdown body images, and collection/article Open Graph images under the editorial reading-room contract. Use operation claim before commons_claim_publication and operation publish before commons_publish_editorial; ownership and revision conflicts are checked.",
11782
11863
  inputSchema: CommonsValidatePublicationInputSchema,
11783
11864
  outputSchema: recordOutputSchema("commons_validate_publication", CommonsGenericOutputSchema),
11784
11865
  annotations: { title: "Validate Transparent Commons Publication", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
@@ -11792,7 +11873,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
11792
11873
  }, async (input) => executor.commonsClaimPublication(input));
11793
11874
  server.registerTool("commons_publish_editorial", {
11794
11875
  title: "Publish Transparent Commons Editorial Edition",
11795
- description: "Publish a fully authored editorial reading-room edition to the caller-owned Transparent Commons subdomain and return permanent root, archive, and edition URLs. The calling AI must research and author the source-grounded edition first; this tool validates, renders, and persists it. For an existing edition, pass its current baseRevision. Requires an idempotencyKey; this is not the neutral wiki write tool.",
11876
+ description: "Publish up to 100 fully authored editorial pieces, including optional article/card images, Markdown body images, and collection/article Open Graph images, to the caller-owned Transparent Commons subdomain. The calling AI must research and author the source-grounded edition first; image URLs need alt text and preserved provenance/rights context. The tool validates, renders, persists, and returns permanent root, archive, and edition URLs. Existing editions require current baseRevision. Requires idempotencyKey; this is not the neutral wiki write tool.",
11796
11877
  inputSchema: CommonsPublishEditorialInputSchema,
11797
11878
  outputSchema: recordOutputSchema("commons_publish_editorial", CommonsGenericOutputSchema),
11798
11879
  annotations: { title: "Publish Transparent Commons Editorial Edition", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true }
@@ -11929,7 +12010,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
11929
12010
  }, async (input) => formatWorkflowArtifactRead(await executor.workflowArtifactRead(input), input));
11930
12011
  server.registerTool("editorial_reading_room_guide", {
11931
12012
  title: "Editorial Reading Room Guide",
11932
- description: 'Read the reusable composition contract before creating an editorial reading room. It tells the calling AI how to inventory the supplied corpus, preserve source truth, architect a coherent edition, write useful articles, and verify the finished page. Start with focus "workflow"; fetch "content_contract" or "example" only when needed. This does not research, write, or create a page.',
12013
+ description: 'Read the reusable composition contract before creating an editorial reading room. It covers corpus inventory, source truth, coherent architecture, up to 100 articles, purposeful images, image provenance, collection/article Open Graph images, and finished-page verification. Start with focus "workflow"; fetch "content_contract" or "example" only when needed. This does not research, write, or create a page.',
11933
12014
  inputSchema: EditorialReadingRoomGuideInputSchema,
11934
12015
  outputSchema: recordOutputSchema("editorial_reading_room_guide", EditorialReadingRoomGuideOutputSchema),
11935
12016
  annotations: localPlanningToolAnnotations("Editorial Reading Room Guide")
@@ -11945,7 +12026,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
11945
12026
  }));
11946
12027
  server.registerTool("create_editorial_reading_room", {
11947
12028
  title: "Create Editorial Reading Room",
11948
- description: `Turn fully authored, source-grounded articles into one polished mobile-first editorial report with contents, search, hamburger navigation, article jump links, reading progress, text sizing, evening mode, and provenance. Do not use this tool to discover, preview, save, or version reusable website templates; use list_artifact_templates and get_artifact_template_example for that workflow. The calling AI must first read all in-scope material and use editorial_reading_room_guide when it has not already internalized the workflow; this renderer does not perform research or invent copy. ${fileBehavior("Local stdio clients save one self-contained HTML file under the MCP Scraper output directory and return localPath.", "Hosted/app clients receive an owner-scoped private HTML artifact retained for seven days with a renewable signed download URL.")}`,
12029
+ description: `Render up to 100 fully authored, source-grounded articles into one polished mobile-first editorial report with contents, search, navigation, jump links, progress, text sizing, evening mode, provenance, structured article/card images, Markdown body images, and collection/article Open Graph metadata. Public HTTP(S) image URLs require alt text; preserve caption, credit, source, and rights context when known. The static artifact carries collection OG tags and updates article tags in-browser; a publishing host must serve article-specific metadata for crawler-perfect per-article unfurls. This renderer does not research or invent copy. For reusable website templates use list_artifact_templates instead. ${fileBehavior("Local stdio clients save one self-contained HTML file under the MCP Scraper output directory and return localPath.", "Hosted/app clients receive an owner-scoped private HTML artifact retained for seven days with a renewable signed download URL.")}`,
11949
12030
  inputSchema: CreateEditorialReadingRoomInputSchema,
11950
12031
  outputSchema: recordOutputSchema("create_editorial_reading_room", CreateEditorialReadingRoomOutputSchema),
11951
12032
  annotations: {
@@ -13342,7 +13423,7 @@ var DeleteNoteSchema = {
13342
13423
  var ExportSchema = {
13343
13424
  id: "memory-export",
13344
13425
  upstreamName: "exportTool",
13345
- description: "Export every note in a vault as a full dump for backup, migration, or bulk download \u2014 path, title, full content, kind, and last-updated per note, plus a count. Defaults to the active (or first entitled) vault. Requires export scope; the export is logged to provenance.",
13426
+ description: "Export every full note in one vault for an explicitly requested backup, migration, or corpus-wide audit \u2014 path, title, content, kind, last-updated, and count. This can be large and is not the normal way to find or edit one note: use memory-list for complete metadata inventory, memory-search for ranked recall, and memory-get for exact content. Defaults to the active or first entitled vault. Requires export scope; the export is logged to provenance.",
13346
13427
  input: {
13347
13428
  vault: import_zod10.z.string().optional().describe(
13348
13429
  "Vault to export. Optional; defaults to the session active vault, then the first vault the caller is entitled to."
@@ -13394,7 +13475,7 @@ var getTool_notePropsSchema = import_zod10.z.object({
13394
13475
  var GetSchema = {
13395
13476
  id: "memory-get",
13396
13477
  upstreamName: "getTool",
13397
- description: "Read a single note from a vault by its exact path, or by shareId for a note shared with you and accepted. Owned notes include their stored Obsidian props so edits can preserve links and template metadata. Returns a revision number \u2014 pass it as baseRevision on a later memory-put/delete-note to detect a concurrent edit instead of silently overwriting it. Requires read scope.",
13478
+ description: "Read one complete note by exact vault+path, or by accepted shareId. After memory-search identifies a strong candidate, use this before relying on it for an answer, summary, edit, link, or durable write: search results are excerpts, not complete notes. Owned notes include stored Obsidian props so edits preserve links and template metadata. Returns the revision required as baseRevision on later edits/deletes. Requires read scope.",
13398
13479
  input: {
13399
13480
  vault: import_zod10.z.string().optional().describe(
13400
13481
  "Vault to read from. Optional; defaults to the session active vault, then the first vault the caller is entitled to. Ignored when shareId is given."
@@ -13431,7 +13512,7 @@ var GetSchema = {
13431
13512
  var ListSchema = {
13432
13513
  id: "memory-list",
13433
13514
  upstreamName: "listTool",
13434
- description: "List notes in a vault \u2014 path, title, kind, tags, last-updated \u2014 optionally filtered by kind and/or tags (matches ANY given tag). Defaults to the active or first entitled vault; also returns vaults the caller is entitled to. Requires read scope.",
13515
+ description: "Return every note in one vault as a complete metadata inventory \u2014 stable path, title, kind, tags, and last-updated \u2014 plus a sorted list of every unique folder and nested folder represented by those paths. It contains no bodies. Use memory-get for exact full content, memory-search for ranked semantic recall, or memory-export only when explicitly asked for every full note. Defaults to the active or first entitled vault; also returns entitled vaults. Requires read scope.",
13435
13516
  input: {
13436
13517
  vault: import_zod10.z.string().optional().describe(
13437
13518
  "Vault to list. Optional; defaults to the session active vault, then the first vault the caller is entitled to."
@@ -13451,6 +13532,7 @@ var ListSchema = {
13451
13532
  updatedAt: import_zod10.z.string().describe("ISO-8601 timestamp of the note last update.")
13452
13533
  })
13453
13534
  ).optional().describe("The notes in the vault (metadata only, no content). Present when ok is true."),
13535
+ folders: import_zod10.z.array(import_zod10.z.string()).optional().describe("Sorted complete folder inventory derived from note paths, including represented nested parent folders. Present when ok is true."),
13454
13536
  vaults: import_zod10.z.array(import_zod10.z.string()).optional().describe("All vaults the caller is entitled to, for choosing a different vault to list."),
13455
13537
  error: import_zod10.z.string().optional().describe("Human-readable failure reason when ok is false.")
13456
13538
  },
@@ -13485,7 +13567,7 @@ var putTool_notePropsSchema = import_zod10.z.object({
13485
13567
  var PutSchema = {
13486
13568
  id: "memory-put",
13487
13569
  upstreamName: "putTool",
13488
- description: "Create or deliberately edit one note at a path in a memory vault; content is persisted and indexed for search. For normal new People, Organizations, Deals, Projects, Tasks, or Communication records, use prepare-memory-write then memory-capture: People must be real people, Organizations must be real organizations, Deals need a known party, Projects need a supported kind, Tasks can be independent Inbox todos or use a verified Project when linked, and draft emails need pending approval. For row-shaped datasets you'll filter/sort by exact value, use table-create/table-insert-rows/table-query instead. Ordinary vaults are indexed and shareable \u2014 never store real secrets there; use a secure vault (create-secure-vault) instead, which is never indexed or shareable and is encrypted at rest. Requires write scope.",
13570
+ description: "Create or deliberately edit one note at a stable vault+path. On an existing note, first call memory-get, merge the requested change into its full body, and pass that complete body plus baseRevision: content is replace-all, while supplied props patch the stored props. A conflict returns the current body for reconciliation; never retry the stale full body unchanged. Use purpose-built tools instead of rewriting system-managed Agent Inbox, optimizer, or channel backing notes. For normal new People, Organizations, Deals, Projects, Tasks, or Communication records, use prepare-memory-write then memory-capture. For row-shaped datasets use table tools. Ordinary vaults are indexed and shareable; store real secrets only in a secure vault. Requires write scope.",
13489
13571
  input: {
13490
13572
  vault: import_zod10.z.string().optional().describe(
13491
13573
  "Vault to write to. Optional; defaults to the session active vault, then the first vault the caller is entitled to. On a default-provisioned account, pick the vault whose job matches the content (see the server instructions for the full 16-vault guide) rather than defaulting blindly \u2014 e.g. a lesson learned goes in Knowledge, the raw source it came from goes in Library, a broken feature goes in Issues, a named real-world initiative goes in Projects. Do not use this low-level tool to create ordinary People, Organizations, Deals, Projects, Tasks, or Communication records: first use prepare-memory-write then memory-capture so relationships and approval state are validated."
@@ -13493,9 +13575,9 @@ var PutSchema = {
13493
13575
  path: import_zod10.z.string().optional().describe("Vault-relative note path to create or overwrite, e.g. projects/q3-plan. Writing an existing path replaces it. Required unless shareId is given."),
13494
13576
  shareId: import_zod10.z.string().optional().describe("Edit a note someone individually shared with you and you accepted (accept-share), by its shareId, instead of vault+path. Requires the share to grant edit permission, and baseRevision is mandatory (get the current revision first) since you are editing alongside the owner and possibly others."),
13495
13577
  title: import_zod10.z.string().optional().describe("Optional human-readable title; defaults are derived from the path when omitted."),
13496
- content: import_zod10.z.string().min(1).describe("The full note body to store and index for semantic search. Must be non-empty."),
13578
+ content: import_zod10.z.string().min(1).describe("The complete note body to store and index. On edit this replaces the prior body, so merge the requested change into the full memory-get content before calling; never pass only the changed fragment."),
13497
13579
  props: putTool_notePropsSchema.optional().describe("Obsidian note primitives plus vault-specific template fields. On edits, supplied fields patch the stored props instead of replacing the whole object; pass an empty array to deliberately clear a link list. Type/domain/folder also steer routing when no vault is given."),
13498
- baseRevision: import_zod10.z.number().optional().describe("Revision the edit is based on (from a prior get/put). When provided, the write only applies if the note is still at this revision; otherwise it is rejected as a conflict instead of silently overwriting a concurrent edit. Omit for last-write-wins (fine for solo notes)."),
13580
+ baseRevision: import_zod10.z.number().optional().describe("Revision the edit is based on (from memory-get/put). Always supply it when an AI edits an existing note; a mismatch rejects the write and returns current content for reconciliation. Omit only for an intentional new note or explicit last-write-wins migration."),
13499
13581
  tagDescriptions: import_zod10.z.record(import_zod10.z.string(), import_zod10.z.string()).optional().describe("One-line meaning for any tag in props.tags that is new to the account, keyed by tag. Tags resolve against the account's existing vocabulary; new tags require a one-line description.")
13500
13582
  },
13501
13583
  output: {
@@ -13529,7 +13611,7 @@ var searchTool_primitiveValue = import_zod10.z.union([import_zod10.z.string(), i
13529
13611
  var SearchSchema = {
13530
13612
  id: "memory-search",
13531
13613
  upstreamName: "searchTool",
13532
- description: "Default Smart RAG search across accessible memory. Form 2-4 focused query variants, combine semantic matches with exact vault/tag/date/kind/type/metadata filters, expand one bounded hop of outgoing links and backlinks around strong seeds, then rerank. Defaults: retrieve/fuse 50 candidates, 8 graph seeds, 5 neighbors per seed, rerank to 30. Graph neighbors are candidates, never automatic winners or links. Before tagging or writing, also call list-memory-tags to inspect the complete vocabulary and reuse existing tags; read strong related notes before selecting links.",
13614
+ description: "Default first tool whenever the user wants to find, recall, understand, or connect Memory content without an exact vault+path. Hybrid Smart RAG combines 2-4 semantic query variants with exact vault/tag/date/kind/type/metadata matches, expands one bounded graph hop, then reranks. Results are ranked excerpts, never an exhaustive inventory or complete notes: deduplicate by vault/path and call memory-get on strong candidates before answering, summarizing, editing, linking, or writing. Use memory-list for every note, memory-suggest for title-only lookup, and memory-export only for explicit full-vault dumps. Before tagging or writing, also inspect list-memory-tags.",
13533
13615
  input: {
13534
13616
  vault: import_zod10.z.string().optional().describe("Exact logical vault handle to search. Omit to search every entitled vault."),
13535
13617
  query: import_zod10.z.string().min(1).describe("A focused semantic reformulation of the request."),