Skip to main content

Crate ai_agents_tools

Crate ai_agents_tools 

Source
Expand description

Tool system for AI Agents framework

Re-exports§

pub use builtin::HttpTool;
pub use builtin::AskUserTool;
pub use builtin::CalculatorTool;
pub use builtin::CommandTool;
pub use builtin::CopyPathTool;
pub use builtin::DateTimeTool;
pub use builtin::DeletePathTool;
pub use builtin::DiagnosticsTool;
pub use builtin::EchoTool;
pub use builtin::FileEditTool;
pub use builtin::FileInfoTool;
pub use builtin::FileListTool;
pub use builtin::FileReadTool;
pub use builtin::FileTool;
pub use builtin::FileWriteTool;
pub use builtin::GitDiffTool;
pub use builtin::GitStatusTool;
pub use builtin::GlobTool;
pub use builtin::GrepTool;
pub use builtin::JsonTool;
pub use builtin::MathTool;
pub use builtin::MovePathTool;
pub use builtin::PatchTool;
pub use builtin::RandomTool;
pub use builtin::SleepTool;
pub use builtin::TemplateTool;
pub use builtin::TextTool;
pub use builtin::TodoTool;
pub use builtin::WebFetchResolver;
pub use builtin::WebFetchTool;
pub use builtin::WebFetchTransport;
pub use builtin::WebFetchTransportRequest;
pub use builtin::WebFetchTransportResponse;
pub use builtin::WebSearchTool;
pub use security::CommandPolicyConfig;
pub use security::CommandRuleConfig;
pub use security::CommandTemplateConfig;
pub use security::DomainPolicyConfig;
pub use security::NoWritePolicyBehavior;
pub use security::OperationPolicyConfig;
pub use security::PathPolicyConfig;
pub use security::SecurityCheckResult;
pub use security::ToolPolicyConfig;
pub use security::ToolSecurityConfig;
pub use security::ToolSecurityEngine;

Modules§

builtin
mcp
MCP (Model Context Protocol) integration module.
security

Structs§

CommandPolicyBinding
Declarative mapping from an input field to command policy checks.
CommandRequest
Request sent to a host command runner.
CommandResponse
Result returned by a host command runner.
ConditionEvaluator
DiagnosticItem
One diagnostic item returned by a host provider.
DiagnosticsRequest
Query sent to a diagnostics provider.
DiagnosticsResponse
Diagnostics returned by a host provider.
DomainPolicyBinding
Declarative mapping from an input field to URL or domain policy checks.
EvaluationContext
FileVersionEvidence
Version evidence captured when file contents are read.
FileVersionStore
Session-local file version store used for read-before-write checks.
PathPolicyBinding
Declarative mapping from an input field to path policy checks.
ProcessCommandRunner
Process-backed command runner for CLI and trusted hosts.
QuestionRequest
Structured question sent from a tool call to the host UI.
QuestionResponse
Answer returned by an interactive or fallback question handler.
ResolvedTool
Resolved tool handle plus canonical identity evidence.
ResultLimitBinding
Declarative mapping from an input field to a common limit cap.
SimpleLLMGetter
StaticCommandRunner
Static command runner used by tests and eval fixtures.
StaticDiagnosticsProvider
Static diagnostics provider used by tests and eval fixtures.
StaticWebSearchProvider
Static web-search provider used by tests and eval fixtures.
TodoItem
One structured task tracked by the session-local todo tool.
TodoStore
Session-local todo storage shared by the registry and runtime accessor.
ToolActorContext
Turn actor and sender identity forwarded into tool execution.
ToolAliases
ToolApprovalRecord
Human approval evidence for a tool call.
ToolCallClassification
Call-level safety classification after arguments are known.
ToolCallRecord
ToolCancellationToken
Cooperative cancellation observer shared with a tool call.
ToolContext
ToolDescriptor
ToolExecutionContext
Context passed from the shared executor into one tool invocation attempt.
ToolExecutionLimits
Effective tool limits derived from runtime defaults, policy, safety metadata, and call classification.
ToolExecutionRecord
Structured internal result for one logical shared-executor request.
ToolExecutionRequest
Request passed into the shared tool execution boundary.
ToolIdentity
Canonical identity produced by registry resolution.
ToolInfo
Public descriptor for a registered tool.
ToolMetadata
ToolPolicyBindings
Tool-declared policy bindings used by the shared executor.
ToolPolicyDecisionRecord
Policy decision stored with every tool execution record.
ToolRegistry
Registry for built-in, provider, alias, and localized tool lookup.
ToolResult
ToolSafetyMetadata
Static safety metadata attached to a tool registration.
UnavailableCommandRunner
Command runner used when no host installed process execution.
UnavailableDiagnosticsProvider
Diagnostics provider used when the host has not installed one.
UnavailableWebSearchProvider
Web-search provider used when no host installed search.
WebSearchRequest
Search request sent to a host web-search provider.
WebSearchResponse
Normalized response returned by a web-search provider.
WebSearchResultItem
One normalized search result returned by a provider.

Enums§

CommandBindingKind
Command argument role declared by a tool policy binding.
DiagnosticSeverity
Severity assigned to a compiler, linter, or editor diagnostic.
PathAccessMode
Path access mode declared by a tool policy binding.
PathBindingKind
Path argument role declared by a tool policy binding.
PermissionOutcome
Permission decision returned before tool execution.
ProviderHealth
ResultLimitKind
Limit kind declared by a result-limit policy binding.
TodoStatus
Status value for one session-local todo item.
ToolApprovalStatus
Approval status attached to a tool execution record.
ToolCallSource
Runtime source that requested a tool call.
ToolError
ToolOperationKind
High-level operation category used for tool policy and scheduling.
ToolProviderError
ToolProviderType
ToolSchemaPromptMode
Schema rendering mode for tool prompt generation.
ToolSideEffectLevel
Side-effect level used to decide approval and concurrency behavior.
TrustLevel
WebSearchSafeSearch
Safe-search preference for provider-neutral web search.

Constants§

MAX_TOOL_TIMEOUT_MS
Maximum accepted framework tool-execution timeout in milliseconds.

Traits§

CommandRunner
Host bridge for controlled command execution.
DiagnosticsProvider
Provider hook for compiler, linter, or editor diagnostics.
LLMGetter
QuestionHandler
Host bridge for asking preference or clarification questions.
Tool
Core tool trait for external capabilities.
ToolInvoker
Runtime boundary for invoking tools through shared policy and evidence handling.
ToolProvider
WebSearchProvider
Host bridge for provider-neutral public web search.

Functions§

create_builtin_registry
file_version_evidence
Build file version evidence from observed bytes and metadata.
generate_schema

Type Aliases§

CommandRunnerSlot
Shared slot used by command to find the active host runner.
DiagnosticsProviderSlot
Shared slot used by diagnostics to find the active provider.
QuestionHandlerSlot
Shared slot used by ask_user to find the active host handler.
WebSearchProviderSlot
Shared slot used by web_search to find the active host provider.