Skip to content

Commit 91d628e

Browse files
committed
Update docs for Client class to include return value.
1 parent a944304 commit 91d628e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/reference.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ The service supports:
5353

5454
### Methods
5555

56-
| Name | Description |
57-
| --- | --- |
58-
| `Client::__construct()` | Constructor |
59-
| `Client::send_request()` | Constructs a JSON-RPC request, sends it to the AI service, and decodes the response. |
60-
| `Client::__call()` | A magic method to call any AI service method dynamically. |
61-
| `Client::list_resources()` | Retrieves available AI-generated content. |
62-
| `Client::read_resource()` | Reads a specific AI-generated resource. |
63-
| `Client::get_image_from_ai_service()` | Calls an AI image generation service. Uses `AI_Capability::IMAGE_GENERATION` capibilities. Returns the image URL. |
64-
| `Client::call_ai_service_with_prompt()` | Calls AI with a text prompt. |
65-
| `Client::call_ai_service()` | AI function calls and processing. |
56+
| Name | Return Type | Description |
57+
| --- | --- | --- |
58+
| `Client::__construct()` | | Constructor |
59+
| `Client::send_request()` | `array` | Sends JSON-RPC requests to the MCP server. |
60+
| `Client::__call()` | `mixed` | Dynamically forwards method calls to `send_request()`. |
61+
| `Client::list_resources()` | `array` | Retrieves all registered resources from MCP. |
62+
| `Client::read_resource( $uri )` | `array` | Reads and returns data from a specified resource. |
63+
| `Client::get_image_from_ai_service( $prompt )` | `string` | Generates an AI image from a prompt and returns the file path. Uses `AI_Capability::IMAGE_GENERATION` capibilities. |
64+
| `Client::call_ai_service_with_prompt( $prompt )` | `string` | Calls the AI service with a prompt for text generation. |
65+
| `Client::call_ai_service( $contents )` | `mixed` | Handles AI-generated responses, including text and function calls. |
6666

6767
## `Server` class
6868

0 commit comments

Comments
 (0)