@contentful/mcp-tools 0.2.5 → 0.2.6

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/dist/index.d.ts CHANGED
@@ -4,6 +4,10 @@ import * as _modelcontextprotocol_sdk_shared_protocol_js from '@modelcontextprot
4
4
  import * as _modelcontextprotocol_sdk_types_js from '@modelcontextprotocol/sdk/types.js';
5
5
  import * as zod from 'zod';
6
6
 
7
+ type JsonValue = string | number | boolean | null | JsonValue[] | {
8
+ [key: string]: JsonValue;
9
+ };
10
+
7
11
  /**
8
12
  * Response type for tool handlers
9
13
  */
@@ -4425,7 +4429,7 @@ declare class ContentfulMcpTools {
4425
4429
  linkType: string;
4426
4430
  urn: string;
4427
4431
  };
4428
- }>, "many">, zod.ZodRecord<zod.ZodString, zod.ZodAny>]>>>;
4432
+ }>, "many">, zod.ZodType<JsonValue, zod.ZodTypeDef, JsonValue>]>>>;
4429
4433
  metadata: zod.ZodOptional<zod.ZodObject<{
4430
4434
  tags: zod.ZodArray<zod.ZodObject<{
4431
4435
  sys: zod.ZodObject<{
@@ -4522,7 +4526,7 @@ declare class ContentfulMcpTools {
4522
4526
  tool: (params: {
4523
4527
  spaceId: string;
4524
4528
  environmentId: string;
4525
- fields: Record<string, Record<string, string | number | boolean | string[] | Record<string, any> | {
4529
+ fields: Record<string, Record<string, string[] | {
4526
4530
  content: unknown[];
4527
4531
  data: Record<string, any>;
4528
4532
  nodeType: _contentful_rich_text_types.BLOCKS.DOCUMENT;
@@ -4541,7 +4545,7 @@ declare class ContentfulMcpTools {
4541
4545
  } | {
4542
4546
  lat: number;
4543
4547
  lon: number;
4544
- } | {
4548
+ } | JsonValue | {
4545
4549
  sys: {
4546
4550
  type: "Link";
4547
4551
  id: string;
@@ -4725,7 +4729,7 @@ declare class ContentfulMcpTools {
4725
4729
  linkType: string;
4726
4730
  urn: string;
4727
4731
  };
4728
- }>, "many">, zod.ZodRecord<zod.ZodString, zod.ZodAny>]>>>;
4732
+ }>, "many">, zod.ZodType<JsonValue, zod.ZodTypeDef, JsonValue>]>>>;
4729
4733
  metadata: zod.ZodOptional<zod.ZodObject<{
4730
4734
  tags: zod.ZodArray<zod.ZodObject<{
4731
4735
  sys: zod.ZodObject<{
@@ -4822,7 +4826,7 @@ declare class ContentfulMcpTools {
4822
4826
  tool: (params: {
4823
4827
  spaceId: string;
4824
4828
  environmentId: string;
4825
- fields: Record<string, Record<string, string | number | boolean | string[] | Record<string, any> | {
4829
+ fields: Record<string, Record<string, string[] | {
4826
4830
  content: unknown[];
4827
4831
  data: Record<string, any>;
4828
4832
  nodeType: _contentful_rich_text_types.BLOCKS.DOCUMENT;
@@ -4841,7 +4845,7 @@ declare class ContentfulMcpTools {
4841
4845
  } | {
4842
4846
  lat: number;
4843
4847
  lon: number;
4844
- } | {
4848
+ } | JsonValue | {
4845
4849
  sys: {
4846
4850
  type: "Link";
4847
4851
  id: string;
package/dist/index.js CHANGED
@@ -2304,6 +2304,10 @@ var locationSchema = z36.object({
2304
2304
  lat: z36.number(),
2305
2305
  lon: z36.number()
2306
2306
  });
2307
+ var jsonPrimitive = z36.union([z36.string(), z36.number(), z36.boolean(), z36.null()]);
2308
+ var jsonValueSchema = z36.lazy(
2309
+ () => z36.union([jsonPrimitive, z36.array(jsonValueSchema), z36.record(jsonValueSchema)]).describe("Freeform JSON value (not for Rich Text)")
2310
+ );
2307
2311
  var fieldValueSchema = z36.union([
2308
2312
  z36.string().describe("Symbol, Text, or Date field"),
2309
2313
  z36.number().describe("Integer or Number field"),
@@ -2315,7 +2319,7 @@ var fieldValueSchema = z36.union([
2315
2319
  z36.array(z36.string()).describe("Array field of Symbols"),
2316
2320
  z36.array(linkSchema).describe("Array field of Links"),
2317
2321
  z36.array(resourceLinkSchema).describe("Array field of ResourceLinks"),
2318
- z36.record(z36.any()).describe("Object field (freeform JSON, not for RichText)")
2322
+ jsonValueSchema
2319
2323
  ]);
2320
2324
  var localizedFieldSchema = z36.record(fieldValueSchema);
2321
2325
  var entryFieldsSchema = z36.record(localizedFieldSchema).describe(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/mcp-tools",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",