Module prelude

Module prelude 

Source
Expand description

Convenient imports for common usage patterns.

Import everything you typically need with:

use tools_rs::prelude::*;

Convenient re-exports for common usage patterns.

This prelude module re-exports the most commonly used items from tools-rs, allowing users to import everything they typically need with a single use statement:

use tools_rs::prelude::*;

Re-exports§

pub use crate::call_tool;
pub use crate::call_tool_by_name;
pub use crate::call_tool_with;
pub use crate::call_tool_with_args;
pub use crate::collect_tools;
pub use crate::function_declarations;
pub use crate::list_tool_names;
pub use tokio;

Macros§

json
Construct a serde_json::Value from a JSON literal.

Structs§

CallId
FunctionCall
Represents a function call with name and arguments
FunctionDecl
Function declaration for LLM consumption
FunctionResponse
Represents a function response with name and arguments
ToolCollection
ToolMetadata
Metadata about a tool function

Enums§

ToolError
Errors that can occur during tool operations
Value
Represents any valid JSON value.

Traits§

Deserialize
A data structure that can be deserialized from any data format supported by Serde.
Serialize
A data structure that can be serialized into any data format supported by Serde.
ToolSchema
Trait for types that can generate a JSON Schema representation of themselves.

Attribute Macros§

tool

Derive Macros§

Deserialize
Serialize
ToolSchema