From 094985331ffdd3716da0f1f8b0685ccf5a4cdfc3 Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Sat, 14 Sep 2024 04:08:49 -0400 Subject: [PATCH] Reorder tools by importance --- src/ClaudeDev.ts | 116 +++++++++++++++++++++++------------------------ 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/src/ClaudeDev.ts b/src/ClaudeDev.ts index 7ad143f..077a852 100644 --- a/src/ClaudeDev.ts +++ b/src/ClaudeDev.ts @@ -107,6 +107,64 @@ const tools: Tool[] = [ required: ["command"], }, }, + { + name: "read_file", + description: + "Read the contents of a file at the specified path. Use this when you need to examine the contents of an existing file, for example to analyze code, review text files, or extract information from configuration files. Automatically extracts raw text from PDF and DOCX files. May not be suitable for other types of binary files, as it returns the raw content as a string.", + input_schema: { + type: "object", + properties: { + path: { + type: "string", + description: `The path of the file to read (relative to the current working directory ${cwd})`, + }, + }, + required: ["path"], + }, + }, + { + name: "write_to_file", + description: + "Write content to a file at the specified path. If the file exists, it will be overwritten with the provided content. If the file doesn't exist, it will be created. Always provide the full intended content of the file, without any truncation. This tool will automatically create any directories needed to write the file.", + input_schema: { + type: "object", + properties: { + path: { + type: "string", + description: `The path of the file to write to (relative to the current working directory ${cwd})`, + }, + content: { + type: "string", + description: "The full content to write to the file.", + }, + }, + required: ["path", "content"], + }, + }, + { + name: "search_files", + description: + "Perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context.", + input_schema: { + type: "object", + properties: { + path: { + type: "string", + description: `The path of the directory to search in (relative to the current working directory ${cwd}). This directory will be recursively searched.`, + }, + regex: { + type: "string", + description: "The regular expression pattern to search for. Uses Rust regex syntax.", + }, + filePattern: { + type: "string", + description: + "Optional glob pattern to filter files (e.g., '*.ts' for TypeScript files). If not provided, it will search all files (*).", + }, + }, + required: ["path", "regex"], + }, + }, { name: "list_files", description: @@ -143,64 +201,6 @@ const tools: Tool[] = [ required: ["path"], }, }, - { - name: "search_files", - description: - "Perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context.", - input_schema: { - type: "object", - properties: { - path: { - type: "string", - description: `The path of the directory to search in (relative to the current working directory ${cwd}). This directory will be recursively searched.`, - }, - regex: { - type: "string", - description: "The regular expression pattern to search for. Uses Rust regex syntax.", - }, - filePattern: { - type: "string", - description: - "Optional glob pattern to filter files (e.g., '*.ts' for TypeScript files). If not provided, it will search all files (*).", - }, - }, - required: ["path", "regex"], - }, - }, - { - name: "read_file", - description: - "Read the contents of a file at the specified path. Use this when you need to examine the contents of an existing file, for example to analyze code, review text files, or extract information from configuration files. Automatically extracts raw text from PDF and DOCX files. May not be suitable for other types of binary files, as it returns the raw content as a string.", - input_schema: { - type: "object", - properties: { - path: { - type: "string", - description: `The path of the file to read (relative to the current working directory ${cwd})`, - }, - }, - required: ["path"], - }, - }, - { - name: "write_to_file", - description: - "Write content to a file at the specified path. If the file exists, it will be overwritten with the provided content. If the file doesn't exist, it will be created. Always provide the full intended content of the file, without any truncation. This tool will automatically create any directories needed to write the file.", - input_schema: { - type: "object", - properties: { - path: { - type: "string", - description: `The path of the file to write to (relative to the current working directory ${cwd})`, - }, - content: { - type: "string", - description: "The full content to write to the file.", - }, - }, - required: ["path", "content"], - }, - }, { name: "ask_followup_question", description: