Skip to content

Commit 2efd55b

Browse files
committed
Completed reference for Client class. Clean up formatting.
1 parent 73e70b8 commit 2efd55b

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

docs/reference.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ This class follows an MCP client-server architecture, where:
2121

2222
| Name | Description |
2323
| --- | --- |
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](). |
2727

2828

2929
## `Client` class
@@ -48,10 +48,13 @@ The service supports:
4848

4949
| Name | Description |
5050
| --- | --- |
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. |
5659

5760
## `Server` class

0 commit comments

Comments
 (0)