Agent Tools Reference

muxd's agent has 18 built-in tools organized across 11 categories. This document describes each tool, its parameters, and constraints.

Categories:

file_read

Read the contents of a file. Returns the file content with line numbers.

Parameters

NameTypeRequiredDescription
pathstringyesAbsolute or relative file path to read
offsetintegernoLine number to start reading from (1-based, default: 1)
limitintegernoMaximum number of lines to read (default: all)

Limits

Example

{
  "path": "main.go",
  "offset": 10,
  "limit": 30
}

file_write

Write content to a file. Creates parent directories if they don't exist. Overwrites the file if it already exists.

Parameters

NameTypeRequiredDescription
pathstringyesFile path to write to
contentstringyesContent to write to the file

Details

Example

{
  "path": "src/utils.go",
  "content": "package main\n\nfunc hello() string {\n\treturn \"hello\"\n}\n"
}

file_edit

Edit a file by replacing an exact string match.

Parameters

NameTypeRequiredDescription
pathstringyesFile path to edit
old_stringstringyesExact text to find
new_stringstringyesText to replace it with
replace_allbooleannoReplace all occurrences instead of requiring exactly one (default: false)

Details

Example

{
  "path": "main.go",
  "old_string": "fmt.Println(\"hello\")",
  "new_string": "fmt.Println(\"hello, world\")"
}

bash

Run a shell command and return the output.

Parameters

NameTypeRequiredDescription
commandstringyesShell command to execute
timeoutintegernoTimeout in seconds (default: 30, max: 120)

Details

Example

{
  "command": "go test ./...",
  "timeout": 60
}

grep

Search files for a regex pattern. Returns matching lines in file:line:content format.

Parameters

NameTypeRequiredDescription
patternstringyesRegular expression pattern to search for
pathstringnoDirectory or file to search (default: current directory)
includestringnoGlob pattern to filter files (e.g., *.go, *.js)
context_linesintegernoNumber of lines to show before and after each match (like grep -C)

Limits

Example

{
  "pattern": "func Test",
  "include": "*.go",
  "context_lines": 2
}

list_files

List files and directories. Returns entries with a / suffix for directories.

Parameters

NameTypeRequiredDescription
pathstringnoDirectory path to list (default: current directory)
recursivebooleannoList files recursively (default: false)
includestringnoGlob pattern to filter file names (e.g., *.go)

Limits

Example

{
  "path": "src",
  "recursive": true,
  "include": "*.go"
}

ask_user

Ask the user a question and wait for their response. The agent loop pauses until the user replies.

Parameters

NameTypeRequiredDescription
questionstringyesThe question to ask the user

Details

Example

{
  "question": "Should I refactor the database layer to use transactions, or keep the current approach?"
}

todo_read

Read the current todo list. Returns all items with their ID, title, status, and optional description.

Parameters

None. This tool takes no parameters.

Details

Example

{}

todo_write

Overwrite the todo list with a new set of items. Use this to track multi-step plans.

Parameters

NameTypeRequiredDescription
todosarrayyesArray of todo item objects

Each todo item object has:

NameTypeRequiredDescription
idstringyesShort unique identifier (e.g. "1", "a")
titlestringyesBrief task title
statusstringyesOne of: pending, in_progress, completed
descriptionstringnoLonger description of the task

Details

Example

{
  "todos": [
    {"id": "1", "title": "Read existing code", "status": "completed"},
    {"id": "2", "title": "Implement new feature", "status": "in_progress"},
    {"id": "3", "title": "Write tests", "status": "pending"}
  ]
}

web_search

Search the web using the Brave Search API. Returns results with title, URL, and snippet.

Parameters

NameTypeRequiredDescription
querystringyesSearch query
countintegernoNumber of results to return (default: 5, max: 20)

Details

Example

{
  "query": "Go context.WithTimeout best practices",
  "count": 5
}

web_fetch

Fetch a URL and return the text content. HTML pages are automatically stripped to plain text.

Parameters

NameTypeRequiredDescription
urlstringyesURL to fetch

Limits

Details

Example

{
  "url": "https://pkg.go.dev/context"
}

patch_apply

Apply a unified diff patch to one or more files. Use this for making multiple related changes across files in a single operation.

Parameters

NameTypeRequiredDescription
patchstringyesUnified diff content to apply

Details

Example

{
  "patch": "--- a/main.go\n+++ b/main.go\n@@ -10,3 +10,4 @@\n func main() {\n \tfmt.Println(\"hello\")\n+\tfmt.Println(\"world\")\n }\n"
}

plan_enter

Enter plan mode. Disables write tools so you can safely explore and analyze before making changes.

Parameters

None. This tool takes no parameters.

Details

Example

{}

plan_exit

Exit plan mode and re-enable all write tools.

Parameters

None. This tool takes no parameters.

Details

Example

{}

task

Spawn a sub-agent to handle an independent subtask. The sub-agent gets a fresh conversation with the same model and provider.

Parameters

NameTypeRequiredDescription
descriptionstringyesShort description of the subtask (3-5 words)
promptstringyesDetailed prompt describing what the sub-agent should do

Details

Example

{
  "description": "find unused imports",
  "prompt": "Search all Go files in the project for unused imports and list them with file paths and line numbers."
}

twitter_post

Post a tweet via X API v2. Requires twitter.bearer_token or TWITTER_BEARER_TOKEN.

Parameters

NameTypeRequiredDescription
textstringyesTweet text, 1-280 characters

Limits

Example

{
  "text": "Hello from muxd!"
}

twitter_schedule

Schedule a tweet for later posting.

Parameters

NameTypeRequiredDescription
textstringyesTweet text, 1-280 characters
timestringyesPost time in RFC3339 format or HH:MM local time
recurrencestringnoOne of once, daily, hourly (default: once)

Details

Example

{
  "text": "Good morning!",
  "time": "08:00",
  "recurrence": "daily"
}

git_status

Get git status in short format (-s).

Parameters

NameTypeRequiredDescription
pathstringnoDirectory path (default: current working directory)

Limits

Example

{
  "path": "."
}