Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ expression: prompt
<tool>{"name":"write","description":"Use it to create a new file at a specified path with the provided content. Always provide absolute paths for file locations. The tool automatically handles the creation of any missing intermediary directories in the specified path.\n\nIMPORTANT: DO NOT attempt to use this tool to move or rename files, use the shell tool instead.","arguments":{"content":{"description":"The content to write to the file. ALWAYS provide the COMPLETE intended content of the file, without any truncation or omissions. You MUST include ALL parts of the file, even if they haven't been modified.","type":"string","is_required":true},"overwrite":{"description":"If set to true, existing files will be overwritten. If not set and the file exists, an error will be returned with the content of the existing file.","type":"boolean","is_required":false},"path":{"description":"The path of the file to write to (absolute path required)","type":"string","is_required":true}}}</tool>
<tool>{"name":"fs_search","description":"Recursively searches directories for files by content (regex) and/or name (glob pattern). Provides context-rich results with line numbers for content matches. Two modes: content search (when regex provided) or file finder (when regex omitted). Uses case-insensitive Rust regex syntax. Requires absolute paths. Avoids binary files and excluded directories. Best for code exploration, API usage discovery, configuration settings, or finding patterns across projects. For large pages, returns the first {{env.maxSearchLines}} lines and stores the complete content in a temporary file for subsequent access.","arguments":{"file_pattern":{"description":"Glob pattern to filter files (e.g., '*.ts' for TypeScript files). If not provided, it will search all files (*).","type":"string","is_required":false},"max_search_lines":{"description":"Maximum number of lines to return in the search results.","type":"integer","is_required":false},"path":{"description":"The absolute path of the directory or file to search in. If it's a directory, it will be searched recursively. If it's a file path, only that specific file will be searched.","type":"string","is_required":true},"regex":{"description":"The regular expression pattern to search for in file contents. Uses Rust regex syntax. If not provided, only file name matching will be performed.","type":"string","is_required":false},"start_index":{"description":"Starting index for the search results (1-based).","type":"integer","is_required":false}}}</tool>
<tool>{"name":"sem_search","description":"AI-powered semantic code search. YOUR DEFAULT TOOL for code discovery tasks. Use this when you need to find code locations, understand implementations, or explore functionality - it works with natural language about behavior and concepts, not just keyword matching.\n\nStart with sem_search when: locating code to modify, understanding how features work, finding patterns/examples, or exploring unfamiliar areas. Understands queries like \"authentication flow\" (finds login), \"retry logic\" (finds backoff), \"validation\" (finds checking/sanitization).\n\nReturns the topK most relevant file:line locations with code context. Use multiple varied queries (2-3) for best coverage. For exact string matching (TODO comments, specific function names), use regex search instead.","arguments":{"file_extension":{"description":"Optional file extension filter (e.g., \".rs\", \".ts\", \".py\"). If provided, only files with this extension will be included in the search results.","type":"string","is_required":false},"queries":{"description":"List of search queries to execute in parallel. Using multiple queries (2-3) with varied phrasings significantly improves results - each query captures different aspects of what you're looking for. Each query pairs a search term with a use_case for reranking. Example: for authentication, try \"user login verification\", \"token generation\", \"OAuth flow\".","type":"array","is_required":true}}}</tool>
<tool>{"name":"remove","description":"Request to remove a file at the specified path. Use this when you need to delete an existing file. The path must be absolute. This operation cannot be undone, so use it carefully.","arguments":{"path":{"description":"The path of the file to remove (absolute path required)","type":"string","is_required":true}}}</tool>
<tool>{"name":"remove","description":"Request to remove a file at the specified path. Use this when you need to delete an existing file. The path must be absolute. This operation can be undone using the `undo` tool.","arguments":{"path":{"description":"The path of the file to remove (absolute path required)","type":"string","is_required":true}}}</tool>
<tool>{"name":"patch","description":"Modifies files with targeted line operations on matched patterns. Supports prepend, append, replace, replace_all, swap operations. Ideal for precise changes to configs, code, or docs while preserving context. Use this tool for refactoring tasks (e.g., renaming variables, updating function signatures). For maximum efficiency, invoke multiple `patch` operations simultaneously rather than sequentially. Fails if search pattern isn't found.\n\nUsage Guidelines:\n- When editing text from Read tool output, preserve the EXACT text character-by-character (indentation, spaces, punctuation, special characters) as it appears AFTER the line number prefix. Format: 'line_number:'. Never include the prefix.\n- CRITICAL: Even tiny differences like 'allows to' vs 'allows the' will fail","arguments":{"content":{"description":"The text to replace it with (must be different from search)","type":"string","is_required":true},"operation":{"description":"The operation to perform on the matched text. Possible options are: - 'prepend': Add content before the matched text - 'append': Add content after the matched text - 'replace': Use only for specific, targeted replacements where you need to modify just the first match. - 'replace_all': Should be used for renaming variables, functions, types, or any widespread replacements across the file. This is the recommended choice for consistent refactoring operations as it ensures all occurrences are updated. - 'swap': Replace the matched text with another text (search for the second text and swap them)","type":"string","is_required":true},"path":{"description":"The path to the file to modify","type":"string","is_required":true},"search":{"description":"The text to replace. When skipped the patch operation applies to the entire content. `Append` adds the new content to the end, `Prepend` adds it to the beginning, and `Replace` fully overwrites the original content. `Swap` requires a search target, so without one, it makes no changes.","type":"string","is_required":false}}}</tool>
<tool>{"name":"undo","description":"Reverts the most recent file operation (create/modify/delete) on a specific file. Use this tool when you need to recover from incorrect file changes or if a revert is requested by the user.","arguments":{"path":{"description":"The absolute path of the file to revert to its previous state.","type":"string","is_required":true}}}</tool>
<tool>{"name":"shell","description":"Executes shell commands. The `cwd` parameter sets the working directory for command execution.\n\nCRITICAL: Do NOT use `cd` commands in the command string. This is FORBIDDEN. Always use the `cwd` parameter to set the working directory instead. Any use of `cd` in the command is redundant, incorrect, and violates the tool contract. Use for running utilities, installing packages, or executing build commands. Returns complete output including stdout, stderr, and exit code for diagnostic purposes.","arguments":{"command":{"description":"The shell command to execute.","type":"string","is_required":true},"cwd":{"description":"The working directory where the command should be executed.","type":"string","is_required":true},"env":{"description":"Environment variable names to pass to command execution (e.g., [\"PATH\", \"HOME\", \"USER\"]). The system automatically reads the specified values and applies them during command execution.","type":"array","is_required":false},"keep_ansi":{"description":"Whether to preserve ANSI escape codes in the output. If true, ANSI escape codes will be preserved in the output. If false (default), ANSI escape codes will be stripped from the output.","type":"boolean","is_required":false}}}</tool>
Expand Down
2 changes: 1 addition & 1 deletion crates/forge_domain/src/tools/descriptions/fs_remove.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Request to remove a file at the specified path. Use this when you need to delete an existing file. The path must be absolute. This operation cannot be undone, so use it carefully.
Request to remove a file at the specified path. Use this when you need to delete an existing file. The path must be absolute. This operation can be undone using the `undo` tool.
Loading