multimodal/websites/tarko/docs/en/guide/tool/management.mdx
Filter and organize Agent tool capabilities for specific tasks and performance optimization.
Tarko includes 32 built-in tools across 4 categories: general (1), browser (18), filesystem (11), and commands (2). Tool management allows you to precisely control which tools are available to optimize performance and focus capabilities.
# Include only browser tools (18 tools)
tarko --tool.include browser
# Include filesystem but exclude file editing
tarko --tool.include filesystem --tool.exclude edit_file
# Multiple categories with specific exclusions
tarko --tool.include "browser,filesystem" --tool.exclude "run_command,run_script"
| Option | Description | Example |
|---|---|---|
--tool.include <patterns> | Include tools matching patterns | --tool.include browser |
--tool.exclude <patterns> | Exclude tools matching patterns | --tool.exclude delete |
string.includes() for high performancebrowser not Browser)# Browser tools + web search (19 tools)
tarko --tool.include "browser,web_search"
# Filesystem without command execution (11 tools)
tarko --tool.include filesystem --tool.exclude "run_command,run_script"
# No file writing or command execution
tarko --tool.exclude "write_file,edit_file,create_directory,move_file,run_command,run_script"
# Essential read-only tools only
tarko --tool.include "read_file,read_multiple_files,list_directory,browser_screenshot,web_search"
import { Agent } from '@tarko/agent';
const agent = new Agent({
tool: {
include: ['browser', 'filesystem'],
exclude: ['browser_get_markdown', 'run_command']
}
});
{
"tool": {
"include": ["browser", "filesystem"],
"exclude": ["delete", "remove"]
}
}
import { Agent, Tool } from '@tarko/agent';
const agent = new Agent();
// Register custom tools
const customTool = new Tool({
id: 'custom_tool',
description: 'My custom tool',
parameters: {
type: 'object',
properties: {
input: { type: 'string', description: 'Input parameter' }
}
},
function: async (params) => {
return `Processed: ${params.input}`;
}
});
agent.registerTool(customTool);
// Get all available tools
const tools = agent.getTools();
console.log(`Available tools: ${tools.length}`);
web_search - Search the web for informationbrowser_click - Click on page elementsbrowser_close_tab - Close browser tabbrowser_evaluate - Execute JavaScript codebrowser_form_input_fill - Fill form inputsbrowser_get_clickable_elements - Get clickable elementsbrowser_get_markdown - Extract page content as markdownbrowser_go_back - Navigate back in historybrowser_go_forward - Navigate forward in historybrowser_hover - Hover over elementsbrowser_navigate - Navigate to URLbrowser_new_tab - Open new browser tabbrowser_press_key - Press keyboard keysbrowser_read_links - Extract all page linksbrowser_screenshot - Take page screenshotsbrowser_scroll - Scroll page contentbrowser_select - Select dropdown optionsbrowser_switch_tab - Switch between tabsbrowser_tab_list - List all open tabscreate_directory - Create new directoriesdirectory_tree - Get directory structureedit_file - Edit existing filesget_file_info - Get file metadatalist_allowed_directories - List accessible directorieslist_directory - List directory contentsmove_file - Move or rename filesread_file - Read file contentsread_multiple_files - Read multiple files at oncesearch_files - Search for files by patternwrite_file - Write content to filesrun_command - Execute shell commandsrun_script - Run scripts with interpreters# See which tools are filtered
tarko --debug --tool.include browser
# Output: "Applied include filter with patterns [browser], 18/32 tools matched"
# Use broader patterns
tarko --tool.exclude "run_command" # Instead of strict includes
browser not Browser)browser_click not click)browser, filesystem, commands, generaltry {
const agent = new Agent({
tool: { include: ['invalid_tool'] }
});
} catch (error) {
console.error('Tool loading failed:', error.message);
// Fallback to default tools
}
string.includes() for optimal speedtarko --tool.include browser
# Result: 18 browser tools (browser_click, browser_navigate, etc.)
tarko --tool.include filesystem --tool.exclude edit_file
# Result: 10 filesystem tools (read_file, write_file, list_directory, etc.)
tarko --tool.include "browser,filesystem" --tool.exclude "browser_get_markdown,run_command"
# Result: 28 tools (17 browser + 11 filesystem, excluding markdown and commands)