Skip to content

Tools

Tools allow the LLM to perform actions in your codebase. SlopCode comes with a set of built-in tools, but you can extend it with custom tools or MCP servers.

By default, all tools are enabled and don’t need permission to run. You can control tool behavior through permissions.


Configure

Use the permission field to control tool behavior. You can allow, deny, or require approval for each tool.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"edit": "deny",
"bash": "ask",
"webfetch": "allow"
}
}

You can also use wildcards to control multiple tools at once. For example, to require approval for all tools from an MCP server:

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"mymcp_*": "ask"
}
}

Learn more about configuring permissions.


Built-in

Here are all the built-in tools available in SlopCode.


bash

Execute shell commands in your project environment.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"bash": "allow"
}
}

This tool allows the LLM to run terminal commands like npm install, git status, or any other shell command.


edit

Modify existing files using exact string replacements.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"edit": "allow"
}
}

This tool performs precise edits to files by replacing exact text matches. It’s the primary way the LLM modifies code.


write

Create new files or overwrite existing ones.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"edit": "allow"
}
}

Use this to allow the LLM to create new files. It will overwrite existing files if they already exist.


read

Read file contents from your codebase.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"read": "allow"
}
}

This tool reads files and returns their contents. It supports reading specific line ranges for large files.


grep

Search file contents using regular expressions.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"grep": "allow"
}
}

Fast content search across your codebase. Supports full regex syntax and file pattern filtering.


glob

Find files by pattern matching.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"glob": "allow"
}
}

Search for files using glob patterns like **/*.js or src/**/*.ts. Returns matching file paths sorted by modification time.


list

List files and directories in a given path.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"list": "allow"
}
}

This tool lists directory contents. It accepts glob patterns to filter results.


lsp (experimental)

Interact with your configured LSP servers to get code intelligence features like definitions, references, hover info, and call hierarchy.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"lsp": "allow"
}
}

Supported operations include goToDefinition, findReferences, hover, documentSymbol, workspaceSymbol, goToImplementation, prepareCallHierarchy, incomingCalls, and outgoingCalls.

To configure which LSP servers are available for your project, see LSP Servers.


patch

Apply patches to files.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"edit": "allow"
}
}

This tool applies patch files to your codebase. Useful for applying diffs and patches from various sources.


skill

Load a skill (a SKILL.md file) and return its content in the conversation.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"skill": "allow"
}
}

todowrite

Manage todo lists during coding sessions.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"todowrite": "allow"
}
}

Creates and updates task lists to track progress during complex operations. The LLM uses this to organize multi-step tasks.


todoread

Read existing todo lists.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"todoread": "allow"
}
}

Reads the current todo list state. Used by the LLM to track what tasks are pending or completed.


webfetch

Fetch web content.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"webfetch": "allow"
}
}

Allows the LLM to fetch and read web pages. Useful for looking up documentation or researching online resources.


websearch

Search the web for information.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"websearch": "allow"
}
}

Performs web searches using Exa AI to find relevant information online. Useful for researching topics, finding current events, or gathering information beyond the training data cutoff.

No API key is required — the tool connects directly to Exa AI’s hosted MCP service without authentication.


question

Ask the user questions during execution.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"question": "allow"
}
}

This tool allows the LLM to ask the user questions during a task. It’s useful for:

  • Gathering user preferences or requirements
  • Clarifying ambiguous instructions
  • Getting decisions on implementation choices
  • Offering choices about what direction to take

Each question includes a header, the question text, and a list of options. Users can select from the provided options or type a custom answer. When there are multiple questions, users can navigate between them before submitting all answers.


task

Launch a subagent for a focused unit of work.

slopcode.json
{
"$schema": "https://slopcode.dev/config.json",
"permission": {
"task": "allow"
}
}

Subagents run in child sessions. When SLOPCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true, the tool can also accept background: true and return immediately.


task_status

Check the status of a background subagent.

Use it with the task_id returned by a background task call. Set wait: true when you want to block until the task finishes or times out.


followup_recommendations

Suggest concrete next actions near the end of a response.

Recommendations can point to tests, verification commands, commits, pull requests, or follow-up fixes. They are advisory only; they do not execute commands or change files.


repo_clone (experimental)

Clone a reference repository into SlopCode’s managed cache.

The repository can be a Git URL, a host/path reference, or a GitHub owner/repo shorthand. Use the reference config to make commonly inspected repositories available to scout workflows.


repo_overview (experimental)

Summarize the structure, entrypoints, dependencies, and ecosystem hints for a cached reference repository or local path.

repo_overview is useful when a subagent needs context from a related repository without copying that repository into the current workspace.


plan_permissions (experimental)

Queue likely build-mode permissions for review before switching from plan mode to build mode.

The forecast helps you review expected access early. It does not grant the underlying bash, edit, or external-directory permissions by itself.


Custom tools

Custom tools let you define your own functions that the LLM can call. These are defined in your config file and can execute arbitrary code.

Learn more about creating custom tools.


MCP servers

MCP (Model Context Protocol) servers allow you to integrate external tools and services. This includes database access, API integrations, and third-party services.

Learn more about configuring MCP servers.


Internals

Internally, tools like grep, glob, and list use ripgrep under the hood. By default, ripgrep respects .gitignore patterns, which means files and directories listed in your .gitignore will be excluded from searches and listings.


Ignore patterns

To include files that would normally be ignored, create a .ignore file in your project root. This file can explicitly allow certain paths.

.ignore
!node_modules/
!dist/
!build/

For example, this .ignore file allows ripgrep to search within node_modules/, dist/, and build/ directories even if they’re listed in .gitignore.