Skip to content

Commit 660f150

Browse files
authored
Rename $_meta properties to $meta (#134)
1 parent d3a0791 commit 660f150

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Schema/Result/InitializeResult.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ class InitializeResult implements ResultInterface
3232
* @param ServerCapabilities $capabilities the capabilities of the server
3333
* @param Implementation $serverInfo information about the server
3434
* @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.
35-
* @param array<string,mixed>|null $_meta optional _meta field
35+
* @param array<string,mixed>|null $meta optional _meta field
3636
*/
3737
public function __construct(
3838
public readonly ServerCapabilities $capabilities,
3939
public readonly Implementation $serverInfo,
4040
public readonly ?string $instructions = null,
41-
public readonly ?array $_meta = null,
41+
public readonly ?array $meta = null,
4242
public readonly ?ProtocolVersion $protocolVersion = null,
4343
) {
4444
}
@@ -93,8 +93,8 @@ public function jsonSerialize(): array
9393
if (null !== $this->instructions) {
9494
$data['instructions'] = $this->instructions;
9595
}
96-
if (null !== $this->_meta) {
97-
$data['_meta'] = $this->_meta;
96+
if (null !== $this->meta) {
97+
$data['_meta'] = $this->meta;
9898
}
9999

100100
return $data;

src/Schema/Result/ListRootsResult.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ class ListRootsResult implements ResultInterface
2525
{
2626
/**
2727
* @param Root[] $roots an array of root URIs
28-
* @param ?array<string, mixed> $_meta optional metadata about the result
28+
* @param ?array<string, mixed> $meta optional metadata about the result
2929
*/
3030
public function __construct(
3131
public readonly array $roots,
32-
public readonly ?array $_meta = null,
32+
public readonly ?array $meta = null,
3333
) {
3434
}
3535

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

48-
if (null !== $this->_meta) {
49-
$result['_meta'] = $this->_meta;
48+
if (null !== $this->meta) {
49+
$result['_meta'] = $this->meta;
5050
}
5151

5252
return $result;

0 commit comments

Comments
 (0)