Tool constructor
const
Tool({})
Creates a Tool annotation.
name - Optional custom tool name (defaults to method name).
description - Human-readable description of the tool's purpose.
icons - Optional list of icon URLs for visual identification.
annotations - Behavioral hints for MCP clients (read-only,
destructive, idempotent, open-world).
codeMode - Whether this tool is available in the code mode sandbox
(default: true).
codeModeVisible - Whether this tool remains listed in tools/list
when the parent @Server has codeMode: true (default: false).
Implementation
const Tool({
this.name,
this.description,
this.icons,
this.annotations,
this.codeMode = true,
this.codeModeVisible = false,
});