Skip to content

Conversation

@winklertomas
Copy link
Collaborator

Motivation

Which issue does this fix? Fixes #issue number

If no issue exists, what is the fix or new feature? Were there any reasons to fix/implement things that are not obvious?

Checklist

  • Code follows coding conventions held in this repo
  • Automated tests have been added
  • Tests are passing
  • Docs have been updated (if applicable)
  • Temporary settings (e.g. variables used during development and testing) have been reverted to defaults

How to test

If manual testing is required, what are the steps?

@winklertomas winklertomas requested review from a team and JiriLojda as code owners September 26, 2025 15:21
@winklertomas winklertomas force-pushed the EN-584_update_the_SKD_and_use_new_variant_filter_endpoint branch from b6540cd to 9392843 Compare September 26, 2025 15:28
.withAction(`projects/${environmentId}/early-access/variants/filter`)
.withData(requestPayload)
.toPromise();
const response = await query.toPromise();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not to use the same approach as in other listing tools? Something like in list-assets-mapi for example? Meaning using toAllPromise. That way the AI agent doesn't need to know about paging and continuation tokens...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know the toAllPromise() SDK method, I will fix that :-)

package.json Outdated
"license": "MIT",
"dependencies": {
"@kontent-ai/management-sdk": "^7.9.0",
"@kontent-ai/management-sdk": "^7.11.0-4",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that after we approve the PR for the SDK, Risa is going to release new version (not pre-release). That means we should probably wait for that...

@winklertomas winklertomas force-pushed the EN-584_update_the_SKD_and_use_new_variant_filter_endpoint branch 2 times, most recently from ba274f0 to 036d44a Compare September 29, 2025 13:50
README.md Outdated
* **create-variant-version-mapi** – Create new version of Kontent.ai language variant via Management API. This operation creates a new version of an existing language variant, useful for content versioning and creating new drafts from published content
* **delete-language-variant-mapi** – Delete Kontent.ai language variant from Management API
* **filter-variants-mapi** – Filter Kontent.ai language variants of content items using Management API. Use for exact keyword matching and finding specific terms in content. Supports full filtering capabilities (content types, workflow steps, taxonomies, etc.)
* **filter-variants-mapi** – Filter Kontent.ai language variants of content items using Management API. Use for exact keyword matching and finding specific terms in content. Supports full filtering capabilities (content types, workflow steps, taxonomies, etc.), pagination with continuation tokens, and optionally includes full content of variants

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't confuse the AI agent with any continuation tokens anymore :)

const allItems = response.responses.flatMap((r) => r.rawData.data);

return createMcpToolSuccessResponse(response.data);
return createMcpToolSuccessResponse({ data: allItems });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to return an object instead of the array of all items?

@winklertomas winklertomas force-pushed the EN-584_update_the_SKD_and_use_new_variant_filter_endpoint branch from 036d44a to 01dd42f Compare September 29, 2025 14:04
@winklertomas winklertomas merged commit 3adaada into master Sep 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants