Skip to main content

act_tool

Attribute Macro act_tool 

Source
#[act_tool]
Expand description

Attribute macro for ACT tool functions.

When used inside an #[act_component] module, marks a function as a tool. The #[act_component] macro processes these attributes during code generation.

When used standalone (outside #[act_component]), this is a no-op pass-through.

§Attributes

  • description = "..." (required) — Tool description
  • read_only — Mark tool as read-only
  • idempotent — Mark tool as idempotent
  • destructive — Mark tool as destructive
  • streaming — Mark tool as streaming (auto-detected if ActContext param present)
  • timeout_ms = N — Set timeout in milliseconds