@cloudinary/asset-management-mcp 0.9.0 → 0.9.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.
@@ -12,9 +12,53 @@ import { Result } from "../types/fp.js";
12
12
  * @remarks
13
13
  * Returns a list of resources matching the specified search criteria.
14
14
  *
15
- * Uses Lucene-like query language to search by descriptive attributes (public_id, filename, folder, tags, context), file details (resource_type, format, bytes, width, height), embedded data (image_metadata), and analyzed data (face_count, colors, quality_score). Supports aggregate counts and complex Boolean expressions.
15
+ * Uses a Lucene-like query language to filter assets by descriptive attributes (`public_id`, `asset_id`, `filename`, `display_name`, `folder` / `asset_folder`, `tags`, `context.<key>`), file details (`resource_type`, `type`, `format`, `bytes`, `width`, `height`, `duration`, `pages`, `aspect_ratio`, `transparent`, `grayscale`), lifecycle dates (`uploaded_at`, `created_at`, `taken_at`, `updated_at`, `last_updated.<kind>`), moderation and lifecycle state (`status`, `moderation_status`, `moderation_kind`), embedded data (`image_metadata.*`), structured metadata (`metadata.<external_id>`), and analysis fields (`face_count`, `colors`, `quality_score`, `illustration_score`, `accessibility_analysis.*`). Supports sorting, aggregate counts, and complex boolean expressions. See the `expression` parameter for the full field reference.
16
16
  *
17
- * Examples: tags:shirt AND uploaded_at>1d, resource_type:image AND bytes>1mb, folder:products OR context.category:electronics
17
+ * ## Expression syntax
18
+ *
19
+ * - **Match**: `field:value` (token match) or `field=value` (exact match). Examples: `tags:shirt`, `tags=cotton`.
20
+ * - **Comparisons**: `>`, `<`, `>=`, `<=` for numbers and dates. Example: `bytes>10000000`.
21
+ * - **Ranges**: `field:[from TO to]` inclusive, `field:{from TO to}` exclusive. Example: `width:{200 TO 1028}`.
22
+ * - **Booleans**: `AND`, `OR`, `NOT` (uppercase), or `+` (must), `-` (must not). `NOT` must appear between clauses — a bare leading `NOT` is a parse error; use `-field:value` to negate the first clause. Group with parentheses: `(shirt OR pants) AND clothes`.
23
+ * - **Wildcards**: trailing `*` only, for prefix match (`public_id:shoes_*`, `format:jp*`, `tags:shirt*`). Not supported on `folder`, `asset_folder`, `resource_type`, or `type`. Leading `*`, middle `*`, `?`, and bare `*` (`folder:*`, `context.alt:*`) are all parse errors — wildcards cannot be used as a "field is present" probe.
24
+ * - **Tokenized vs exact fields**: `tags`, `filename`, `display_name`, `context.<key>`, and `metadata.<id>` match on tokens split by whitespace and punctuation — `tags:analysis` matches the tag `full-analysis`. `public_id`, `folder`, `asset_folder`, and `format` match the whole value — `public_id:dog` will not match `dog_pldcwy`; use `public_id="dog_pldcwy"` (exact) or `public_id:dog*` (prefix). These exact-match fields still accept a trailing `*` for prefix match (except `folder` / `asset_folder`, where wildcards are ignored).
25
+ * - **Dates**: ISO-8601 in quotes (`uploaded_at>"2024-01-15"`) or relative shorthand `Nh`, `Nd`, `Nw`, `Nm`, `Ny` (`uploaded_at>1d`, `created_at:[4w TO 1w]`). Send raw `<`/`>`, never HTML-escaped.
26
+ * - **Quoting**: wrap any value containing a space, colon, or other reserved character (`! ( ) { } [ ] ^ ~ ? \ = & < > |`) in double quotes, or escape each character with `\`. Examples: `tags:"service:mantels"`, `aspect_ratio:"16:9"`, `folder:"My Folder"`.
27
+ *
28
+ * ## Common mistakes
29
+ *
30
+ * - Use `folder:` or `asset_folder:` (singular); `folders:`, `asset_folder_id:`, and other invented variants are not valid fields. Pass the exact folder name — wildcards do not apply here.
31
+ * - There is no "has any value" / presence probe. `folder:*`, `metadata.alt:*`, `context.key:*`, `tags:*`, and `-tags:*` are all parse errors. See *"Which assets have any value for `metadata.<id>`?"* under **Common tasks** for workarounds.
32
+ * - `NOT foo AND bar` is a parse error. Write it as `bar AND NOT foo` or `-foo AND bar`, and keep every `NOT` between two clauses (`a AND NOT b AND NOT c` is fine; `NOT b AND NOT c …` is not).
33
+ * - `public_id:dog` will not match `dog_pldcwy`. Use `public_id="dog_pldcwy"` (exact) or `public_id:dog*` (prefix).
34
+ * - `tags=service:mantels` fails because the unquoted colon is parsed as a field separator. Use `tags="service:mantels"` or `tags=service\:mantels`.
35
+ * - Do not HTML-escape operators. Send `uploaded_at<1h`, not `uploaded_at&lt;1h`.
36
+ * - Do not leave an operand empty (e.g. `tags: AND -tags:foo`). Omit the empty clause entirely.
37
+ *
38
+ * ## Tips
39
+ *
40
+ * - Set `max_results: 0` to return only `total_count` and `aggregations` without any resource payload — useful for counts and aggregation-only queries.
41
+ * - `total_count` is always present in the response; prefer it over running an aggregation just to get a count.
42
+ * - `aggregate` (both simple and range variants) and the `metadata`, `image_metadata`, `image_analysis` values of `with_field` require a Tier 2 search plan.
43
+ * - Range aggregations require each range to include a `key` label (1–20 chars, `[a-zA-Z0-9_-]+`) and at least one of `from` / `to`.
44
+ *
45
+ * ## Common tasks
46
+ *
47
+ * - **Count matching assets** — put the filter in `expression` with `max_results: 0` and read `total_count` from the response. Works on every tier; no `aggregate` needed.
48
+ * - **Preview one matching asset** — set `max_results: 1`; add `with_field: ["tags", "context"]` (or `metadata`, Tier 2) to inspect values. Prefer this over fetching and scanning a full page.
49
+ * - **Distribution of values for a field** — Tier 2: `aggregate: [format|resource_type|type]` for enum counts, or range aggregations on `bytes`, `image_pixels`, `video_pixels`, or `duration`. Tier 1 fallback: run N small queries with `max_results: 0`, one per candidate value, and read `total_count` from each.
50
+ * - **"Which assets have any value for `metadata.<id>`?"** — not expressible directly (`metadata.X:*` is a parse error; there is no presence probe). Workarounds: (a) if the field has a known value set, enumerate — `metadata.region:(apac OR emea OR amer)`; (b) query broadly with `with_field: ["metadata"]` (Tier 2) and filter client-side for entries where the field is set; (c) at ingest time, attach a sentinel tag whenever the field is set, then search by that tag.
51
+ * - **Newest / largest N** — keep the filter in `expression` and sort explicitly: `sort_by: [{uploaded_at: "desc"}]` with `max_results: 10`.
52
+ * - **Filter by folder** — both `asset_folder:"parent/child"` and `folder:"parent/child"` match an exact folder path; there is no wildcard or "contains". To query across multiple folders, enumerate: `asset_folder:("campaigns/2024" OR "campaigns/2025")`.
53
+ * - **Filter by metadata when you only know the label** — first call `list-metadata-fields` to resolve the label to an `external_id`, then query `metadata.<external_id>:value`.
54
+ * - **Multiple independent filters in one turn** — prefer one `expression` with `OR` / parentheses over firing many parallel calls: `metadata.region:apac OR metadata.region:emea` in a single request is faster and more reliable than two parallel requests.
55
+ *
56
+ * ## Examples
57
+ *
58
+ * - `tags:shirt AND uploaded_at>1d`
59
+ * - `resource_type:image AND bytes>1000000 AND (format:png OR format:jpg)`
60
+ * - `folder:products AND context.category:electronics`
61
+ * - `tags:"service:mantels" AND -tags:discontinued`
18
62
  */
19
63
  export declare function searchSearchAssets(client$: CloudinaryAssetMgmtCore, request: SearchParameters, options?: RequestOptions): APIPromise<Result<Response, APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
20
64
  //# sourceMappingURL=searchSearchAssets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchSearchAssets.d.ts","sourceRoot":"","sources":["../../src/funcs/searchSearchAssets.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAIrD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,gBAAgB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,QAAQ,EACN,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}
1
+ {"version":3,"file":"searchSearchAssets.d.ts","sourceRoot":"","sources":["../../src/funcs/searchSearchAssets.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAIrD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,gBAAgB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,QAAQ,EACN,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}
@@ -15,9 +15,53 @@ import { APIPromise } from "../types/async.js";
15
15
  * @remarks
16
16
  * Returns a list of resources matching the specified search criteria.
17
17
  *
18
- * Uses Lucene-like query language to search by descriptive attributes (public_id, filename, folder, tags, context), file details (resource_type, format, bytes, width, height), embedded data (image_metadata), and analyzed data (face_count, colors, quality_score). Supports aggregate counts and complex Boolean expressions.
18
+ * Uses a Lucene-like query language to filter assets by descriptive attributes (`public_id`, `asset_id`, `filename`, `display_name`, `folder` / `asset_folder`, `tags`, `context.<key>`), file details (`resource_type`, `type`, `format`, `bytes`, `width`, `height`, `duration`, `pages`, `aspect_ratio`, `transparent`, `grayscale`), lifecycle dates (`uploaded_at`, `created_at`, `taken_at`, `updated_at`, `last_updated.<kind>`), moderation and lifecycle state (`status`, `moderation_status`, `moderation_kind`), embedded data (`image_metadata.*`), structured metadata (`metadata.<external_id>`), and analysis fields (`face_count`, `colors`, `quality_score`, `illustration_score`, `accessibility_analysis.*`). Supports sorting, aggregate counts, and complex boolean expressions. See the `expression` parameter for the full field reference.
19
19
  *
20
- * Examples: tags:shirt AND uploaded_at>1d, resource_type:image AND bytes>1mb, folder:products OR context.category:electronics
20
+ * ## Expression syntax
21
+ *
22
+ * - **Match**: `field:value` (token match) or `field=value` (exact match). Examples: `tags:shirt`, `tags=cotton`.
23
+ * - **Comparisons**: `>`, `<`, `>=`, `<=` for numbers and dates. Example: `bytes>10000000`.
24
+ * - **Ranges**: `field:[from TO to]` inclusive, `field:{from TO to}` exclusive. Example: `width:{200 TO 1028}`.
25
+ * - **Booleans**: `AND`, `OR`, `NOT` (uppercase), or `+` (must), `-` (must not). `NOT` must appear between clauses — a bare leading `NOT` is a parse error; use `-field:value` to negate the first clause. Group with parentheses: `(shirt OR pants) AND clothes`.
26
+ * - **Wildcards**: trailing `*` only, for prefix match (`public_id:shoes_*`, `format:jp*`, `tags:shirt*`). Not supported on `folder`, `asset_folder`, `resource_type`, or `type`. Leading `*`, middle `*`, `?`, and bare `*` (`folder:*`, `context.alt:*`) are all parse errors — wildcards cannot be used as a "field is present" probe.
27
+ * - **Tokenized vs exact fields**: `tags`, `filename`, `display_name`, `context.<key>`, and `metadata.<id>` match on tokens split by whitespace and punctuation — `tags:analysis` matches the tag `full-analysis`. `public_id`, `folder`, `asset_folder`, and `format` match the whole value — `public_id:dog` will not match `dog_pldcwy`; use `public_id="dog_pldcwy"` (exact) or `public_id:dog*` (prefix). These exact-match fields still accept a trailing `*` for prefix match (except `folder` / `asset_folder`, where wildcards are ignored).
28
+ * - **Dates**: ISO-8601 in quotes (`uploaded_at>"2024-01-15"`) or relative shorthand `Nh`, `Nd`, `Nw`, `Nm`, `Ny` (`uploaded_at>1d`, `created_at:[4w TO 1w]`). Send raw `<`/`>`, never HTML-escaped.
29
+ * - **Quoting**: wrap any value containing a space, colon, or other reserved character (`! ( ) { } [ ] ^ ~ ? \ = & < > |`) in double quotes, or escape each character with `\`. Examples: `tags:"service:mantels"`, `aspect_ratio:"16:9"`, `folder:"My Folder"`.
30
+ *
31
+ * ## Common mistakes
32
+ *
33
+ * - Use `folder:` or `asset_folder:` (singular); `folders:`, `asset_folder_id:`, and other invented variants are not valid fields. Pass the exact folder name — wildcards do not apply here.
34
+ * - There is no "has any value" / presence probe. `folder:*`, `metadata.alt:*`, `context.key:*`, `tags:*`, and `-tags:*` are all parse errors. See *"Which assets have any value for `metadata.<id>`?"* under **Common tasks** for workarounds.
35
+ * - `NOT foo AND bar` is a parse error. Write it as `bar AND NOT foo` or `-foo AND bar`, and keep every `NOT` between two clauses (`a AND NOT b AND NOT c` is fine; `NOT b AND NOT c …` is not).
36
+ * - `public_id:dog` will not match `dog_pldcwy`. Use `public_id="dog_pldcwy"` (exact) or `public_id:dog*` (prefix).
37
+ * - `tags=service:mantels` fails because the unquoted colon is parsed as a field separator. Use `tags="service:mantels"` or `tags=service\:mantels`.
38
+ * - Do not HTML-escape operators. Send `uploaded_at<1h`, not `uploaded_at&lt;1h`.
39
+ * - Do not leave an operand empty (e.g. `tags: AND -tags:foo`). Omit the empty clause entirely.
40
+ *
41
+ * ## Tips
42
+ *
43
+ * - Set `max_results: 0` to return only `total_count` and `aggregations` without any resource payload — useful for counts and aggregation-only queries.
44
+ * - `total_count` is always present in the response; prefer it over running an aggregation just to get a count.
45
+ * - `aggregate` (both simple and range variants) and the `metadata`, `image_metadata`, `image_analysis` values of `with_field` require a Tier 2 search plan.
46
+ * - Range aggregations require each range to include a `key` label (1–20 chars, `[a-zA-Z0-9_-]+`) and at least one of `from` / `to`.
47
+ *
48
+ * ## Common tasks
49
+ *
50
+ * - **Count matching assets** — put the filter in `expression` with `max_results: 0` and read `total_count` from the response. Works on every tier; no `aggregate` needed.
51
+ * - **Preview one matching asset** — set `max_results: 1`; add `with_field: ["tags", "context"]` (or `metadata`, Tier 2) to inspect values. Prefer this over fetching and scanning a full page.
52
+ * - **Distribution of values for a field** — Tier 2: `aggregate: [format|resource_type|type]` for enum counts, or range aggregations on `bytes`, `image_pixels`, `video_pixels`, or `duration`. Tier 1 fallback: run N small queries with `max_results: 0`, one per candidate value, and read `total_count` from each.
53
+ * - **"Which assets have any value for `metadata.<id>`?"** — not expressible directly (`metadata.X:*` is a parse error; there is no presence probe). Workarounds: (a) if the field has a known value set, enumerate — `metadata.region:(apac OR emea OR amer)`; (b) query broadly with `with_field: ["metadata"]` (Tier 2) and filter client-side for entries where the field is set; (c) at ingest time, attach a sentinel tag whenever the field is set, then search by that tag.
54
+ * - **Newest / largest N** — keep the filter in `expression` and sort explicitly: `sort_by: [{uploaded_at: "desc"}]` with `max_results: 10`.
55
+ * - **Filter by folder** — both `asset_folder:"parent/child"` and `folder:"parent/child"` match an exact folder path; there is no wildcard or "contains". To query across multiple folders, enumerate: `asset_folder:("campaigns/2024" OR "campaigns/2025")`.
56
+ * - **Filter by metadata when you only know the label** — first call `list-metadata-fields` to resolve the label to an `external_id`, then query `metadata.<external_id>:value`.
57
+ * - **Multiple independent filters in one turn** — prefer one `expression` with `OR` / parentheses over firing many parallel calls: `metadata.region:apac OR metadata.region:emea` in a single request is faster and more reliable than two parallel requests.
58
+ *
59
+ * ## Examples
60
+ *
61
+ * - `tags:shirt AND uploaded_at>1d`
62
+ * - `resource_type:image AND bytes>1000000 AND (format:png OR format:jpg)`
63
+ * - `folder:products AND context.category:electronics`
64
+ * - `tags:"service:mantels" AND -tags:discontinued`
21
65
  */
22
66
  export function searchSearchAssets(client$, request, options) {
23
67
  return new APIPromise($do(client$, request, options));
@@ -1 +1 @@
1
- {"version":3,"file":"searchSearchAssets.js","sourceRoot":"","sources":["../../src/funcs/searchSearchAssets.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAU3C,OAAO,EAEL,0BAA0B,GAC3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAgC,EAChC,OAAyB,EACzB,OAAwB;IAaxB,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,OAAO,EACP,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,OAAgC,EAChC,OAAyB,EACzB,OAAwB;IAgBxB,MAAM,OAAO,GAAG,SAAS,CACvB,OAAO,EACP,CAAC,MAAM,EAAE,EAAE,CAAC,0BAA0B,CAAC,KAAK,CAAC,MAAM,CAAC,EACpD,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QAChB,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAC1C,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC;IAC/B,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,OAAO,E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,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE;QACvC,OAAO;QACP,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,CAAC,QAAQ,EAAE;YAChB,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,QAAQ,CAAC,KAAK;SACzB,CAAC,CAAC;AACL,CAAC"}
@@ -918,7 +918,7 @@ http_headers = { "api-key" = "YOUR_API_KEY", "api-secret" = "YOUR_API_SECRET", "
918
918
  <h1>Instructions</h1>
919
919
  <p>One-click installation for Claude Desktop users</p>
920
920
  <div class="instruction-item">
921
- <a href="https://github.com/cloudinary/asset-management-mcp/releases/download/v0.9.0/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
921
+ <a href="https://github.com/cloudinary/asset-management-mcp/releases/download/v0.9.1/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
922
922
  📥 Download MCP Bundle
923
923
  </a>
924
924
  </div>
@@ -65,9 +65,9 @@ export type SDKOptions = {
65
65
  export declare function serverURLFromOptions(options: SDKOptions): URL | null;
66
66
  export declare const SDK_METADATA: {
67
67
  readonly language: "typescript";
68
- readonly openapiDocVersion: "0.5.0";
69
- readonly sdkVersion: "0.9.0";
68
+ readonly openapiDocVersion: "0.5.1";
69
+ readonly sdkVersion: "0.9.1";
70
70
  readonly genVersion: "2.881.4";
71
- readonly userAgent: "speakeasy-sdk/mcp-typescript 0.9.0 2.881.4 0.5.0 @cloudinary/asset-management-mcp";
71
+ readonly userAgent: "speakeasy-sdk/mcp-typescript 0.9.1 2.881.4 0.5.1 @cloudinary/asset-management-mcp";
72
72
  };
73
73
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -54,9 +54,9 @@ export function serverURLFromOptions(options) {
54
54
  }
55
55
  export const SDK_METADATA = {
56
56
  language: "typescript",
57
- openapiDocVersion: "0.5.0",
58
- sdkVersion: "0.9.0",
57
+ openapiDocVersion: "0.5.1",
58
+ sdkVersion: "0.9.1",
59
59
  genVersion: "2.881.4",
60
- userAgent: "speakeasy-sdk/mcp-typescript 0.9.0 2.881.4 0.5.0 @cloudinary/asset-management-mcp",
60
+ userAgent: "speakeasy-sdk/mcp-typescript 0.9.1 2.881.4 0.5.1 @cloudinary/asset-management-mcp",
61
61
  };
62
62
  //# sourceMappingURL=config.js.map
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.9.0",
22
+ currentVersion: "0.9.1",
23
23
  },
24
24
  });
25
25
  run(app, process.argv.slice(2), buildContext(process));
@@ -32,7 +32,7 @@ import { tool$usageGetUsage } from "./tools/usageGetUsage.js";
32
32
  export function createMCPServer(deps) {
33
33
  const server = new McpServer({
34
34
  name: "CloudinaryAssetMgmt",
35
- version: "0.9.0",
35
+ version: "0.9.1",
36
36
  });
37
37
  const getClient = deps.getSDK || (() => new CloudinaryAssetMgmtCore({
38
38
  security: deps.security,
@@ -1 +1 @@
1
- {"version":3,"file":"searchSearchAssets.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/searchSearchAssets.ts"],"names":[],"mappings":"AAOA,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAG3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,cAAc,CAAC,OAAO,IAAI,CAuC/D,CAAC"}
1
+ {"version":3,"file":"searchSearchAssets.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/searchSearchAssets.ts"],"names":[],"mappings":"AAOA,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAG3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,cAAc,CAAC,OAAO,IAAI,CAmF/D,CAAC"}
@@ -15,9 +15,53 @@ export const tool$searchSearchAssets = {
15
15
 
16
16
  Returns a list of resources matching the specified search criteria.
17
17
 
18
- Uses Lucene-like query language to search by descriptive attributes (public_id, filename, folder, tags, context), file details (resource_type, format, bytes, width, height), embedded data (image_metadata), and analyzed data (face_count, colors, quality_score). Supports aggregate counts and complex Boolean expressions.
18
+ Uses a Lucene-like query language to filter assets by descriptive attributes (\`public_id\`, \`asset_id\`, \`filename\`, \`display_name\`, \`folder\` / \`asset_folder\`, \`tags\`, \`context.<key>\`), file details (\`resource_type\`, \`type\`, \`format\`, \`bytes\`, \`width\`, \`height\`, \`duration\`, \`pages\`, \`aspect_ratio\`, \`transparent\`, \`grayscale\`), lifecycle dates (\`uploaded_at\`, \`created_at\`, \`taken_at\`, \`updated_at\`, \`last_updated.<kind>\`), moderation and lifecycle state (\`status\`, \`moderation_status\`, \`moderation_kind\`), embedded data (\`image_metadata.*\`), structured metadata (\`metadata.<external_id>\`), and analysis fields (\`face_count\`, \`colors\`, \`quality_score\`, \`illustration_score\`, \`accessibility_analysis.*\`). Supports sorting, aggregate counts, and complex boolean expressions. See the \`expression\` parameter for the full field reference.
19
19
 
20
- Examples: tags:shirt AND uploaded_at>1d, resource_type:image AND bytes>1mb, folder:products OR context.category:electronics
20
+ ## Expression syntax
21
+
22
+ - **Match**: \`field:value\` (token match) or \`field=value\` (exact match). Examples: \`tags:shirt\`, \`tags=cotton\`.
23
+ - **Comparisons**: \`>\`, \`<\`, \`>=\`, \`<=\` for numbers and dates. Example: \`bytes>10000000\`.
24
+ - **Ranges**: \`field:[from TO to]\` inclusive, \`field:{from TO to}\` exclusive. Example: \`width:{200 TO 1028}\`.
25
+ - **Booleans**: \`AND\`, \`OR\`, \`NOT\` (uppercase), or \`+\` (must), \`-\` (must not). \`NOT\` must appear between clauses — a bare leading \`NOT\` is a parse error; use \`-field:value\` to negate the first clause. Group with parentheses: \`(shirt OR pants) AND clothes\`.
26
+ - **Wildcards**: trailing \`*\` only, for prefix match (\`public_id:shoes_*\`, \`format:jp*\`, \`tags:shirt*\`). Not supported on \`folder\`, \`asset_folder\`, \`resource_type\`, or \`type\`. Leading \`*\`, middle \`*\`, \`?\`, and bare \`*\` (\`folder:*\`, \`context.alt:*\`) are all parse errors — wildcards cannot be used as a "field is present" probe.
27
+ - **Tokenized vs exact fields**: \`tags\`, \`filename\`, \`display_name\`, \`context.<key>\`, and \`metadata.<id>\` match on tokens split by whitespace and punctuation — \`tags:analysis\` matches the tag \`full-analysis\`. \`public_id\`, \`folder\`, \`asset_folder\`, and \`format\` match the whole value — \`public_id:dog\` will not match \`dog_pldcwy\`; use \`public_id="dog_pldcwy"\` (exact) or \`public_id:dog*\` (prefix). These exact-match fields still accept a trailing \`*\` for prefix match (except \`folder\` / \`asset_folder\`, where wildcards are ignored).
28
+ - **Dates**: ISO-8601 in quotes (\`uploaded_at>"2024-01-15"\`) or relative shorthand \`Nh\`, \`Nd\`, \`Nw\`, \`Nm\`, \`Ny\` (\`uploaded_at>1d\`, \`created_at:[4w TO 1w]\`). Send raw \`<\`/\`>\`, never HTML-escaped.
29
+ - **Quoting**: wrap any value containing a space, colon, or other reserved character (\`! ( ) { } [ ] ^ ~ ? \\ = & < > |\`) in double quotes, or escape each character with \`\\\`. Examples: \`tags:"service:mantels"\`, \`aspect_ratio:"16:9"\`, \`folder:"My Folder"\`.
30
+
31
+ ## Common mistakes
32
+
33
+ - Use \`folder:\` or \`asset_folder:\` (singular); \`folders:\`, \`asset_folder_id:\`, and other invented variants are not valid fields. Pass the exact folder name — wildcards do not apply here.
34
+ - There is no "has any value" / presence probe. \`folder:*\`, \`metadata.alt:*\`, \`context.key:*\`, \`tags:*\`, and \`-tags:*\` are all parse errors. See *"Which assets have any value for \`metadata.<id>\`?"* under **Common tasks** for workarounds.
35
+ - \`NOT foo AND bar\` is a parse error. Write it as \`bar AND NOT foo\` or \`-foo AND bar\`, and keep every \`NOT\` between two clauses (\`a AND NOT b AND NOT c\` is fine; \`NOT b AND NOT c …\` is not).
36
+ - \`public_id:dog\` will not match \`dog_pldcwy\`. Use \`public_id="dog_pldcwy"\` (exact) or \`public_id:dog*\` (prefix).
37
+ - \`tags=service:mantels\` fails because the unquoted colon is parsed as a field separator. Use \`tags="service:mantels"\` or \`tags=service\\:mantels\`.
38
+ - Do not HTML-escape operators. Send \`uploaded_at<1h\`, not \`uploaded_at&lt;1h\`.
39
+ - Do not leave an operand empty (e.g. \`tags: AND -tags:foo\`). Omit the empty clause entirely.
40
+
41
+ ## Tips
42
+
43
+ - Set \`max_results: 0\` to return only \`total_count\` and \`aggregations\` without any resource payload — useful for counts and aggregation-only queries.
44
+ - \`total_count\` is always present in the response; prefer it over running an aggregation just to get a count.
45
+ - \`aggregate\` (both simple and range variants) and the \`metadata\`, \`image_metadata\`, \`image_analysis\` values of \`with_field\` require a Tier 2 search plan.
46
+ - Range aggregations require each range to include a \`key\` label (1–20 chars, \`[a-zA-Z0-9_-]+\`) and at least one of \`from\` / \`to\`.
47
+
48
+ ## Common tasks
49
+
50
+ - **Count matching assets** — put the filter in \`expression\` with \`max_results: 0\` and read \`total_count\` from the response. Works on every tier; no \`aggregate\` needed.
51
+ - **Preview one matching asset** — set \`max_results: 1\`; add \`with_field: ["tags", "context"]\` (or \`metadata\`, Tier 2) to inspect values. Prefer this over fetching and scanning a full page.
52
+ - **Distribution of values for a field** — Tier 2: \`aggregate: [format|resource_type|type]\` for enum counts, or range aggregations on \`bytes\`, \`image_pixels\`, \`video_pixels\`, or \`duration\`. Tier 1 fallback: run N small queries with \`max_results: 0\`, one per candidate value, and read \`total_count\` from each.
53
+ - **"Which assets have any value for \`metadata.<id>\`?"** — not expressible directly (\`metadata.X:*\` is a parse error; there is no presence probe). Workarounds: (a) if the field has a known value set, enumerate — \`metadata.region:(apac OR emea OR amer)\`; (b) query broadly with \`with_field: ["metadata"]\` (Tier 2) and filter client-side for entries where the field is set; (c) at ingest time, attach a sentinel tag whenever the field is set, then search by that tag.
54
+ - **Newest / largest N** — keep the filter in \`expression\` and sort explicitly: \`sort_by: [{uploaded_at: "desc"}]\` with \`max_results: 10\`.
55
+ - **Filter by folder** — both \`asset_folder:"parent/child"\` and \`folder:"parent/child"\` match an exact folder path; there is no wildcard or "contains". To query across multiple folders, enumerate: \`asset_folder:("campaigns/2024" OR "campaigns/2025")\`.
56
+ - **Filter by metadata when you only know the label** — first call \`list-metadata-fields\` to resolve the label to an \`external_id\`, then query \`metadata.<external_id>:value\`.
57
+ - **Multiple independent filters in one turn** — prefer one \`expression\` with \`OR\` / parentheses over firing many parallel calls: \`metadata.region:apac OR metadata.region:emea\` in a single request is faster and more reliable than two parallel requests.
58
+
59
+ ## Examples
60
+
61
+ - \`tags:shirt AND uploaded_at>1d\`
62
+ - \`resource_type:image AND bytes>1000000 AND (format:png OR format:jpg)\`
63
+ - \`folder:products AND context.category:electronics\`
64
+ - \`tags:"service:mantels" AND -tags:discontinued\`
21
65
  `,
22
66
  scopes: ["librarian"],
23
67
  annotations: {
@@ -1 +1 @@
1
- {"version":3,"file":"searchSearchAssets.js","sourceRoot":"","sources":["../../../src/mcp-server/tools/searchSearchAssets.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,0BAA0B,CAAC,QAAQ,CAAC,8BAA8B,CAAC;CA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
18
+ key: string;
18
19
  from?: number | undefined;
19
20
  to?: number | undefined;
20
21
  };
@@ -36,7 +37,9 @@ export declare const AggregateEnum$zodSchema: z.ZodEnum<{
36
37
  resource_type: "resource_type";
37
38
  }>;
38
39
  /**
39
- * Fields or ranges to aggregate search results by.
40
+ * Fields or ranges to aggregate search results by. Requires a Tier 2 search plan; on Tier 1 the field is accepted but aggregations are omitted from the response.
41
+ *
42
+ * @remarks
40
43
  */
41
44
  export type AggregateUnion = Array<AggregateEnum> | Array<Aggregate>;
42
45
  export declare const AggregateUnion$zodSchema: z.ZodType<AggregateUnion>;
@@ -1 +1 @@
1
- {"version":3,"file":"searchparameters.d.ts","sourceRoot":"","sources":["../../src/models/searchparameters.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAA2B,MAAM,oBAAoB,CAAC;AAE5E,eAAO,MAAM,IAAI;;;;;CAKP,CAAC;AACX,MAAM,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AAE3C,eAAO,MAAM,cAAc;;;;;EAKzB,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAIzE,CAAC;AAEL,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAA;CAAE,CAAC;AAE7E,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAGnD,CAAC;AAEH,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AACX,MAAM,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OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,aAAa,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAChE,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CA4BJ,CAAC"}
@@ -17,11 +17,12 @@ export const Type$zodSchema = z.enum([
17
17
  "duration",
18
18
  ]);
19
19
  export const SearchParametersRange$zodSchema = z.object({
20
- from: z.number().optional().describe("Start of the range (inclusive)"),
21
- to: z.number().optional().describe("End of the range (exclusive)"),
20
+ from: z.number().optional().describe("Start of the range (inclusive). At least one of `from` / `to` is required."),
21
+ key: z.string().describe("A label for the bucket, returned in the aggregation response. 1–20 chars, alphanumeric plus `-` and `_`."),
22
+ to: z.number().optional().describe("End of the range (exclusive). At least one of `from` / `to` is required."),
22
23
  });
23
24
  export const Aggregate$zodSchema = z.object({
24
- ranges: z.array(z.lazy(() => SearchParametersRange$zodSchema)),
25
+ ranges: z.array(z.lazy(() => SearchParametersRange$zodSchema)).describe("One or more ranges for the numeric field. Each range must include a `key` label and at least one of `from` / `to`.\n"),
25
26
  type: Type$zodSchema,
26
27
  });
27
28
  export const AggregateEnum = {
@@ -37,7 +38,7 @@ export const AggregateEnum$zodSchema = z.enum([
37
38
  export const AggregateUnion$zodSchema = z.union([
38
39
  z.array(AggregateEnum$zodSchema),
39
40
  z.array(z.lazy(() => Aggregate$zodSchema)),
40
- ]).describe("Fields or ranges to aggregate search results by.");
41
+ ]).describe("Fields or ranges to aggregate search results by. Requires a Tier 2 search plan; on Tier 1 the field is accepted but aggregations are omitted from the response.\n");
41
42
  export const WithField = {
42
43
  Context: "context",
43
44
  Tags: "tags",
@@ -60,13 +61,13 @@ export const SearchParameters$zodSchema = z.object({
60
61
  aggregate: z.union([
61
62
  z.array(AggregateEnum$zodSchema),
62
63
  z.array(z.lazy(() => Aggregate$zodSchema)),
63
- ]).optional().describe("Fields or ranges to aggregate search results by."),
64
- expression: z.string().optional().describe("The search expression. Supports exact match, wildcard match, presence, greater/less than, and range. For details on building expressions, see the Search API documentation."),
64
+ ]).optional().describe("Fields or ranges to aggregate search results by. Requires a Tier 2 search plan; on Tier 1 the field is accepted but aggregations are omitted from the response.\n"),
65
+ expression: z.string().optional().describe("The Lucene-like search expression. Supports token match (`:`), exact match (`=`), trailing `*` for prefix match, ranges (`[a TO b]`, `{a TO b}`), and comparisons (`>`, `<`, `>=`, `<=`). Combine terms with uppercase `AND`, `OR`, `NOT`, or `+`/`-`. `NOT` must appear between clauses — a leading `NOT` is a parse error; use `-field:value` to negate the first clause. Group with parentheses.\n\nWrap values containing spaces, colons, or other reserved characters (`! ( ) { } [ ] ^ ~ ? \\ = & < > |`) in double quotes, e.g. `tags:\"service:mantels\"`, `aspect_ratio:\"16:9\"`. Send raw `<`/`>`, never HTML-escaped.\n\nWildcards are prefix-only (trailing `*`). A bare `*` (e.g. `folder:*`, `context.alt:*`, `metadata.key:*`, `tags:*`, `-tags:*`) is a parse error — there is no \"has any value\" / presence probe. Either drop the clause, use a concrete prefix, or filter on a known token.\n\nDates: ISO-8601 in quotes, or relative shorthand `1h`, `1d`, `1w`, `1m`, `1y` (`uploaded_at>1d`, `created_at:[4w TO 1w]`).\n\nSupported fields: `public_id`, `asset_id`, `filename`, `display_name`, `folder` / `asset_folder` (singular, not `folders`), `tags`, `context.<key>`, `metadata.<external_id>`, `resource_type`, `type`, `format`, `bytes`, `width`, `height`, `duration`, `pages`, `aspect_ratio`, `transparent`, `grayscale`, `status`, `moderation_status`, `moderation_kind`, `uploaded_at`, `created_at`, `taken_at`, `updated_at`, `last_updated.<kind>`, `face_count`, `illustration_score`, `quality_score`. Fields under `image_metadata.*`, `image_analysis.*`, `quality_analysis.*`, and `accessibility_analysis.*` also require the matching `with_field` to be returned in the response.\n\nSee the [search expressions guide](https://cloudinary.com/documentation/search_expressions.md) for the full reference.\n"),
65
66
  fields: z.string().optional().describe("A comma-separated list of fields to include in the response.\nNotes:\n- This parameter takes precedence over the with_field parameter, so if you want any additional asset attributes returned, make sure to also include them in this list (e.g., tags or context).\n- The following fields are always included in the response: public_id, asset_id, asset_folder, created_at, status, type, and resource_type.\n"),
66
- max_results: z.int().optional().describe("The maximum number of results to return. Default - 50. Maximum - 500."),
67
+ max_results: z.int().optional().describe("The maximum number of results to return. Default - 50. Maximum - 500.\nSet to `0` to get only `total_count` and `aggregations` without any resources in the response — useful for counting or aggregation-only queries.\n"),
67
68
  next_cursor: z.string().optional().describe("The cursor value to get the next page of results. Available when a previous search returned more results than max_results."),
68
69
  sort_by: z.array(z.record(z.string(), DirectionEnum$zodSchema)).optional()
69
70
  .describe("An array of single-key objects mapping a field to a sort direction. Each object must contain exactly one field name mapped to 'asc' or 'desc'.\nDefault: [{\"created_at\": \"desc\"}].\n"),
70
- with_field: z.array(WithField$zodSchema).optional().describe("The additional fields to include in the response. Note that the fields parameter takes precedence over this parameter."),
71
+ with_field: z.array(WithField$zodSchema).optional().describe("The additional asset attributes to include in each search result. The `fields` parameter takes precedence over this parameter. `image_metadata`, `image_analysis`, and `metadata` require a Tier 2 search plan.\n"),
71
72
  }).describe("Common parameters for resource search operations.");
72
73
  //# sourceMappingURL=searchparameters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchparameters.js","sourceRoot":"","sources":["../../src/models/searchparameters.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,E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AAC,QAAQ,CACpB,mKAAmK,CACpK;IACD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACxC,swDAAswD,CACvwD;IACD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACpC,qZAAqZ,CACtZ;IACD,WAAW,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACtC,2NAA2N,CAC5N;IACD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACzC,4HAA4H,CAC7H;IACD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,uBAAuB,CAAC,CAAC,CAAC,QAAQ,EAAE;SACvE,QAAQ,CACP,0LAA0L,CAC3L;IACH,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC1D,mNAAmN,CACpN;CACF,CACF,CAAC,QAAQ,CAAC,mDAAmD,CAAC,CAAC"}
package/esm/tool-names.js CHANGED
@@ -78,7 +78,7 @@ export const toolNames = [
78
78
  },
79
79
  {
80
80
  "name": "search-assets",
81
- "description": "Provides a powerful query interface to filter and retrieve assets and their details\n\nReturns a list of resources matching the specified search criteria.\n\nUses Lucene-like query language to search by descriptive attributes (public_id, filename, folder, tags, context), file details (resource_type, format, bytes, width, height), embedded data (image_metadata), and analyzed data (face_count, colors, quality_score). Supports aggregate counts and complex Boolean expressions.\n\nExamples: tags:shirt AND uploaded_at>1d, resource_type:image AND bytes>1mb, folder:products OR context.category:electronics\n"
81
+ "description": "Provides a powerful query interface to filter and retrieve assets and their details\n\nReturns a list of resources matching the specified search criteria.\n\nUses a Lucene-like query language to filter assets by descriptive attributes (`public_id`, `asset_id`, `filename`, `display_name`, `folder` / `asset_folder`, `tags`, `context.<key>`), file details (`resource_type`, `type`, `format`, `bytes`, `width`, `height`, `duration`, `pages`, `aspect_ratio`, `transparent`, `grayscale`), lifecycle dates (`uploaded_at`, `created_at`, `taken_at`, `updated_at`, `last_updated.<kind>`), moderation and lifecycle state (`status`, `moderation_status`, `moderation_kind`), embedded data (`image_metadata.*`), structured metadata (`metadata.<external_id>`), and analysis fields (`face_count`, `colors`, `quality_score`, `illustration_score`, `accessibility_analysis.*`). Supports sorting, aggregate counts, and complex boolean expressions. See the `expression` parameter for the full field reference.\n\n## Expression syntax\n\n- **Match**: `field:value` (token match) or `field=value` (exact match). Examples: `tags:shirt`, `tags=cotton`.\n- **Comparisons**: `>`, `<`, `>=`, `<=` for numbers and dates. Example: `bytes>10000000`.\n- **Ranges**: `field:[from TO to]` inclusive, `field:{from TO to}` exclusive. Example: `width:{200 TO 1028}`.\n- **Booleans**: `AND`, `OR`, `NOT` (uppercase), or `+` (must), `-` (must not). `NOT` must appear between clauses — a bare leading `NOT` is a parse error; use `-field:value` to negate the first clause. Group with parentheses: `(shirt OR pants) AND clothes`.\n- **Wildcards**: trailing `*` only, for prefix match (`public_id:shoes_*`, `format:jp*`, `tags:shirt*`). Not supported on `folder`, `asset_folder`, `resource_type`, or `type`. Leading `*`, middle `*`, `?`, and bare `*` (`folder:*`, `context.alt:*`) are all parse errors — wildcards cannot be used as a \"field is present\" probe.\n- **Tokenized vs exact fields**: `tags`, `filename`, `display_name`, `context.<key>`, and `metadata.<id>` match on tokens split by whitespace and punctuation — `tags:analysis` matches the tag `full-analysis`. `public_id`, `folder`, `asset_folder`, and `format` match the whole value — `public_id:dog` will not match `dog_pldcwy`; use `public_id=\"dog_pldcwy\"` (exact) or `public_id:dog*` (prefix). These exact-match fields still accept a trailing `*` for prefix match (except `folder` / `asset_folder`, where wildcards are ignored).\n- **Dates**: ISO-8601 in quotes (`uploaded_at>\"2024-01-15\"`) or relative shorthand `Nh`, `Nd`, `Nw`, `Nm`, `Ny` (`uploaded_at>1d`, `created_at:[4w TO 1w]`). Send raw `<`/`>`, never HTML-escaped.\n- **Quoting**: wrap any value containing a space, colon, or other reserved character (`! ( ) { } [ ] ^ ~ ? \\ = & < > |`) in double quotes, or escape each character with `\\`. Examples: `tags:\"service:mantels\"`, `aspect_ratio:\"16:9\"`, `folder:\"My Folder\"`.\n\n## Common mistakes\n\n- Use `folder:` or `asset_folder:` (singular); `folders:`, `asset_folder_id:`, and other invented variants are not valid fields. Pass the exact folder name — wildcards do not apply here.\n- There is no \"has any value\" / presence probe. `folder:*`, `metadata.alt:*`, `context.key:*`, `tags:*`, and `-tags:*` are all parse errors. See *\"Which assets have any value for `metadata.<id>`?\"* under **Common tasks** for workarounds.\n- `NOT foo AND bar` is a parse error. Write it as `bar AND NOT foo` or `-foo AND bar`, and keep every `NOT` between two clauses (`a AND NOT b AND NOT c` is fine; `NOT b AND NOT c …` is not).\n- `public_id:dog` will not match `dog_pldcwy`. Use `public_id=\"dog_pldcwy\"` (exact) or `public_id:dog*` (prefix).\n- `tags=service:mantels` fails because the unquoted colon is parsed as a field separator. Use `tags=\"service:mantels\"` or `tags=service\\:mantels`.\n- Do not HTML-escape operators. Send `uploaded_at<1h`, not `uploaded_at&lt;1h`.\n- Do not leave an operand empty (e.g. `tags: AND -tags:foo`). Omit the empty clause entirely.\n\n## Tips\n\n- Set `max_results: 0` to return only `total_count` and `aggregations` without any resource payload — useful for counts and aggregation-only queries.\n- `total_count` is always present in the response; prefer it over running an aggregation just to get a count.\n- `aggregate` (both simple and range variants) and the `metadata`, `image_metadata`, `image_analysis` values of `with_field` require a Tier 2 search plan.\n- Range aggregations require each range to include a `key` label (1–20 chars, `[a-zA-Z0-9_-]+`) and at least one of `from` / `to`.\n\n## Common tasks\n\n- **Count matching assets** — put the filter in `expression` with `max_results: 0` and read `total_count` from the response. Works on every tier; no `aggregate` needed.\n- **Preview one matching asset** — set `max_results: 1`; add `with_field: [\"tags\", \"context\"]` (or `metadata`, Tier 2) to inspect values. Prefer this over fetching and scanning a full page.\n- **Distribution of values for a field** — Tier 2: `aggregate: [format|resource_type|type]` for enum counts, or range aggregations on `bytes`, `image_pixels`, `video_pixels`, or `duration`. Tier 1 fallback: run N small queries with `max_results: 0`, one per candidate value, and read `total_count` from each.\n- **\"Which assets have any value for `metadata.<id>`?\"** — not expressible directly (`metadata.X:*` is a parse error; there is no presence probe). Workarounds: (a) if the field has a known value set, enumerate — `metadata.region:(apac OR emea OR amer)`; (b) query broadly with `with_field: [\"metadata\"]` (Tier 2) and filter client-side for entries where the field is set; (c) at ingest time, attach a sentinel tag whenever the field is set, then search by that tag.\n- **Newest / largest N** — keep the filter in `expression` and sort explicitly: `sort_by: [{uploaded_at: \"desc\"}]` with `max_results: 10`.\n- **Filter by folder** — both `asset_folder:\"parent/child\"` and `folder:\"parent/child\"` match an exact folder path; there is no wildcard or \"contains\". To query across multiple folders, enumerate: `asset_folder:(\"campaigns/2024\" OR \"campaigns/2025\")`.\n- **Filter by metadata when you only know the label** — first call `list-metadata-fields` to resolve the label to an `external_id`, then query `metadata.<external_id>:value`.\n- **Multiple independent filters in one turn** — prefer one `expression` with `OR` / parentheses over firing many parallel calls: `metadata.region:apac OR metadata.region:emea` in a single request is faster and more reliable than two parallel requests.\n\n## Examples\n\n- `tags:shirt AND uploaded_at>1d`\n- `resource_type:image AND bytes>1000000 AND (format:png OR format:jpg)`\n- `folder:products AND context.category:electronics`\n- `tags:\"service:mantels\" AND -tags:discontinued`\n"
82
82
  },
83
83
  {
84
84
  "name": "visual-search-assets",
@@ -1 +1 @@
1
- {"version":3,"file":"tool-names.js","sourceRoot":"","sources":["../src/tool-names.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,MAAM,CAAC,MAAM,SAAS,GAAgD;IACpE;QACE,MAAM,EAAE,cAAc;QACtB,aAAa,EAAE,y7BAAy7B;KACz8B;IACD;QACE,MAAM,EAAE,cAAc;QACtB,aAAa,EAAE,6GAA6G;KAC7H;IACD;QACE,MAAM,EAAE,k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gC;IACD;QACE,MAAM,EAAE,iBAAiB;QACzB,aAAa,EAAE,8uBAA8uB;KAC9vB;CACF,CAAC"}
1
+ {"version":3,"file":"tool-names.js","sourceRoot":"","sources":["../src/tool-names.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,MAAM,CAAC,MAAM,SAAS,GAAgD;IACpE;QACE,MAAM,EAAE,cAAc;QACtB,aAAa,EAAE,y7BAAy7B;KACz8B;IACD;QACE,MAAM,EAAE,cAAc;QACtB,aAAa,EAAE,6GAA6G;KAC7H;IACD;QACE,MAAM,EAAE,kBAAkB;QAC1B,aAAa,EAAE,6LAA6L;KAC7M;IACD;QACE,MAAM,EAAE,uBAAuB;QAC/B,aAAa,EAAE,oCAAoC;KACpD;IACD;QACE,MAAM,EAAE,cAAc;QACtB,aAAa,EAAE,8EAA8E;KAC9F;IACD;QACE,MAAM,EAAE,aAAa;QACrB,aAAa,EAAE,gJAAgJ;KAChK;IACD;QACE,MAAM,EAAE,aAAa;QACrB,aAAa,EAAE,gJAAgJ;KAChK;IACD;QACE,MAAM,EAAE,YAAY;QACpB,aAAa,EAAE,4IAA4I;KAC5J;IACD;QACE,MAAM,EAAE,mBAAmB;QAC3B,aAAa,EAAE,iGAAiG;KACjH;IACD;QACE,MAAM,EAAE,cAAc;QACtB,aAAa,EAAE,qbAAqb;KACrc;IACD;QACE,MAAM,EAAE,WAAW;QACnB,aAAa,EAAE,kSAAkS;KAClT;IACD;QACE,MAAM,EAAE,uBAAuB;QAC/B,aAAa,EAAE,8EAA8E;KAC9F;IACD;QACE,MAAM,EAAE,mBAAmB;QAC3B,aAAa,EAAE,wQAAwQ;KACxR;IACD;QACE,MAAM,EAAE,wBAAwB;QAChC,aAAa,EAAE,oeAAoe;KACpf;IACD;QACE,MAAM,EAAE,wBAAwB;QAChC,aAAa,EAAE,+VAA+V;KAC/W;IACD;QACE,MAAM,EAAE,aAAa;QACrB,aAAa,EAAE,0NAA0N;KAC1O;IACD;QACE,MAAM,EAAE,eAAe;QACvB,aAAa,EAAE,2GAA2G;KAC3H;IACD;QACE,MAAM,EAAE,eAAe;QACvB,aAAa,EAAE,kGAAkG;KAClH;IACD;QACE,MAAM,EAAE,gBAAgB;QACxB,aAAa,EAAE,4QAA4Q;KAC5R;IACD;QACE,MAAM,EAAE,eAAe;QACvB,aAAa,EAAE,2pNAA2pN;KAC3qN;IACD;QACE,MAAM,EAAE,sBAAsB;QAC9B,aAAa,EAAE,4UAA4U;KAC5V;IACD;QACE,MAAM,EAAE,kBAAkB;QAC1B,aAAa,EAAE,i/BAAi/B;KACjgC;IACD;QACE,MAAM,EAAE,iBAAiB;QACzB,aAAa,EAAE,8uBAA8uB;KAC9vB;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudinary/asset-management-mcp",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "mcpName": "io.github.cloudinary/asset-management-mcp",
5
5
  "author": "Cloudinary",
6
6
  "type": "module",
@@ -32,9 +32,53 @@ import { Result } from "../types/fp.js";
32
32
  * @remarks
33
33
  * Returns a list of resources matching the specified search criteria.
34
34
  *
35
- * Uses Lucene-like query language to search by descriptive attributes (public_id, filename, folder, tags, context), file details (resource_type, format, bytes, width, height), embedded data (image_metadata), and analyzed data (face_count, colors, quality_score). Supports aggregate counts and complex Boolean expressions.
35
+ * Uses a Lucene-like query language to filter assets by descriptive attributes (`public_id`, `asset_id`, `filename`, `display_name`, `folder` / `asset_folder`, `tags`, `context.<key>`), file details (`resource_type`, `type`, `format`, `bytes`, `width`, `height`, `duration`, `pages`, `aspect_ratio`, `transparent`, `grayscale`), lifecycle dates (`uploaded_at`, `created_at`, `taken_at`, `updated_at`, `last_updated.<kind>`), moderation and lifecycle state (`status`, `moderation_status`, `moderation_kind`), embedded data (`image_metadata.*`), structured metadata (`metadata.<external_id>`), and analysis fields (`face_count`, `colors`, `quality_score`, `illustration_score`, `accessibility_analysis.*`). Supports sorting, aggregate counts, and complex boolean expressions. See the `expression` parameter for the full field reference.
36
36
  *
37
- * Examples: tags:shirt AND uploaded_at>1d, resource_type:image AND bytes>1mb, folder:products OR context.category:electronics
37
+ * ## Expression syntax
38
+ *
39
+ * - **Match**: `field:value` (token match) or `field=value` (exact match). Examples: `tags:shirt`, `tags=cotton`.
40
+ * - **Comparisons**: `>`, `<`, `>=`, `<=` for numbers and dates. Example: `bytes>10000000`.
41
+ * - **Ranges**: `field:[from TO to]` inclusive, `field:{from TO to}` exclusive. Example: `width:{200 TO 1028}`.
42
+ * - **Booleans**: `AND`, `OR`, `NOT` (uppercase), or `+` (must), `-` (must not). `NOT` must appear between clauses — a bare leading `NOT` is a parse error; use `-field:value` to negate the first clause. Group with parentheses: `(shirt OR pants) AND clothes`.
43
+ * - **Wildcards**: trailing `*` only, for prefix match (`public_id:shoes_*`, `format:jp*`, `tags:shirt*`). Not supported on `folder`, `asset_folder`, `resource_type`, or `type`. Leading `*`, middle `*`, `?`, and bare `*` (`folder:*`, `context.alt:*`) are all parse errors — wildcards cannot be used as a "field is present" probe.
44
+ * - **Tokenized vs exact fields**: `tags`, `filename`, `display_name`, `context.<key>`, and `metadata.<id>` match on tokens split by whitespace and punctuation — `tags:analysis` matches the tag `full-analysis`. `public_id`, `folder`, `asset_folder`, and `format` match the whole value — `public_id:dog` will not match `dog_pldcwy`; use `public_id="dog_pldcwy"` (exact) or `public_id:dog*` (prefix). These exact-match fields still accept a trailing `*` for prefix match (except `folder` / `asset_folder`, where wildcards are ignored).
45
+ * - **Dates**: ISO-8601 in quotes (`uploaded_at>"2024-01-15"`) or relative shorthand `Nh`, `Nd`, `Nw`, `Nm`, `Ny` (`uploaded_at>1d`, `created_at:[4w TO 1w]`). Send raw `<`/`>`, never HTML-escaped.
46
+ * - **Quoting**: wrap any value containing a space, colon, or other reserved character (`! ( ) { } [ ] ^ ~ ? \ = & < > |`) in double quotes, or escape each character with `\`. Examples: `tags:"service:mantels"`, `aspect_ratio:"16:9"`, `folder:"My Folder"`.
47
+ *
48
+ * ## Common mistakes
49
+ *
50
+ * - Use `folder:` or `asset_folder:` (singular); `folders:`, `asset_folder_id:`, and other invented variants are not valid fields. Pass the exact folder name — wildcards do not apply here.
51
+ * - There is no "has any value" / presence probe. `folder:*`, `metadata.alt:*`, `context.key:*`, `tags:*`, and `-tags:*` are all parse errors. See *"Which assets have any value for `metadata.<id>`?"* under **Common tasks** for workarounds.
52
+ * - `NOT foo AND bar` is a parse error. Write it as `bar AND NOT foo` or `-foo AND bar`, and keep every `NOT` between two clauses (`a AND NOT b AND NOT c` is fine; `NOT b AND NOT c …` is not).
53
+ * - `public_id:dog` will not match `dog_pldcwy`. Use `public_id="dog_pldcwy"` (exact) or `public_id:dog*` (prefix).
54
+ * - `tags=service:mantels` fails because the unquoted colon is parsed as a field separator. Use `tags="service:mantels"` or `tags=service\:mantels`.
55
+ * - Do not HTML-escape operators. Send `uploaded_at<1h`, not `uploaded_at&lt;1h`.
56
+ * - Do not leave an operand empty (e.g. `tags: AND -tags:foo`). Omit the empty clause entirely.
57
+ *
58
+ * ## Tips
59
+ *
60
+ * - Set `max_results: 0` to return only `total_count` and `aggregations` without any resource payload — useful for counts and aggregation-only queries.
61
+ * - `total_count` is always present in the response; prefer it over running an aggregation just to get a count.
62
+ * - `aggregate` (both simple and range variants) and the `metadata`, `image_metadata`, `image_analysis` values of `with_field` require a Tier 2 search plan.
63
+ * - Range aggregations require each range to include a `key` label (1–20 chars, `[a-zA-Z0-9_-]+`) and at least one of `from` / `to`.
64
+ *
65
+ * ## Common tasks
66
+ *
67
+ * - **Count matching assets** — put the filter in `expression` with `max_results: 0` and read `total_count` from the response. Works on every tier; no `aggregate` needed.
68
+ * - **Preview one matching asset** — set `max_results: 1`; add `with_field: ["tags", "context"]` (or `metadata`, Tier 2) to inspect values. Prefer this over fetching and scanning a full page.
69
+ * - **Distribution of values for a field** — Tier 2: `aggregate: [format|resource_type|type]` for enum counts, or range aggregations on `bytes`, `image_pixels`, `video_pixels`, or `duration`. Tier 1 fallback: run N small queries with `max_results: 0`, one per candidate value, and read `total_count` from each.
70
+ * - **"Which assets have any value for `metadata.<id>`?"** — not expressible directly (`metadata.X:*` is a parse error; there is no presence probe). Workarounds: (a) if the field has a known value set, enumerate — `metadata.region:(apac OR emea OR amer)`; (b) query broadly with `with_field: ["metadata"]` (Tier 2) and filter client-side for entries where the field is set; (c) at ingest time, attach a sentinel tag whenever the field is set, then search by that tag.
71
+ * - **Newest / largest N** — keep the filter in `expression` and sort explicitly: `sort_by: [{uploaded_at: "desc"}]` with `max_results: 10`.
72
+ * - **Filter by folder** — both `asset_folder:"parent/child"` and `folder:"parent/child"` match an exact folder path; there is no wildcard or "contains". To query across multiple folders, enumerate: `asset_folder:("campaigns/2024" OR "campaigns/2025")`.
73
+ * - **Filter by metadata when you only know the label** — first call `list-metadata-fields` to resolve the label to an `external_id`, then query `metadata.<external_id>:value`.
74
+ * - **Multiple independent filters in one turn** — prefer one `expression` with `OR` / parentheses over firing many parallel calls: `metadata.region:apac OR metadata.region:emea` in a single request is faster and more reliable than two parallel requests.
75
+ *
76
+ * ## Examples
77
+ *
78
+ * - `tags:shirt AND uploaded_at>1d`
79
+ * - `resource_type:image AND bytes>1000000 AND (format:png OR format:jpg)`
80
+ * - `folder:products AND context.category:electronics`
81
+ * - `tags:"service:mantels" AND -tags:discontinued`
38
82
  */
39
83
  export function searchSearchAssets(
40
84
  client$: CloudinaryAssetMgmtCore,
@@ -933,7 +933,7 @@ http_headers = { "api-key" = "YOUR_API_KEY", "api-secret" = "YOUR_API_SECRET", "
933
933
  <h1>Instructions</h1>
934
934
  <p>One-click installation for Claude Desktop users</p>
935
935
  <div class="instruction-item">
936
- <a href="https://github.com/cloudinary/asset-management-mcp/releases/download/v0.9.0/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
936
+ <a href="https://github.com/cloudinary/asset-management-mcp/releases/download/v0.9.1/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
937
937
  📥 Download MCP Bundle
938
938
  </a>
939
939
  </div>
package/src/lib/config.ts CHANGED
@@ -112,9 +112,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
112
112
 
113
113
  export const SDK_METADATA = {
114
114
  language: "typescript",
115
- openapiDocVersion: "0.5.0",
116
- sdkVersion: "0.9.0",
115
+ openapiDocVersion: "0.5.1",
116
+ sdkVersion: "0.9.1",
117
117
  genVersion: "2.881.4",
118
118
  userAgent:
119
- "speakeasy-sdk/mcp-typescript 0.9.0 2.881.4 0.5.0 @cloudinary/asset-management-mcp",
119
+ "speakeasy-sdk/mcp-typescript 0.9.1 2.881.4 0.5.1 @cloudinary/asset-management-mcp",
120
120
  } as const;
@@ -22,7 +22,7 @@ const routes = buildRouteMap({
22
22
  export const app = buildApplication(routes, {
23
23
  name: "mcp",
24
24
  versionInfo: {
25
- currentVersion: "0.9.0",
25
+ currentVersion: "0.9.1",
26
26
  },
27
27
  });
28
28
 
@@ -60,7 +60,7 @@ export function createMCPServer(deps: {
60
60
  }) {
61
61
  const server = new McpServer({
62
62
  name: "CloudinaryAssetMgmt",
63
- version: "0.9.0",
63
+ version: "0.9.1",
64
64
  });
65
65
 
66
66
  const getClient = deps.getSDK || (() =>