Skip to content

Commit 7cb92e8

Browse files
author
klapaudius
committed
Add streaming tool support and progress notifications
- Updated documentation to include streaming tool support and new tool result types (Text, Image, Audio, Resource). - Enhanced example tools with `StreamingDataTool` and progress notification capabilities. - Updated CHANGELOG to reflect support for progress notifications and structured tool results.
1 parent 56e98d1 commit 7cb92e8

File tree

5 files changed

+478
-8
lines changed

5 files changed

+478
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
- **Core Features:**
44
- Add real-time communication support through Streamable Http
5+
- Add Streaming Tool Support
6+
- Add TextToolResult, AudioToolResult, ImageToolResult and ResourceToolResult to properly manage tool returns
7+
- Both SSE and StreamableHttp can be active that makes clients able to use the old protocol version
58
- **Deprecations:**
69
- Configuration key `klp_mcp_server.server_provider` is replaced by `klp_mcp_server.server_providers` to maintain backward compatibility
710
for clients that does not support the `2025-03-26` protocol version yet.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Key benefits:
4141

4242
- Real-time communication support through StreamableHTTP and/or Server-Sent Events (SSE) integration
4343
- Implementation of tools and resources compliant with Model Context Protocol specifications
44+
- Support of streaming tools with progres notifications
45+
- Support different types of tool results such as Text, Image, Audio, or Resource
4446
- Adapter-based design architecture with Pub/Sub messaging pattern
4547

4648
## Requirements
@@ -70,6 +72,7 @@ Key benefits:
7072
ttl: 100
7173
tools:
7274
- KLP\KlpMcpServer\Services\ToolService\Examples\HelloWorldTool
75+
- KLP\KlpMcpServer\Services\ToolService\Examples\StreamingDataTool
7376
- KLP\KlpMcpServer\Services\ToolService\Examples\VersionCheckTool
7477
resources:
7578
- KLP\KlpMcpServer\Services\ResourceService\Examples\HelloWorldResource
@@ -128,6 +131,9 @@ This command:
128131
You can also manually create and register tools in `config/packages/klp_mcp_server.yaml`:
129132

130133
```php
134+
use KLP\KlpMcpServer\Services\ProgressService\ProgressNotifierInterface;
135+
use KLP\KlpMcpServer\Services\ToolService\Annotation\ToolAnnotation;
136+
use KLP\KlpMcpServer\Services\ToolService\Result\ToolResultInterface;
131137
use KLP\KlpMcpServer\Services\ToolService\StreamableToolInterface;
132138
133139
class MyCustomTool implements StreamableToolInterface
@@ -156,6 +162,7 @@ This helps you rapidly develop and debug tools by:
156162
- Showing the tool's input schema and validating inputs
157163
- Executing the tool with your provided input
158164
- Displaying formatted results or detailed error information
165+
- Displaying progress notifications for streaming tool
159166
- Supporting complex input types including objects and arrays
160167

161168
**For deep diving into tools creation please take a look at dedicated documentation [Here](https://github.com/klapaudius/symfony-mcp-server/blob/master/docs/building_tools.md)**

0 commit comments

Comments
 (0)