فهرست منبع

Reorder tools by importance

Saoud Rizwan 1 سال پیش
والد
کامیت
094985331f
1فایلهای تغییر یافته به همراه24 افزوده شده و 24 حذف شده
  1. 24 24
      src/ClaudeDev.ts

+ 24 - 24
src/ClaudeDev.ts

@@ -108,39 +108,37 @@ const tools: Tool[] = [
 		},
 	},
 	{
-		name: "list_files",
+		name: "read_file",
 		description:
-			"List files and directories within the specified directory. If recursive is true, it will list all files and directories recursively. If recursive is false or not provided, it will only list the top-level contents.",
+			"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 directory to list contents for (relative to the current working directory ${cwd})`,
-				},
-				recursive: {
-					type: "string",
-					enum: ["true", "false"],
-					description:
-						"Whether to list files recursively. Use 'true' for recursive listing, 'false' or omit for top-level only.",
+					description: `The path of the file to read (relative to the current working directory ${cwd})`,
 				},
 			},
 			required: ["path"],
 		},
 	},
 	{
-		name: "list_code_definition_names",
+		name: "write_to_file",
 		description:
-			"Lists definition names (classes, functions, methods, etc.) used in source code files at the top level of the specified directory. This tool provides insights into the codebase structure and important constructs, encapsulating high-level concepts and relationships that are crucial for understanding the overall architecture.",
+			"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 directory (relative to the current working directory ${cwd}) to list top level source code definitions for`,
+					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"],
+			required: ["path", "content"],
 		},
 	},
 	{
@@ -168,37 +166,39 @@ const tools: Tool[] = [
 		},
 	},
 	{
-		name: "read_file",
+		name: "list_files",
 		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.",
+			"List files and directories within the specified directory. If recursive is true, it will list all files and directories recursively. If recursive is false or not provided, it will only list the top-level contents.",
 		input_schema: {
 			type: "object",
 			properties: {
 				path: {
 					type: "string",
-					description: `The path of the file to read (relative to the current working directory ${cwd})`,
+					description: `The path of the directory to list contents for (relative to the current working directory ${cwd})`,
+				},
+				recursive: {
+					type: "string",
+					enum: ["true", "false"],
+					description:
+						"Whether to list files recursively. Use 'true' for recursive listing, 'false' or omit for top-level only.",
 				},
 			},
 			required: ["path"],
 		},
 	},
 	{
-		name: "write_to_file",
+		name: "list_code_definition_names",
 		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.",
+			"Lists definition names (classes, functions, methods, etc.) used in source code files at the top level of the specified directory. This tool provides insights into the codebase structure and important constructs, encapsulating high-level concepts and relationships that are crucial for understanding the overall architecture.",
 		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.",
+					description: `The path of the directory (relative to the current working directory ${cwd}) to list top level source code definitions for`,
 				},
 			},
-			required: ["path", "content"],
+			required: ["path"],
 		},
 	},
 	{