Skip to content

Add tool annotations support#151

Merged
laulauland merged 2 commits intomainfrom
claude/investigate-tool-annotations-011CUfPTtSGRzuU7xB3a2J4K
Nov 3, 2025
Merged

Add tool annotations support#151
laulauland merged 2 commits intomainfrom
claude/investigate-tool-annotations-011CUfPTtSGRzuU7xB3a2J4K

Conversation

@laulauland
Copy link
Copy Markdown
Member

Implements tool annotations per MCP specification 2025-06-18, enabling servers to provide behavioral hints and metadata about tools.

Changes:

  • Added ToolAnnotations interface extending Annotations with tool-specific fields
  • Updated Tool interface to include optional annotations field
  • Extended tool() method to accept and pass through annotations
  • Added comprehensive test coverage for all annotation fields
  • Documented annotations feature with examples in README and JSDoc

Annotations include:

  • Behavioral hints: readOnlyHint, destructiveHint, idempotentHint, openWorldHint
  • Base fields: audience, priority, lastModified, title

This allows clients to make informed decisions about tool usage, understand tool behavior, and identify potential risks.

Closes #150

Implements tool annotations per MCP specification 2025-06-18, enabling
servers to provide behavioral hints and metadata about tools.

Changes:
- Added ToolAnnotations interface extending Annotations with tool-specific fields
- Updated Tool interface to include optional annotations field
- Extended tool() method to accept and pass through annotations
- Added comprehensive test coverage for all annotation fields
- Documented annotations feature with examples in README and JSDoc

Annotations include:
- Behavioral hints: readOnlyHint, destructiveHint, idempotentHint, openWorldHint
- Base fields: audience, priority, lastModified, title

This allows clients to make informed decisions about tool usage, understand
tool behavior, and identify potential risks.

Closes: Investigation of tool annotations support
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Oct 31, 2025

🦋 Changeset detected

Latest commit: 3530968

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
mcp-lite Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Oct 31, 2025

Open in StackBlitz

npm i https://pkg.pr.new/fiberplane/mcp-lite@151

commit: 3530968

Copy link
Copy Markdown
Contributor

@brettimus brettimus left a comment

Choose a reason for hiding this comment

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

just add changeset 👍

glad we support this now, it's useful for openai

@clearlysid
Copy link
Copy Markdown

PR looks great 🙌

@laulauland laulauland merged commit 75ed6f5 into main Nov 3, 2025
3 checks passed
@laulauland laulauland deleted the claude/investigate-tool-annotations-011CUfPTtSGRzuU7xB3a2J4K branch November 3, 2025 09:32
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.

Support ToolAnnotations

4 participants