You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference.md
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,9 @@ This class follows an MCP client-server architecture, where:
21
21
22
22
| Name | Description |
23
23
| --- | --- |
24
-
|`AiCommand:__invoke( array $args, array $assoc_args )`| <ul><li>Creates an AI server and client instance.</li><li>Registers tools & resources for AI processing.</li><li>Sends user input ($args[0]) to AI.</li><li>Outputs AI-generated results.</li></ul> |
25
-
|`AiCommand:register_tools( Server $server, $client )`| Registers functionality AI can invoke. See [available tools](tools.md). |
26
-
|`AiCommand:register_resources( Server $server )`| Registers structured datasets AI can access. See [available resources](). |
24
+
|`AiCommand::__invoke()`| <ul><li>Creates an AI server and client instance.</li><li>Registers tools & resources for AI processing.</li><li>Sends user input ($args[0]) to AI.</li><li>Outputs AI-generated results.</li></ul> |
25
+
|`AiCommand::register_tools()`| Registers functionality AI can invoke. See [available tools](tools.md). |
26
+
|`AiCommand::register_resources()`| Registers structured datasets AI can access. See [available resources](). |
27
27
28
28
29
29
## `Client` class
@@ -48,10 +48,13 @@ The service supports:
48
48
49
49
| Name | Description |
50
50
| --- | --- |
51
-
|`Client:__construct( Server $server )`| Constructor |
52
-
|`Client:send_request( string $method, array $params = [] )`| Constructs a JSON-RPC request, sends it to the AI service, and decodes the response. |
53
-
|`Client:__call( string $name, array $arguments )`| A magic method to call any AI service method dynamically. |
54
-
|`Client:list_resources()`| Retrieves available AI-generated content. |
55
-
|`Client:read_resource( string $uri )`| Reads a specific AI-generated resource. |
51
+
|`Client::__construct()`| Constructor |
52
+
|`Client::send_request()`| Constructs a JSON-RPC request, sends it to the AI service, and decodes the response. |
53
+
|`Client::__call()`| A magic method to call any AI service method dynamically. |
54
+
|`Client::list_resources()`| Retrieves available AI-generated content. |
55
+
|`Client::read_resource()`| Reads a specific AI-generated resource. |
56
+
|`Client::get_image_from_ai_service()`| Calls an AI image generation service. Uses `AI_Capability::IMAGE_GENERATION` capibilities. Returns the image URL. |
57
+
|`Client::call_ai_service_with_prompt()`| Calls AI with a text prompt. |
58
+
|`Client::call_ai_service()`| AI function calls and processing. |
0 commit comments