You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: tool outputSchema, resource/template annotations, structuredContent — bump to v0.31.0
- Add outputSchema support on MCPTool with automatic structuredContent generation
- Add MCPResourceAnnotations (audience, priority) for resources and resource templates
- Builder-style API: setOutputSchema(), setAudience(), setPriority()
- structuredContent auto-generated for tools with outputSchema when handler returns valid JSON
- 27 new tests covering all new features — total: 1064 tests
Copy file name to clipboardExpand all lines: CHANGELOG.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,20 @@
2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
+
## [0.31.0] — 2026-02-21
6
+
7
+
### Added
8
+
-**Tool `outputSchema`**: Optional JSON Schema for structured tool output per MCP 2025-03-26 spec. Tools with `outputSchema` automatically include `structuredContent` in their response when the handler returns valid JSON.
9
+
-**Resource annotations**: `audience` and `priority` hints on `MCPResource` for guiding client/model behavior. Builder-style API: `res.setAudience("user").setPriority(0.8f)`.
10
+
-**Resource template annotations**: Same annotation support on `MCPResourceTemplate`.
11
+
-**`MCPResourceAnnotations` struct**: Reusable annotations with `setAudience()`, `setPriority()`, and `toJson()`.
When a tool with `outputSchema` returns valid JSON, the response automatically includes both `content` (text) and `structuredContent` (parsed JSON), per MCP 2025-03-26 spec.
304
+
305
+
### Resource & Template Annotations
306
+
307
+
Resources and resource templates support `audience` and `priority` annotations:
0 commit comments