McpTool
Represents a tool exposed by an MCP server.
McpTool::__construct()
public function __construct(string $name, string $description, array $inputSchema, string $serverName):Parameters
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $description | string | |
| $inputSchema | array<string, mixed> | |
| $serverName | string |
McpTool::getRegistryName()
public function getRegistryName(): stringGet the namespaced tool name for registration. Format: mcp_{server}_{tool}
McpTool::fromArray()
public static function fromArray(array $data, string $serverName): selfCreate from MCP server response.
Parameters
| Name | Type | Description |
|---|---|---|
| $data | array<string, mixed> | |
| $serverName | string |