跳转到内容

Tool Reference

此内容尚不支持你的语言。

FieldValue
NameRead
CategoryFile Operations
DescriptionRead a file from the local filesystem. Supports text files, images (PNG, JPG), PDFs, and Jupyter notebooks (.ipynb).

Input Parameters:

ParameterTypeRequiredDescription
file_pathstringAbsolute path to the file to read
offsetnumberLine number to start reading from (1-indexed)
limitnumberMaximum number of lines to read

Output: File content with line numbers (cat -n format). Images are rendered visually. PDFs are processed page by page.


FieldValue
NameEdit
CategoryFile Operations
DescriptionPerform exact string replacements in files. Requires prior Read of the file.

Input Parameters:

ParameterTypeRequiredDescription
file_pathstringAbsolute path to the file to modify
old_stringstringThe exact text to replace (must be unique in the file)
new_stringstringThe replacement text
replace_allbooleanReplace all occurrences (default: false)

Output: Confirmation of the edit with surrounding context.


FieldValue
NameWrite
CategoryFile Operations
DescriptionWrite (overwrite) a file on the local filesystem. Requires prior Read if file exists.

Input Parameters:

ParameterTypeRequiredDescription
file_pathstringAbsolute path to the file to write
contentstringThe complete content to write

Output: Confirmation that the file was written successfully.


FieldValue
NameNotebookEdit
CategoryFile Operations
DescriptionCreate, replace, or delete cells in Jupyter notebooks (.ipynb files).

Input Parameters:

ParameterTypeRequiredDescription
notebook_pathstringAbsolute path to the notebook file
new_sourcestringNew source content for the cell
cell_idstringID of the cell to edit or insert after
cell_type"code" | "markdown"Cell type (required for insert)
edit_mode"replace" | "insert" | "delete"Type of edit (default: replace)

Output: Confirmation of the notebook modification.

FieldValue
NameGlob
CategorySearch & Navigation
DescriptionFast file pattern matching. Returns matching file paths sorted by modification time.

Input Parameters:

ParameterTypeRequiredDescription
patternstringGlob pattern to match (e.g., **/*.ts, src/**/*.tsx)
pathstringDirectory to search in (default: cwd)

Output: List of matching file paths, sorted by modification time.


FieldValue
NameGrep
CategorySearch & Navigation
DescriptionSearch file contents using regular expressions. Built on ripgrep.

Input Parameters:

ParameterTypeRequiredDescription
patternstringRegex pattern to search for
pathstringFile or directory to search (default: cwd)
output_mode"content" | "files_with_matches" | "count"Output format (default: files_with_matches)
globstringFile glob filter (e.g., *.ts)
typestringFile type filter (e.g., js, py)
-ibooleanCase-insensitive search
-nbooleanShow line numbers (default: true)
-AnumberLines after match
-BnumberLines before match
-CnumberLines around match (context)
multilinebooleanEnable multiline matching
head_limitnumberLimit output to first N entries
offsetnumberSkip first N entries

Output: Matching content, file paths, or counts depending on output_mode.

FieldValue
NameBash
CategoryShell Execution
DescriptionExecute bash commands in a persistent shell session. Subject to 27-layer security checks.

Input Parameters:

ParameterTypeRequiredDescription
commandstringThe bash command to execute
descriptionstringBrief description of command purpose
timeoutnumberTimeout in ms (max: 600,000, default: 120,000)
run_in_backgroundbooleanRun in background, notify on completion
dangerouslyDisableSandboxbooleanDisable sandbox mode (requires explicit flag)

Output: Command stdout and stderr. Truncated if exceeding 30,000 characters.

FieldValue
NameWebSearch
CategoryWeb & Network
DescriptionSearch the web for current information. Returns search results with titles, URLs, and snippets.

Input Parameters:

ParameterTypeRequiredDescription
querystringSearch query (min 2 characters)
allowed_domainsstring[]Only include results from these domains
blocked_domainsstring[]Exclude results from these domains

Output: Search results with titles, URLs, and content snippets.


FieldValue
NameWebFetch
CategoryWeb & Network
DescriptionFetch a URL and process its content. Converts HTML to markdown for analysis.

Input Parameters:

ParameterTypeRequiredDescription
urlstring (URI)Fully-formed URL to fetch
promptstringPrompt describing what to extract from the page

Output: Processed content based on the prompt. Large content may be summarized.

FieldValue
NameTodoWrite
CategoryTask Management
DescriptionCreate and manage a structured task list for tracking progress on complex operations.

Input Parameters:

ParameterTypeRequiredDescription
todosTodoItem[]Complete updated todo list

TodoItem Schema:

FieldTypeRequiredDescription
contentstringTask description in imperative form (e.g., “Fix bug”)
activeFormstringPresent continuous form (e.g., “Fixing bug”)
status"pending" | "in_progress" | "completed"Current task state

Output: Confirmation of todo list update.

FieldValue
NameGitStatus
CategoryVersion Control
DescriptionShow working tree status: staged, unstaged, and untracked files.

Input Parameters: None

Output: Git status output showing file states.


FieldValue
NameGitDiff
CategoryVersion Control
DescriptionShow changes between commits, working tree, and staging area.

Input Parameters:

ParameterTypeRequiredDescription
argsstringArguments to pass to git diff (e.g., --staged, HEAD~1)

Output: Unified diff output.


FieldValue
NameGitLog
CategoryVersion Control
DescriptionShow commit log history.

Input Parameters:

ParameterTypeRequiredDescription
argsstringArguments to pass to git log (e.g., -n 10, --oneline)

Output: Formatted commit log.


FieldValue
NameGitCommit
CategoryVersion Control
DescriptionCreate a git commit with staged changes.

Input Parameters:

ParameterTypeRequiredDescription
messagestringCommit message

Output: Commit hash and summary.

FieldValue
NameSkill
CategoryAgent Management
DescriptionExecute a predefined skill (workflow template) within the conversation.

Input Parameters:

ParameterTypeRequiredDescription
skillstringSkill name (e.g., “commit”, “review-pr”, “pdf”)
argsstringOptional arguments for the skill

Output: Skill execution output (varies by skill).


FieldValue
NameFork
CategoryAgent Management
DescriptionSpawn an independent sub-agent for a parallel subtask. Shares the parent’s prompt cache prefix.

Input Parameters:

ParameterTypeRequiredDescription
taskstringTask description for the sub-agent
contextstringAdditional context beyond shared prefix
maxTurnsnumberMaximum turns for the sub-agent (default: 10)

Output: Sub-agent’s final result.


FieldValue
NameCoordinator
CategoryAgent Management
DescriptionLaunch a coordinator agent that plans and manages a multi-step workflow with worker agents.

Input Parameters:

ParameterTypeRequiredDescription
goalstringHigh-level goal to accomplish
maxWorkersnumberMaximum concurrent workers (default: 3)
maxRoundsnumberMaximum coordination rounds (default: 20)

Output: Synthesized result from all worker outputs.

FieldValue
NameVaries (provided by MCP server)
CategoryMCP
DescriptionTools dynamically discovered from connected MCP servers. Schema defined by the MCP server.

Input Parameters: Defined by the MCP server’s tool schema.

Output: Defined by the MCP server’s tool response.

The following tools complete the set of 46 built-in tools:

ToolDescription
ListDirectoryList files and directories at a path with metadata
FileInfoGet file metadata: size, permissions, modification time
MoveMove or rename a file or directory
CopyCopy a file or directory
ToolDescription
FindReferencesFind all references to a symbol in the codebase
GoToDefinitionNavigate to the definition of a symbol
ListSymbolsList all symbols (functions, classes, types) in a file
ToolDescription
GitAddStage files for commit
GitBranchList, create, or delete branches
GitCheckoutSwitch branches or restore files
GitStashStash working directory changes
GitBlameShow line-by-line authorship
GitShowShow commit details or file at a specific revision
ToolDescription
GetWorkingDirectoryReturn the current working directory
GetEnvironmentReturn environment information (OS, shell, runtime)
ReadImageRead and analyze an image file
ReadPDFRead and extract content from a PDF file
ToolDescription
TeamSwarmLaunch a team of peer agents with shared mailbox
DreamTaskQueue a speculative background task
TaskOutputRead output from a background task
MemoryWritePersist information to long-term memory
MemoryReadRetrieve information from long-term memory
CategoryCountPermission Level
File Operations7Write operations need approval; reads auto-approved
Search & Navigation5Auto-approved (read-only)
Shell Execution127-layer security check
Web & Network2Auto-approved
Task Management1Auto-approved
Version Control8Read operations auto-approved; writes need approval
Agent Management4Auto-approved (delegated to sub-agents)
MCPDynamicFollows MCP server configuration
System & Environment4Auto-approved (read-only)
Agent & Workflow5Auto-approved
Total~46