Tool Management
Overview
Tools are the "hands and feet" that an Agent uses to carry out actions. The system provides 19 built-in tools and supports extending the toolset via the MCP protocol, OpenAPI definitions, and Skills. The Tool Management page is used to configure and manage all available tools.

19 Built-in Tools
File Operations (7)
| Tool | Function | Security Level |
|---|---|---|
| Read File | Reads file content, supports line-number ranges, up to 5MB | P0 (auto-executed) |
| Write File | Writes files, automatically creating the file and parent directories if they don't exist | P0 |
| Edit | Makes local modifications to an existing file (search-and-replace mode) | P0 |
| MultiEdit | Makes multiple batch modifications to an existing file | P0 |
| List Directory | Lists files and subdirectories in a directory, showing file sizes | P0 (locked) |
| Glob Files | Searches for files by glob pattern, up to 100 results | P0 (locked) |
| Search Files | Searches file content by regular expression, up to 250 results | P0 (locked) |
Command Execution (1)
| Tool | Function | Security Level |
|---|---|---|
| Bash | Executes shell commands, scripts, and Git operations, 120-second timeout, output up to 50KB | P1 (confirm on first use) |
Network (1)
| Tool | Function | Security Level |
|---|---|---|
| Web Fetch | Fetches URL content and converts it to Markdown, with automatic noise removal and 15-minute caching | P1 |
Task Management (1)
| Tool | Function | Security Level |
|---|---|---|
| Task Manage | Manages a structured task list (to-do / in-progress / done), automatically invoked for tasks with more than 3 steps | P0 (locked) |
Skill Invocation (1)
| Tool | Function | Security Level |
|---|---|---|
| Skill | Invokes an installed Skill module to perform a specialized task | P1 |
User Interaction (1)
| Tool | Function | Security Level |
|---|---|---|
| AskUserQuestion | The Agent asks the user a question (up to 4 questions, each with 2-10 options) | P0 (locked) |
Sub-agents (3)
| Tool | Function | Security Level |
|---|---|---|
| create_local_sub_agent | Creates a temporary sub-agent on the current node, supporting 1-3 levels of nesting | P0 |
| dispatch_sub_agent | Dispatches a task to a registered sub-agent | P0 |
| dispatch_multi_node_agent | Dispatches a task to a remote node via the Gateway | P0 |
Memory (4)
| Tool | Function | Security Level |
|---|---|---|
| Conversation Search | Searches historical conversations by keyword, supports time-range filtering, up to 10 results | P0 (locked) |
| Recent Chats | Lists the 1-20 most recent conversation sessions, supports time filtering | P0 (locked) |
| Memory Query | Searches stored user memory (semantic search + graph expansion) | P0 (locked) |
| Memory Manage | Adds, updates, or deletes user memory | P1 |
Security Levels Explained
| Level | Meaning | Behavior |
|---|---|---|
| P0 | Safe operation | Auto-executed, no user confirmation required |
| P1 | Requires confirmation | A permission prompt appears on first invocation |
| P2 | Confirm every time | User confirmation is required for every invocation |
| Locked | Cannot be downgraded | The security level is fixed and cannot be adjusted |
Administrators can adjust the permission levels of non-locked tools (the organization's lower bound) in Security Guardrails, and individuals can further tighten them in the APP's runtime security.
MCP Tool Protocol
MCP (Model Context Protocol) is a standardized communication protocol for AI tools that supports extending the toolset through external services.
Three Transport Methods
| Transport | Description | Applicable Scenario |
|---|---|---|
| stdio | Local subprocess communication (command + args) | Local CLI tools |
| SSE | Server-Sent Events (long-lived HTTP connection) | Remote services |
| HTTP | Streamable HTTP API | Remote services |
Five Authentication Modes
| Authentication | Description |
|---|---|
| none | No authentication |
| bearer | Bearer Token |
| basic | HTTP Basic Auth |
| service | Service-to-service authentication |
| oauth2 | OAuth2 authorization code flow (auto-discovers the well-known endpoint) |
MCP Management Interface
Manage MCP servers through the McpManager component:
- Add server: Configure the name, transport method, connection parameters, and authentication method
- Edit/Delete: Modify or remove an existing configuration
- Enable/Disable: Toggle a server's availability
- Tool discovery: Automatically discover the list of tools provided by a server after connecting
Security Isolation
MCP subprocesses only pass whitelisted environment variables, preventing the leakage of sensitive information such as API Keys.
API Tools
Supports automatically parsing and creating tools from OpenAPI/Swagger documents:
| Function | Description |
|---|---|
| Automatic parsing | Extracts endpoints and parameter schemas from an OpenAPI specification |
| Authentication config | Five authentication modes |
| Template variables | Dynamic {{variable}} substitution |
| HTTP methods | GET / POST / PUT / DELETE / PATCH |
Custom Tool Directory NEW
The system adds a new ToolDirectoryManager — it manages custom tools under the {dataDir}/TOOLs/{orgId}/_custom/ directory and can load them without restarting the APP.
Directory Structure
{dataDir}/TOOLs/{orgId}/_custom/
├── my-tool-1/
│ ├── metadata.json
│ └── ...
└── my-tool-2/
├── metadata.json
└── ...
metadata.json Example
{
"id": "my-tool-1",
"name": "My Custom Tool",
"description": "自定义工具说明",
"type": "API",
"enabled": true,
"createdAt": 1776921208476,
"updatedAt": 1776921208476
}
Loading Mechanism
- Scan method:
scanAndLoad(orgId) - Type support:
API/MCP - Organization isolation: separate directories per orgId, with no interference between them
- Hot loading: no APP restart required
Tool Loading Pipeline
All tools are loaded and merged in the following order:
① Built-in tools (19)
↓
② MCP tools (discovered from configured MCP servers)
↓
③ API tools (parsed from OpenAPI definitions)
↓
④ Custom tools (ToolDirectoryManager scans the _custom/ directory)
↓
⑤ Skill tools (execute_skill_{id} injected from enabled Skills)
↓
⑥ Merge and deduplicate → final tool list → sent to the LLM
Common Tool Usage Scenarios
| Example User Request | Tool Called by the Agent | Description |
|---|---|---|
| "Show me the contents of package.json" | Read File | Reads and returns the file content |
| "Rename the function from getData to fetchData" | Edit | Precise search and replace |
| "Create a README.md" | Write File | Creates a new file |
| "Which .tsx files are in the project?" | Glob Files | Searches filenames by pattern |
| "Where is useEffect used in the code?" | Search Files | Regex search within file content |
| "Run npm install for me" | Bash | Executes a shell command |
| "Summarize the content of this web page for me: https://..." | Web Fetch | Fetches the web page and converts it to Markdown |
| "This task is fairly complex, let's outline a plan first" | Task Manage | Creates a structured task list |
| "Search for yesterday's conversation about database migration" | Conversation Search | Searches historical conversations |
| "Remember that I prefer the dark theme" | Memory Manage | Stores it to memory |
How-to: Add an MCP Tool
- Open APP → Settings → Tools → the MCP Tools area
- Click Add MCP Server
- Fill in the configuration:
- Name: Give this MCP server a recognizable name
- Transport method: Choose stdio / SSE / HTTP
- For stdio: Enter the command (e.g.,
npx) and arguments (e.g.,@anthropic/mcp-server-filesystem) - For SSE/HTTP: Enter the server URL
- If authentication is required, select the authentication method and enter the credentials
- Click Save
- The system automatically connects to the server and discovers the available tools
- The discovered tools appear in the tool list and are enabled by default
Tip: MCP subprocesses only pass whitelisted environment variables. If an MCP tool requires environment variables such as an API Key, they must be explicitly declared in the configuration's env field.
Impact of Disabling a Tool
After a tool is disabled, the Agent is completely unaware of that tool's existence in conversations. This means:
| Disabled Tool | Impact |
|---|---|
| Bash | The Agent cannot execute any shell commands (npm, git, compilation, etc.) |
| Read File / Write File | The Agent cannot read or create files |
| Web Fetch | The Agent cannot fetch web page content, and search-related skills are also affected |
| Memory Query / Manage | The Agent will not query or store memory |
| Skill | The Agent cannot invoke any Skill module |
| create_local_sub_agent | The Agent cannot create sub-agents to break down tasks |
Recommendation: Unless there is a clear security reason, we do not recommend disabling the core file operation tools (Read / Write / Edit / Glob / Search), otherwise the Agent's task execution capabilities will be severely limited.
FAQ
The Agent says "I cannot perform file operations"
Check whether the file operation tools (Read File, Write File, Edit, etc.) have been disabled. Confirm on the Tool Management page that these tools are enabled.
MCP Tool Connection Failure
- Confirm that the MCP server's command/URL is correct
- If using the stdio method, confirm that the corresponding command is installed (e.g.,
npxrequires a Node.js environment) - Check whether environment variables (such as an API Key) are required
- Check the APP logs for detailed error information
The Agent Isn't Using the Tool I Expected
The Agent autonomously selects tools based on task requirements. If the Agent chooses the "wrong" tool, you can give explicit instructions in the conversation: "Please use the Bash tool to run this command."
Related Documents
- Skill Management — The skill system
- Runtime Security — Tool permission configuration
- Security Guardrails — Enterprise-grade tool permission management
