final | |
|---|---|
readonly | |
extends |
BaseMetadata |
implements |
Arrayable<array{name: non-empty-string, title?: non-empty-string, description?: non-empty-string, inputSchema: array{type: 'object', $schema?: non-empty-string, properties?: array<string, array<string, mixed>>, required?: list<string>}, outputSchema?: array{type: 'object', $schema?: non-empty-string, properties?: array<string, array<string, mixed>>, required?: list<string>}, annotations?: template-type<ToolAnnotations, Arrayable, 'T'>, execution?: template-type<ToolExecution, Arrayable, 'T'>, icons?: list<template-type<Icon, Arrayable, 'T'>>, _meta?: template-type<MetaObject, Arrayable, 'T'>}>, Icons |
Definition for a tool the client can call.
| Type aliases | ||
|---|---|---|
ToolSchemaShape
|
array{type: 'object', $schema?: non-empty-string, properties?: array<string, array<string, mixed>>, required?: list<string>}
|
# |
| Methods | ||
|---|---|---|
public
|
__construct(
string $name,
array<string, mixed> $inputSchema,
?string $title = null,
?string $description = null,
null|array<string, mixed> $outputSchema = null,
ToolAnnotations $annotations = new ToolAnnotations(),
ToolExecution $execution = new ToolExecution(),
null|list<Icon> $icons = null,
MetaObject $meta = new MetaObject(),
)
|
# |
public
|
getDisplayName(): non-empty-string
|
# |
public
static
|
fromArray(array<string, mixed> $data): static
|
# |
public
|
toArray(): array
|
# |
public
|
jsonSerialize(): array
|
# |
| Properties | |||
|---|---|---|---|
public
|
null|non-empty-string
|
$description
|
# |
public
|
ToolSchemaShape
|
$inputSchema
|
# |
public
|
null|ToolSchemaShape
|
$outputSchema
|
# |
public
|
ToolAnnotations
|
$annotations
|
# |
public
|
ToolExecution
|
$execution
|
# |
public
|
null|list<Icon>
|
$icons
|
# |
public
|
MetaObject
|
$meta
|
# |
| Properties inherited from Nexus\Mcp\Core\Schema\BaseMetadata |
|---|
$name, $title |