Tool constructor

const Tool({
  1. String? name,
  2. String? description,
  3. List<String>? icons,
  4. ToolAnnotations? annotations,
  5. bool codeMode = true,
  6. bool codeModeVisible = false,
})

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,
});