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

Function NewWriteFileTool

tools/builtin.go:115–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113type WriteFileTool struct{ BaseTool }
114
115func NewWriteFileTool() *WriteFileTool {
116 return &WriteFileTool{BaseTool{Spec: ToolSpec{
117 Name: "write_file",
118 Description: "Create or overwrite a file. Parent directories are created automatically if they do not exist.",
119 InputPrototype: WriteFileInput{},
120 ReadOnly: BoolPtr(false),
121 ConcurrencySafe: BoolPtr(false),
122 Destructive: BoolPtr(true),
123 ConfirmFilePaths: true,
124 }}}
125}
126
127func (t *WriteFileTool) ValidateInput(execCtx ExecutionContext, input any) (bool, string) {
128 in := deref[WriteFileInput](input)

Callers

nothing calls this directly

Calls 1

BoolPtrFunction · 0.85

Tested by

no test coverage detected