Expand description
Tool modifiers for customizing tool behavior
This module provides functionality to modify tool schemas, execution parameters, and execution responses. Modifiers allow you to customize tool behavior without changing the underlying tool definitions.
§Modifier Types
BeforeExecute- Modify parameters before tool executionAfterExecute- Modify response after tool executionSchemaModifier- Modify tool schema before agent sees itBeforeExecuteMeta- Modify parameters before meta tool execution (session context)AfterExecuteMeta- Modify response after meta tool execution (session context)
§Examples
use composio_sdk::models::modifiers::{Modifier, ModifierType};
use std::collections::HashMap;
// Create a before_execute modifier
let modifier = Modifier::new(
ModifierType::BeforeExecute,
vec!["GITHUB_CREATE_ISSUE".to_string()],
vec![],
);Structs§
- Custom
Auth Params - Custom authentication parameters
- Custom
Connection Data - Custom connection data for various auth schemes
- Modifier
- A modifier that can be applied to tools
- Tool
Execute Params - Parameters for tool execution
Enums§
- Modifier
Type - Type of modifier
Traits§
- After
Execute - Trait for after execute modifiers
- After
Execute Meta - Trait for after execute meta modifiers (session context)
- Before
Execute - Trait for before execute modifiers
- Before
Execute Meta - Trait for before execute meta modifiers (session context)
- Schema
Modifier - Trait for schema modifiers
Functions§
- apply_
after_ execute_ meta_ modifiers - Apply modifiers to meta tool response
- apply_
after_ execute_ modifiers - Apply modifiers to tool execution response
- apply_
before_ execute_ meta_ modifiers - Apply modifiers to meta tool parameters
- apply_
before_ execute_ modifiers - Apply modifiers to tool execution parameters
- apply_
schema_ modifiers - Apply modifiers to tool schema
Type Aliases§
- Modifiers
- Collection of modifiers