Skip to main content
Cline has access to a set of tools for various tasks. This reference covers all available tools and how to use them.

What Can Cline Do?

  • Edit and create files in your project
  • Run terminal commands
  • Search and analyze your code
  • Help debug and fix issues
  • Automate repetitive tasks
  • Integrate with external tools via MCP

File Operations

ToolDescription
write_to_fileCreate or overwrite files
read_fileRead file contents
replace_in_fileMake targeted edits to files
search_filesSearch files using regex
list_filesList directory contents
list_code_definition_namesList code definitions in files

Examples

Create a new file:
<write_to_file>
<path>src/components/Header.tsx</path>
<content>
// Header component code
</content>
</write_to_file>
Search for a pattern:
<search_files>
<path>src</path>
<regex>function\s+\w+\(</regex>
<file_pattern>*.ts</file_pattern>
</search_files>

Terminal Operations

ToolDescription
execute_commandRun CLI commands
Run a command:
<execute_command>
<command>npm install axios</command>
<requires_approval>false</requires_approval>
</execute_command>

Browser Operations

ToolDescription
browser_actionInteract with websites through Puppeteer
See Browser Automation for details.

MCP Tools

ToolDescription
use_mcp_toolUse tools from MCP servers
access_mcp_resourceAccess MCP server resources
MCP tools extend Cline’s capabilities through external integrations. See MCP documentation for details.

Interaction Tools

ToolDescription
ask_followup_questionAsk user for clarification
attempt_completionPresent final results

New Task Tool

The new_task tool enables context management and task continuity. It packages current progress and context into a fresh task with a clean context window.

When to Use

  • Context window filling up but work isn’t done
  • Completing a logical subtask before starting the next
  • After research phase, ready to implement

How It Works

  1. Cline proposes creating a new task with summarized context
  2. You can refine the proposed context
  3. Once approved, current task ends and new one begins with the context preloaded

Using the /newtask Command

Type /newtask in chat to manually trigger this process. Cline will:
  • Analyze the conversation
  • Propose distilled context to carry forward
  • Let you refine before creating the new task
This works like a developer handoff, packaging what matters (plan, work done, files, next steps) while leaving behind noise.

Common Task Patterns

Code Generation

Create a TypeScript function that validates email addresses.
Include unit tests using Jest.

Bug Fixing

@terminal The app crashes on submit. Fix the error.

Refactoring

Refactor @auth.ts to use async/await instead of callbacks.

Run Commands

Run npm install to add axios.

Source Code

For the most up-to-date implementation details, see the Cline repository.