@@ -17,7 +17,6 @@ class CreateTool(Tool[CreateToolInput, ToolRunOptions, StringToolOutput]):
1717 name = "create"
1818 description = """
1919 Creates a new file with the specified content.
20- Returns error message on failure.
2120 """
2221 input_schema = CreateToolInput
2322
@@ -34,7 +33,7 @@ async def _run(
3433 await asyncio .to_thread (tool_input .file .write_text , tool_input .content )
3534 except Exception as e :
3635 return StringToolOutput (result = f"Failed to create file: { e } " )
37- return StringToolOutput ()
36+ return StringToolOutput (result = f"Successfully created { tool_input . file } with the specified text" )
3837
3938
4039class ViewToolInput (BaseModel ):
@@ -60,7 +59,7 @@ class ViewTool(Tool[ViewToolInput, ToolRunOptions, StringToolOutput]):
6059 name = "view"
6160 description = """
6261 Outputs the contents of a file or lists the contents of a directory. Can read an entire file
63- or a specific range of lines. Returns error message on failure.
62+ or a specific range of lines.
6463 """
6564 input_schema = ViewToolInput
6665
@@ -96,7 +95,6 @@ class InsertTool(Tool[InsertToolInput, ToolRunOptions, StringToolOutput]):
9695 name = "insert"
9796 description = """
9897 Inserts the specified text at a specific location in a file.
99- Returns error message on failure.
10098 """
10199 input_schema = InsertToolInput
102100
@@ -115,7 +113,7 @@ async def _run(
115113 await asyncio .to_thread (tool_input .file .write_text , "" .join (lines ))
116114 except Exception as e :
117115 return StringToolOutput (result = f"Failed to insert text: { e } " )
118- return StringToolOutput ()
116+ return StringToolOutput (result = f"Successfully inserted the specified text into { tool_input . file } " )
119117
120118
121119class StrReplaceToolInput (BaseModel ):
@@ -130,7 +128,6 @@ class StrReplaceTool(Tool[StrReplaceToolInput, ToolRunOptions, StringToolOutput]
130128 name = "str_replace"
131129 description = """
132130 Replaces a specific string in the specified file with a new string.
133- Returns error message on failure.
134131 """
135132 input_schema = StrReplaceToolInput
136133
@@ -150,4 +147,4 @@ async def _run(
150147 )
151148 except Exception as e :
152149 return StringToolOutput (result = f"Failed to replace text: { e } " )
153- return StringToolOutput ()
150+ return StringToolOutput (result = f"Successfully replaced the specified text in { tool_input . file } " )
0 commit comments