Skip to content

chore (ai/mcp): add assertCapability method to experimental MCP client (#6047)#6058

Merged
lgrammel merged 1 commit intov5from
lg/HWd68W9o
Apr 30, 2025
Merged

chore (ai/mcp): add assertCapability method to experimental MCP client (#6047)#6058
lgrammel merged 1 commit intov5from
lg/HWd68W9o

Conversation

@lgrammel
Copy link
Copy Markdown
Collaborator

Background

Splits up #5972 into package changes and updates to examples.

Summary

Moves capabilities validation downstream to the request level instead of the method level.

This PR adds a new private assertCapability method called at the request level. This means our custom, lightweight client defaults strict mode to true for tool listing and tool calling.

…ent (#6047)

<!--
Welcome to contributing to AI SDK! We're excited to see your changes.

We suggest you read the following contributing guide we've created
before submitting:

https://github.com/vercel/ai/blob/main/CONTRIBUTING.md
-->

## Background

Splits up #5972 into package changes
and updates to examples.

## Summary

Moves capabilities validation downstream to the request level instead of
the method level.

This PR adds a new private `assertCapability` method called at the
request level. This means our custom, lightweight client defaults strict
mode to true for tool listing and tool calling.

## Verification

<!--
For features & bugfixes.
Please explain how you *manually* verified that the change works
end-to-end as expected (independent of automated tests).
Remove the section if it's not needed (e.g. for docs).
-->

## Tasks

<!--
This task list is intended to help you keep track of what you need to
do.
Feel free to add tasks and remove unnecessary tasks as needed.

Please check if the PR fulfills the following requirements:
-->

- [x] Tests have been added / updated (for bug fixes / features)
- [ ] Documentation has been added / updated (for bug fixes / features)
- [x] A _patch_ changeset for relevant packages has been added (for bug
fixes / features - run `pnpm changeset` in the project root)
- [x] Formatting issues have been fixed (run `pnpm prettier-fix` in the
project root)

## Future Work

<!--
Feel free to mention things not covered by this PR that can be done in
future PRs.
Remove the section if it's not needed.
 -->

## Related Issues

<!--
List related issues here, e.g. "Fixes #1234".
Remove the section if it's not needed.
-->
@lgrammel lgrammel self-assigned this Apr 30, 2025
@lgrammel lgrammel merged commit ec5933d into v5 Apr 30, 2025
9 checks passed
@lgrammel lgrammel deleted the lg/HWd68W9o branch April 30, 2025 06:27
iteratetograceness added a commit to iteratetograceness/ai that referenced this pull request May 9, 2025
…ent (vercel#6047) (vercel#6058)

## Background

Splits up vercel#5972 into package changes
and updates to examples.

## Summary

Moves capabilities validation downstream to the request level instead of
the method level.

This PR adds a new private `assertCapability` method called at the
request level. This means our custom, lightweight client defaults strict
mode to true for tool listing and tool calling.

Co-authored-by: Grace Yun <74513600+iteratetograceness@users.noreply.github.com>
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.

2 participants