# Tools

> Reference for Cline's built-in tool system, aligned with SDK tool architecture.

- 网址：https://funcoding.ai/agents/cline/tools-reference/all-cline-tools/
- 来源：Cline 官方文档原文（英文），Apache-2.0 许可，同步于 2026-10-11
- 官方原文：https://docs.cline.bot/tools-reference/all-cline-tools

---
Cline tools are executable functions the model can call while working. The model decides which tool to call, Cline runs it, then returns results back to the model.

## Built-In Tools (ClineCore)

When running through `ClineCore`, these built-ins are available:

| Tool | Description |
|------|-------------|
| `read_files` | Read one or more files |
| `search_codebase` | Search the workspace |
| `run_commands` | Execute shell commands |
| `fetch_web_content` | Fetch web content |
| `apply_patch` | Apply patch/diff edits |
| `editor` | Edit files |
| `skills` | Invoke configured skills |
| `ask_question` | Ask the user for input |
| `submit_and_exit` | Submit a final answer and stop |

A session offers `editor` or `apply_patch`, never both. By default, Act mode offers `apply_patch` to GPT and Codex models and to every model on the OpenAI (`openai-native`) provider, and `editor` to other models; Plan mode offers neither. SDK callers can replace these defaults with the `toolRoutingRules` session option.

<div class="callout callout-note">

`Agent` from `@cline/agents` does not include built-ins by default. You provide tools explicitly.

</div>

## Tool Categories

- **Codebase operations**: `read_files`, `search_codebase`, `editor`, `apply_patch`
- **Execution**: `run_commands`
- **External retrieval**: `fetch_web_content`
- **Skills**: `skills`
- **Human-in-the-loop controls**: `ask_question`
- **Completion**: `submit_and_exit`

## Approval and Policy Controls

Cline can run tools with approval or auto-approval, depending on settings/policies. Typical patterns:

- Require approval for risky tools (for example `run_commands`, write/edit operations)
- Auto-approve low-risk tools (for example read/search operations)
- Disable specific tools entirely when needed

For policy examples, see [SDK Tools](https://funcoding.ai/agents/cline/sdk/tools/) and [Permission Handling](https://funcoding.ai/agents/cline/sdk/guides/permission-handling/).

## MCP Tools

Cline can also call tools discovered from MCP servers configured in `~/.cline/data/settings/cline_mcp_settings.json`.

MCP tools are loaded alongside built-ins, so Cline can use both local tools and external integrations in one task.

See [MCP Overview](https://funcoding.ai/agents/cline/mcp/mcp-overview/) and [SDK Tools → MCP Tools](https://funcoding.ai/agents/cline/sdk/tools/#mcp-tools).

## Custom Tools

<div class="callout callout-warning">

This feature currently only applies to Cline SDK, CLI, and Kanban. This feature is not applicable on VSCode and JetBrains Extension for now.

</div>

Beyond built-ins and MCP, you can create custom tools and add them through plugins.

- Define tool behavior and input schema in plugin code
- Register tools during plugin setup
- Expose those tools to agents alongside built-ins

See:
- [SDK Plugins](https://funcoding.ai/agents/cline/sdk/plugins/)
- [Writing Plugins (examples)](https://funcoding.ai/agents/cline/sdk/guides/writing-plugins/)
- [SDK Tools: Creating Custom Tools](https://funcoding.ai/agents/cline/sdk/tools/#custom-tools-with-createtool)

## Legacy Tool Names vs Current Runtime Tools

Some older docs/examples reference XML-style names like `read_file`, `replace_in_file`, `execute_command`, or `use_skill`. Current SDK/ClineCore runtime uses the built-in tool names listed above (`read_files`, `apply_patch`, `run_commands`, `skills`, etc.).

## Related

- [SDK Tools](https://funcoding.ai/agents/cline/sdk/tools/)
- [Tools API Reference](https://funcoding.ai/agents/cline/sdk/reference/tools-api/)
- [MCP Overview](https://funcoding.ai/agents/cline/mcp/mcp-overview/)
