Tools are functions the model can call during execution. Tools consist of a name, description, and schema which the SDK sends to the model. Then the model can direct the SDK to execute tool functions and send results back into the conversation.Documentation Index
Fetch the complete documentation index at: https://docs.cline.bot/llms.txt
Use this file to discover all available pages before exploring further.
Built-In Tools
ClineCore can enable the built-in tool suite:
| 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 |
If you need more control you can use the
Agents package directly. This does not include built-in tools. You pass in only the tools you want when constructing the agent.Custom Tools with createTool
One of the most powerful features of the SDK is the ability to create and register custom tools. This allows you to add and share capabilities that are context efficient and behave deterministically because they are implemented in code rather than prompts.Quick Example
UsecreateTool with a zod schema for type-safe tools:
createTool also accepts raw JSON Schema if you prefer:
Registering Tools
WithClineCore, custom tools are passed as extraTools in session config:
Agent, you pass all tools into the constructor:
Tool Policies
You can control how tools are used through Tool Policies. These control whether a tool is visible and whether it requires approval.| Policy | Effect |
|---|---|
{ autoApprove: true } | Run without asking |
{ autoApprove: false } | Ask before running |
{ enabled: false } | Hide/disable the tool |
toolPolicies default to enabled and auto-approved.
MCP Tools
Tools work along side MCP.ClineCore can load MCP settings through its runtime/config extension path. MCP tools are registered alongside built-in and custom tools when MCP support is enabled for the session.
