mcp-metacritic 1.1.0 → 1.1.2

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 CHANGED
@@ -40,6 +40,14 @@ claude mcp add metacritic -- npx -y mcp-metacritic
40
40
  }
41
41
  ```
42
42
 
43
+ **Bundle, without npm**
44
+
45
+ Download `mcp-metacritic-<version>.mcpb` from
46
+ [the latest release](https://github.com/smeet666/mcp-metacritic/releases/latest) and open
47
+ it. A client that supports MCP bundles installs it on its own, with no npm and
48
+ no configuration file to edit. The bundle carries its dependencies, so nothing
49
+ is fetched at install time.
50
+
43
51
  ## Tools
44
52
 
45
53
  | Tool | What it does | Key parameters |
@@ -223,6 +231,14 @@ claude mcp add metacritic -- npx -y mcp-metacritic
223
231
  }
224
232
  ```
225
233
 
234
+ **Bundle, sans npm**
235
+
236
+ Téléchargez `mcp-metacritic-<version>.mcpb` depuis
237
+ [la dernière release](https://github.com/smeet666/mcp-metacritic/releases/latest) et
238
+ ouvrez-le. Un client compatible avec les bundles MCP l'installe seul, sans npm
239
+ ni fichier de configuration à modifier. Le bundle embarque ses dépendances,
240
+ donc rien n'est téléchargé à l'installation.
241
+
226
242
  ## Outils
227
243
 
228
244
  | Outil | Rôle | Paramètres principaux |
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
5
 
6
6
  // src/version.ts
7
- var PKG_VERSION = "1.1.0";
7
+ var PKG_VERSION = "1.1.1";
8
8
  var REPO_URL = "https://github.com/smeet666/mcp-metacritic";
9
9
 
10
10
  // src/config.ts
@@ -542,6 +542,10 @@ var intOf = (value) => {
542
542
  const parsed = num(value);
543
543
  return parsed === null ? null : Math.trunc(parsed);
544
544
  };
545
+ var aggregate = (value) => {
546
+ const parsed = num(value);
547
+ return parsed === 0 ? null : parsed;
548
+ };
545
549
  function kindOf(value) {
546
550
  const type = str(value);
547
551
  if (type === SEARCH_TYPE.movie) return "movie";
@@ -559,7 +563,7 @@ function toSummary(node) {
559
563
  const critic = isObject(node.criticScoreSummary) ? node.criticScoreSummary : {};
560
564
  const userSummary = isObject(node.userScoreSummary) ? node.userScoreSummary : {};
561
565
  const userObject = isObject(node.userScore) ? node.userScore : {};
562
- const userScore = num(userSummary.score) ?? num(userObject.score) ?? num(node.userScore);
566
+ const userScore = aggregate(userSummary.score) ?? aggregate(userObject.score) ?? aggregate(node.userScore);
563
567
  return {
564
568
  id,
565
569
  kind,
@@ -568,7 +572,7 @@ function toSummary(node) {
568
572
  year: intOf(node.premiereYear),
569
573
  releaseDate: str(node.releaseDate),
570
574
  rating: str(node.rating),
571
- metascore: num(critic.score),
575
+ metascore: aggregate(critic.score),
572
576
  userScore,
573
577
  sourceUrl: titlePageUrl(kind, slug)
574
578
  };
@@ -652,7 +656,7 @@ function parseDetail(raw, url, kind, slug) {
652
656
  description: str(item.description),
653
657
  tagline: str(item.tagline),
654
658
  genres: toStringList(item.genres),
655
- duration: intOf(item.duration),
659
+ duration: aggregate(intOf(item.duration)),
656
660
  imdbId: str(item.imdbId),
657
661
  networks: toStringList(item.networks),
658
662
  production: toCompanies(item.production),
@@ -668,7 +672,7 @@ function parseScore(raw, url, what) {
668
672
  const max = num(item.max);
669
673
  if (max === null) throw parseFailure(url, "the score carries no scale");
670
674
  return {
671
- score: num(item.score),
675
+ score: aggregate(item.score),
672
676
  max,
673
677
  reviewCount: intOf(item.reviewCount),
674
678
  positiveCount: intOf(item.positiveCount),
@@ -947,6 +951,9 @@ function toScoreOut(score) {
947
951
  sentiment: score.sentiment
948
952
  };
949
953
  }
954
+ function indentMarkerLines(body) {
955
+ return body.replace(/^(Note:|Source:)/gm, " $1");
956
+ }
950
957
  function ok(structured, body, options = {}) {
951
958
  const attribution = options.sourceUrl ? `${ATTRIBUTION} \u2014 ${options.sourceUrl}` : ATTRIBUTION;
952
959
  const noteLines = (options.notes ?? []).map((note) => `Note: ${note}`);
@@ -959,13 +966,14 @@ function ok(structured, body, options = {}) {
959
966
 
960
967
  ${trailer}`.length;
961
968
  const budget = MAX_TEXT_MIRROR_CHARS - reserved;
969
+ const safe = indentMarkerLines(body);
962
970
  let text;
963
- if (body.length <= budget) {
964
- text = `${body}
971
+ if (safe.length <= budget) {
972
+ text = `${safe}
965
973
 
966
974
  ${trailer}`;
967
975
  } else {
968
- const kept = truncate(body, Math.max(0, budget - cutMarker.length));
976
+ const kept = truncate(safe, Math.max(0, budget - cutMarker.length));
969
977
  text = `${kept}${cutMarker}
970
978
 
971
979
  ${trailer}`;