Skip to content

Commit bfa9bcc

Browse files
committed
add set methods to tool interface
1 parent 44bab85 commit bfa9bcc

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/Tools/Tool.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,23 @@ public function getName(): string
6969
return $this->name;
7070
}
7171

72+
public function setName(string $name): ToolInterface
73+
{
74+
$this->name = $name;
75+
return $this;
76+
}
77+
7278
public function getDescription(): ?string
7379
{
7480
return $this->description;
7581
}
7682

83+
public function setDescription(?string $description): ToolInterface
84+
{
85+
$this->description = $description;
86+
return $this;
87+
}
88+
7789
public function addProperty(ToolPropertyInterface $property): ToolInterface
7890
{
7991
$this->properties[] = $property;

src/Tools/ToolInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ interface ToolInterface extends \JsonSerializable
1111
*/
1212
public function getName(): string;
1313

14+
public function setName(string $name): ToolInterface;
15+
1416
/**
1517
* Get a description of the tool's functionality.
1618
*/
1719
public function getDescription(): ?string;
1820

21+
public function setDescription(?string $description): ToolInterface;
22+
1923
/**
2024
* Add a Property with a name, type, description, and optional required constraint.
2125
*/

0 commit comments

Comments
 (0)