Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Schema/Result/InitializeResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ class InitializeResult implements ResultInterface
* @param ServerCapabilities $capabilities the capabilities of the server
* @param Implementation $serverInfo information about the server
* @param string|null $instructions Instructions describing how to use the server and its features. This can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a "hint" to the model. For example, this information MAY be added to the system prompt.
* @param array<string,mixed>|null $_meta optional _meta field
* @param array<string,mixed>|null $meta optional _meta field
*/
public function __construct(
public readonly ServerCapabilities $capabilities,
public readonly Implementation $serverInfo,
public readonly ?string $instructions = null,
public readonly ?array $_meta = null,
public readonly ?array $meta = null,
) {
}

Expand Down Expand Up @@ -89,8 +89,8 @@ public function jsonSerialize(): array
if (null !== $this->instructions) {
$data['instructions'] = $this->instructions;
}
if (null !== $this->_meta) {
$data['_meta'] = $this->_meta;
if (null !== $this->meta) {
$data['_meta'] = $this->meta;
}

return $data;
Expand Down
8 changes: 4 additions & 4 deletions src/Schema/Result/ListRootsResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class ListRootsResult implements ResultInterface
{
/**
* @param Root[] $roots an array of root URIs
* @param ?array<string, mixed> $_meta optional metadata about the result
* @param ?array<string, mixed> $meta optional metadata about the result
*/
public function __construct(
public readonly array $roots,
public readonly ?array $_meta = null,
public readonly ?array $meta = null,
) {
}

Expand All @@ -45,8 +45,8 @@ public function jsonSerialize(): array
'roots' => array_values($this->roots),
];

if (null !== $this->_meta) {
$result['_meta'] = $this->_meta;
if (null !== $this->meta) {
$result['_meta'] = $this->meta;
}

return $result;
Expand Down