File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ Key benefits:
7272 ttl : 100
7373 tools :
7474 - KLP\KlpMcpServer\Services\ToolService\Examples\HelloWorldTool
75+ - KLP\KlpMcpServer\Services\ToolService\Examples\ProfileGeneratorTool
7576 - KLP\KlpMcpServer\Services\ToolService\Examples\StreamingDataTool
7677 - KLP\KlpMcpServer\Services\ToolService\Examples\VersionCheckTool
7778 resources :
Original file line number Diff line number Diff line change @@ -309,6 +309,19 @@ For referencing external resources:
309309return new ResourceToolResult($resourceUri, 'application/json');
310310```
311311
312+ #### CollectionToolResult
313+ For combining multiple tool results into a single response:
314+
315+ ``` php
316+ $collection = new CollectionToolResult;
317+ $collection->addItem(new TextToolResult("Operation completed successfully"));
318+ $collection->addItem(new ImageToolResult($imageData, 'image/png'));
319+
320+ return $collection;
321+ ```
322+
323+ You can add any type of ToolResultInterface object to a CollectionToolResult, except another CollectionToolResult (nesting is not supported).
324+
312325## Testing Your MCP Tools
313326
314327### Using the Test Command
You can’t perform that action at this time.
0 commit comments