MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / NewEditFileTool

Function NewEditFileTool

tools/builtin.go:154–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152type EditFileTool struct{ BaseTool }
153
154func NewEditFileTool() *EditFileTool {
155 return &EditFileTool{BaseTool{Spec: ToolSpec{
156 Name: "edit_file",
157 Description: "Perform exact string replacement in an existing file. By default, old_string must appear exactly once in the file. Use replace_all=true to substitute every occurrence.",
158 InputPrototype: EditFileInput{},
159 ReadOnly: BoolPtr(false),
160 ConcurrencySafe: BoolPtr(false),
161 Destructive: BoolPtr(false),
162 ConfirmFilePaths: true,
163 }}}
164}
165
166func (t *EditFileTool) ValidateInput(execCtx ExecutionContext, input any) (bool, string) {
167 in := deref[EditFileInput](input)

Callers

nothing calls this directly

Calls 1

BoolPtrFunction · 0.85

Tested by

no test coverage detected