Skip to content

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

Merged
iteratetograceness merged 2 commits intovercel:mainfrom
iteratetograceness:chore/mcp
Apr 29, 2025
Merged

chore (ai/mcp): add assertCapability method to experimental MCP client#6047
iteratetograceness merged 2 commits intovercel:mainfrom
iteratetograceness:chore/mcp

Conversation

@iteratetograceness
Copy link
Contributor

@iteratetograceness iteratetograceness commented Apr 29, 2025

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

Tasks

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

Future Work

Related Issues

@iteratetograceness iteratetograceness marked this pull request as ready for review April 29, 2025 16:22
@iteratetograceness iteratetograceness self-assigned this Apr 29, 2025
@iteratetograceness iteratetograceness merged commit 46cb332 into vercel:main Apr 29, 2025
7 of 8 checks passed
lgrammel pushed a commit that referenced this pull request Apr 30, 2025
…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 added a commit that referenced this pull request Apr 30, 2025
…ent (#6047) (#6058)

## 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.

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