Skip to content
docsv0.1.0

McpTool

Represents a tool exposed by an MCP server.

McpTool::__construct()

public function __construct(string $name, string $description, array $inputSchema, string $serverName):

Parameters

Parameters of __construct()
NameTypeDescription
$namestring
$descriptionstring
$inputSchemaarray<string, mixed>
$serverNamestring

McpTool::getRegistryName()

public function getRegistryName(): string

Get the namespaced tool name for registration. Format: mcp_{server}_{tool}

McpTool::fromArray()

public static function fromArray(array $data, string $serverName): self

Create from MCP server response.

Parameters

Parameters of fromArray()
NameTypeDescription
$dataarray<string, mixed>
$serverNamestring