> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Praisonai Derive • Rust AI Agent SDK

> Procedural macros for PraisonAI

# praisonai\_derive

<Badge color="orange">Rust AI Agent SDK</Badge>

Procedural macros for PraisonAI

This crate provides the `#[tool]` attribute macro for defining tools.

# Example

```rust,ignore theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
use praisonai::tool;

#[tool(description = "Search the web for information")]
async fn search_web(query: String) -> String {
format!("Results for: {}", query)
}
```

## Import

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
use praisonai_derive::*;
```

## Functions

<CardGroup cols={2}>
  <Card title="tool()" icon="function" href="../functions/tool">
    The `#[tool]` attribute macro for defining tools. This macro transforms a function into a tool that can be used by agents. # Attributes -...
  </Card>
</CardGroup>
