edit

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package edit implements the file editing tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(server *mcp.Server)

Register registers the smart_edit tool with the server.

Types

type Params

type Params struct {
	Filename   string  `json:"filename" jsonschema:"The path to the file to edit"`
	OldContent string  `` /* 128-byte string literal not displayed */
	NewContent string  `json:"new_content" jsonschema:"The new code to insert"`
	Threshold  float64 `json:"threshold,omitempty" jsonschema:"Similarity threshold (0.0-1.0) for fuzzy matching, default 0.95"`

	StartLine int  `json:"start_line,omitempty" jsonschema:"Optional: restrict search to this line number and after"`
	EndLine   int  `json:"end_line,omitempty" jsonschema:"Optional: restrict search to this line number and before"`
	Append    bool `json:"append,omitempty" jsonschema:"If true, append new_content to the end of the file (ignores old_content)"`
}

Params defines the input parameters for the smart_edit tool.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL