We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5bfd6bf commit 90a581aCopy full SHA for 90a581a
README.md
@@ -96,3 +96,23 @@ final readonly class McpController
96
}
97
98
```
99
+
100
+### Exposing Tools
101
102
+Under the hood the SDK uses [LLM Chain](https://github.com/php-llm/llm-chain)'s `ToolBox` to register, analyze and
103
+execute tools. In combination with its [Symfony Bundle](https://github.com/php-llm/llm-chain-bundle) you can expose
104
+tools with `#[AsTool]` attribute.
105
106
+```php
107
+use PhpLlm\LlmChain\ToolBox\Attribute\AsTool;
108
109
+#[AsTool('company_name', 'Provides the name of your company')]
110
+final class CompanyName
111
+{
112
+ public function __invoke(): string
113
+ {
114
+ return 'ACME Corp.'
115
+ }
116
+}
117
+```
118
+See [LLM Chain Documentation](https://github.com/php-llm/llm-chain?tab=readme-ov-file#tools) for more information.
0 commit comments