This release includes breaking changes for platform teams planning a safe upgrade.
✓ No known CVEs patched in this version
Topics
Summary
AI summaryIntroduced with_plugins! macro for common plugin execution and added convenience methods to create tools.
Full changelog
TurboMCP v1.0.7 Release Notes
Release Highlights
Macro-Based Plugin Execution
Introduced with_plugins! macro for common plugin execution patterns. Reduces boilerplate for typical use cases while preserving manual implementation for advanced scenarios.
Tool Creation Helpers
Added default implementations and helper methods to Tool structs for common creation patterns.
Implementation Improvements
Fixed critical issues including unique request IDs, input validation, and plugin response handling.
Major Features
1. Macro-Based Plugin Execution
Introduced with_plugins! macro for common patterns while preserving manual implementation for advanced control.
Manual Implementation:
pub async fn call_tool_manual(&mut self, name: &str, args: Option<HashMap<String, serde_json::Value>>) -> Result<serde_json::Value> {
let request_data = CallToolRequest { ... };
let json_rpc_request = JsonRpcRequest { ... };
let mut req_ctx = RequestContext::new(...);
self.plugin_registry.execute_before_request(&mut req_ctx).await?;
let start_time = std::time::Instant::now();
let protocol_result = self.protocol.request("tools/call", params).await;
let duration = start_time.elapsed();
let mut resp_ctx = ResponseContext::new(...);
self.plugin_registry.execute_after_response(&mut resp_ctx).await?;
// Complex result processing...
match protocol_result { ... }
}
Macro Implementation:
pub async fn call_tool_macro(&mut self, name: &str, args: Option<HashMap<String, serde_json::Value>>) -> Result<serde_json::Value> {
let request_data = CallToolRequest {
name: name.to_string(),
arguments: Some(args.unwrap_or_default()),
};
with_plugins!(self, "tools/call", request_data, {
let result: CallToolResult = self.protocol
.request("tools/call", Some(serde_json::to_value(&request_data)?))
.await?;
Ok(self.extract_tool_content(&result))
})
}
2. Tool Creation Helpers
Added convenience methods for common Tool creation patterns:
// Helper method
let tool = Tool::with_description("test_tool", "A test tool");
// Full control when needed
let tool = Tool {
name: "test_tool".to_string(),
title: None,
description: Some("A test tool".to_string()),
input_schema: ToolInputSchema::default(),
output_schema: None,
annotations: None,
meta: None,
};
Technical Changes
Files Modified
crates/turbomcp-client/src/plugins/macros.rs(new): Plugin execution macroscrates/turbomcp-client/src/lib.rs: Updated methods to use macroscrates/turbomcp-protocol/src/types.rs: Added default implementations and helperscrates/turbomcp-client/src/plugins/mod.rs: Added macros module export
Key Implementation Details
with_plugins!macro handles complete plugin execution pipeline- Unique timestamp-based request IDs prevent collisions
- Tool name validation prevents protocol violations
- Complete plugin response modification support
Compatibility
- Backward Compatible: No breaking changes to existing plugin system
- Migration Optional: Existing implementations continue to work
- Zero Runtime Overhead: Macros compile to identical code as manual implementation
Installation
[dependencies]
turbomcp = "1.0.7"
Usage
Both approaches are supported:
// Macro approach for common patterns
with_plugins!(self, "method_name", request_data, {
// Your protocol call here
})
// Manual approach for granular control
let mut req_ctx = RequestContext::new(...);
self.plugin_registry.execute_before_request(&mut req_ctx).await?;
// ... full plugin pipeline
Tool creation helpers:
// Helper method
let tool = Tool::with_description("my_tool", "Description");
// Full control
let tool = Tool { /* all fields */ };
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
Related context
Beta — feedback welcome: [email protected]