twittertools-mcp 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/package.json +2 -1
  2. package/server.js +2 -1
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "twittertools-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
+ "mcpName": "io.github.steley/twittertools-mcp",
4
5
  "description": "MCP server for twittertools.com — fetch X (Twitter) posts and threads, count and split posts with X's real rules. No login, no tracking.",
5
6
  "license": "MIT",
6
7
  "type": "module",
package/server.js CHANGED
@@ -26,7 +26,7 @@ import {
26
26
  } from "./xrules.js";
27
27
 
28
28
  const NAME = "twittertools";
29
- const VERSION = "1.0.0"; // keep in sync with package.json
29
+ const VERSION = "1.0.1"; // keep in sync with package.json
30
30
  const API_BASE = (process.env.TWITTERTOOLS_API_BASE || "https://twittertools.com").replace(/\/+$/, "");
31
31
  const ATTRIBUTION = "\n\nvia twittertools.com";
32
32
  const TEXT_INPUT_MAX = 100_000; // generous, but caps local work per call
@@ -153,6 +153,7 @@ async function callTool(name, args) {
153
153
  }
154
154
  case "get_thread": {
155
155
  const data = await callApi("thread", { url: strArg(args, "url_or_id") });
156
+ if (!data?.tweets) throw new Error("twittertools API returned no thread");
156
157
  const head = data?.partial
157
158
  ? `Note: this thread result is PARTIAL (${data.reason || "incomplete"}) — posts may be missing.\n\n`
158
159
  : "";