Previously, the meta parameter was incorrectly passed to the icons position
due to missing icons argument. Also adds icons support to Builder::addTool()
for consistency with the Tool schema.
* fix: standardize error handling across handlers with MCP specification compliance
* Update mcp-elements.md
Co-authored-by: Christopher Hertel <mail@christopher-hertel.de>
* docs: clarify error handling behavior for all element types
* docs: remove unnecessary whitespace in mcp-elements.md
* fix: simplify exception signatures to accept simple messages
* refactor: use specific exceptions in examples for better error handling
* feat: throw exceptions from reference provider instead of returning null
---------
Co-authored-by: Christopher Hertel <mail@christopher-hertel.de>
* feat: make CORS headers configurable in StreamableHttpTransport
* docs: add CORS configuration documentation for HTTP transport
* refactor: streamline request creation and transport initialization in HTTP client example
* feat(server): add bidirectional client communication support
* fix(server): use correct session ID string conversion method
* fix: clean up docblocks for request handler methods in Builder
* fix: merge artifacts
* feat: replace connect/listen flow with run lifecycle
* feat(transport): add phpstan generics for typed transport returns
* refactor: standardize variable naming for MCP server instances in transport handling
* test: remove unnecessary phpstan-ignore annotation in DocBlockTestFixture
* refactor: reorganize server handlers and transport structure
* feat: move the test files to corresponding directories
* fix: linter issues
* fix: correct PHPDoc formatting and streamline handler imports
* refactor: update import statement for ServerBuilder to Builder
* refactor: integrate cache parameter into setDiscovery() method
- Add cache as 4th parameter to setDiscovery()
- Rename $cache to $discoveryCache for clarity
- Remove separate setCache() method
- Update example to use new API
* docs: update discovery caching documentation to use new API
- Update examples to use cache parameter in setDiscovery() method
- Remove references to separate setCache() method calls
10 - Added the list resources handler with test class
10 - Update the ListPromptsHandler to use annotations
10 - Add the list resource handler, and it's test as well
10 - Added the registry logic
10 - Added the list tools handler logic
10 - Fix all php-cs-fixer related issues
10 - Resolved phpstan issues for ListPromptsHandlerTest
10 - Resolved phpstan issues for ListToolsHandlerTest
10 - Resolved phpstan issues for ListResourcesHandlerTest
10 - Resolved phpstan issues in registry class
10 - Resolved phpstan issues for the handler class
10 - Resolved php cs fixer issues
10 - Resolved all phpstan issues by generating the baseline again
10 - Remove the two loop operation and use foreach for optimization
10 - Removed unused code and resolved namespace
10 - Add signatures to interface and registry
10 - Add updated phpstan rule set
10 - Arranged according to property type
10 - Introduce reference page DTO, fix all failing test
10 - Resolve cs-fixer issues
10 - Resolve phpstan issues
10 - Resolve php cs fixer issues
10 - Created a reference directory for the Page DTO
10 - Remove manual loop for clean code readability
Co-authored-by: larry.sulebalogun <larry.sulebalogun@tillo.io>
* feat: implement discovery caching with state-based approach
- Add DiscoveryState class to encapsulate discovered MCP capabilities
- Add exportDiscoveryState and importDiscoveryState methods to Registry
- Modify Discoverer to return DiscoveryState instead of void
- Create CachedDiscoverer decorator for caching discovery results
- Add importDiscoveryState method to ReferenceRegistryInterface
- Update ServerBuilder to use caching with withCache() method
- Update tests to work with new state-based approach
- Add example demonstrating cached discovery functionality
- Add PSR-16 SimpleCache and Symfony Cache dependencies
* docs: add comprehensive discovery caching documentation
- Add detailed documentation explaining discovery caching architecture
- Include usage examples for different cache implementations
- Document performance benefits and best practices
- Add troubleshooting guide and migration instructions
- Include complete API reference for all caching components
- Fix PHPStan issues by regenerating baseline
- Apply PHP CS Fixer formatting to all new files
* refactor: address reviewer feedback and clean up discovery caching
- Make DiscoveryState class final
- Cache DiscoveryState objects directly instead of arrays (no serialization needed)
- Rename exportDiscoveryState/importDiscoveryState to getDiscoveryState/setDiscoveryState
- Add getDiscoveryState method to ReferenceRegistryInterface
- Remove TTL parameter from CachedDiscoverer (no expiration by default)
- Remove unused methods from DiscoveryState (toArray, fromArray, merge)
- Simplify ServerBuilder to handle decoration internally
- Make Discoverer.applyDiscoveryState() internal (no longer public API)
- Simplify documentation to focus on user perspective
- Remove unnecessary development comments
- Update all tests to work with new architecture
- All tests pass, PHPStan clean, code formatting applied
* refactor: clean up comments and formatting in server.php example
* refactor: improve code formatting and consistency in discovery classes and example server
* Fix method names in cached discovery example
- Change withServerInfo() to setServerInfo()
- Change withDiscovery() to setDiscovery()
- Change withLogger() to setLogger()
- Fixes PHPStan static analysis errors
* refactor: update method names in ServerBuilder for consistency
- Change withCache() to setCache() in ServerBuilder
- Update example and documentation to reflect method name changes
- Ensure consistency across caching implementation in examples and documentation
* refactor: reorganize examples and fix PHPStan baseline
- Move cached discovery example from examples/10 to examples/09
- Update composer.json autoload-dev namespace mapping
- Fix PHPStan baseline by removing invalid entries for non-existent files
- Update server.php to follow proper example pattern with logging and lifecycle
* fix: correct formatting in server.php
- Remove ToolChain, ResourceChain, PromptChain classes
- Remove Collection/Identifier/Metadata interfaces (only used by old Chains)
- Remove ToolCollectionInterface (unused)
- Delete obsolete examples 09-standalone-cli and 10-simple-http-transport
- Fix STDERR handling in bootstrap.php for web environments
- Clean up CHANGELOG.md