McpTool
Tags
Attributes
- #[Attribute]
- \Attribute::TARGET_METHOD | \Attribute::TARGET_CLASS
Table of Contents
Properties
- $annotations : ToolAnnotations|null
- $description : string|null
- $icons : array<string|int, mixed>|null
- $meta : array<string|int, mixed>|null
- $name : string|null
- $outputSchema : array<string|int, mixed>|null
Methods
- __construct() : mixed
Properties
$annotations
public
ToolAnnotations|null
$annotations
= null
$description
public
string|null
$description
= null
$icons
public
array<string|int, mixed>|null
$icons
= null
$meta
public
array<string|int, mixed>|null
$meta
= null
$name
public
string|null
$name
= null
$outputSchema
public
array<string|int, mixed>|null
$outputSchema
= null
Methods
__construct()
public
__construct([string|null $name = null ][, string|null $description = null ][, ToolAnnotations|null $annotations = null ][, array<string|int, Icon>|null $icons = null ][, array<string, mixed>|null $meta = null ][, array<string, mixed> $outputSchema = null ]) : mixed
Parameters
- $name : string|null = null
-
The name of the tool (defaults to the method name)
- $description : string|null = null
-
The description of the tool (defaults to the DocBlock/inferred)
- $annotations : ToolAnnotations|null = null
-
Optional annotations describing tool behavior
- $icons : array<string|int, Icon>|null = null
-
Optional list of icon URLs representing the tool
- $meta : array<string, mixed>|null = null
-
Optional metadata
- $outputSchema : array<string, mixed> = null
-
Optional JSON Schema object for defining the expected output structure