@growthbook/mcp 1.4.4 → 1.4.5

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@growthbook/mcp",
3
3
  "mcpName": "io.github.growthbook/growthbook-mcp",
4
- "version": "1.4.4",
4
+ "version": "1.4.5",
5
5
  "description": "MCP Server for interacting with GrowthBook",
6
6
  "access": "public",
7
7
  "homepage": "https://github.com/growthbook/growthbook-mcp",
@@ -12,9 +12,10 @@
12
12
  "scripts": {
13
13
  "build": "tsc",
14
14
  "dev": "tsc --watch",
15
- "bump:patch": "npm version patch --no-git-tag-version",
16
- "bump:minor": "npm version minor --no-git-tag-version",
17
- "bump:major": "npm version major --no-git-tag-version",
15
+ "sync-version": "node scripts/sync-version.js",
16
+ "bump:patch": "npm version patch --no-git-tag-version && npm run sync-version",
17
+ "bump:minor": "npm version minor --no-git-tag-version && npm run sync-version",
18
+ "bump:major": "npm version major --no-git-tag-version && npm run sync-version",
18
19
  "mcpb:build": "npx -y @anthropic-ai/mcpb -- pack"
19
20
  },
20
21
  "bin": {
@@ -267,6 +267,9 @@ export function registerExperimentTools({ server, baseApiUrl, apiKey, appOrigin,
267
267
  .string()
268
268
  .optional()
269
269
  .describe("Experiment hypothesis. Base hypothesis off the examples from get_defaults. If none are available, use a falsifiable statement about what will happen if the experiment succeeds or fails."),
270
+ valueType: z
271
+ .enum(["string", "number", "boolean", "json"])
272
+ .describe("The value type for all experiment variations"),
270
273
  variations: z
271
274
  .array(z.object({
272
275
  name: z
@@ -279,7 +282,7 @@ export function registerExperimentTools({ server, baseApiUrl, apiKey, appOrigin,
279
282
  z.boolean(),
280
283
  z.record(z.string(), z.any()),
281
284
  ])
282
- .describe("The value of the control and each of the variations. The value should be a string, number, boolean, or object. If it's an object, it should be a valid JSON object."),
285
+ .describe("The value of this variation. Must match the specified valueType: provide actual booleans (true/false) not strings, actual numbers, strings, or valid JSON objects."),
283
286
  }))
284
287
  .describe("Experiment variations. The key should be the variation name and the value should be the variation value. Look to variations included in preview experiments for guidance on generation. The default or control variation should always be first."),
285
288
  project: z
@@ -295,7 +298,7 @@ export function registerExperimentTools({ server, baseApiUrl, apiKey, appOrigin,
295
298
  }, {
296
299
  readOnlyHint: false,
297
300
  destructiveHint: false,
298
- }, async ({ description, hypothesis, name, variations, fileExtension, confirmedDefaultsReviewed, project, }) => {
301
+ }, async ({ description, hypothesis, name, valueType, variations, fileExtension, confirmedDefaultsReviewed, project, }) => {
299
302
  if (!confirmedDefaultsReviewed) {
300
303
  return {
301
304
  content: [
@@ -340,13 +343,7 @@ export function registerExperimentTools({ server, baseApiUrl, apiKey, appOrigin,
340
343
  id: flagId,
341
344
  owner: user,
342
345
  defaultValue: stringifyValue(variations[0].value),
343
- valueType: typeof variations[0].value === "string"
344
- ? "string"
345
- : typeof variations[0].value === "number"
346
- ? "number"
347
- : typeof variations[0].value === "boolean"
348
- ? "boolean"
349
- : "json",
346
+ valueType,
350
347
  description,
351
348
  environments: {
352
349
  ...experimentDefaults.environments.reduce((acc, env) => {