m2e

package
v0.44.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultMaxTextLength is the default maximum length for text input
	DefaultMaxTextLength = 40000
	// M2EMaxLengthEnvVar is the environment variable for configuring max text length
	M2EMaxLengthEnvVar = "M2E_MAX_LENGTH"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConvertRequest

type ConvertRequest struct {
	Text            string `json:"text,omitempty"`              // For inline mode
	FilePath        string `json:"file_path,omitempty"`         // For update_file mode (default)
	KeepSmartQuotes bool   `json:"keep_smart_quotes,omitempty"` // Whether to keep smart quotes (default: false, i.e., normalise them)
}

ConvertRequest represents the request parameters for text conversion

type ConvertResponse

type ConvertResponse struct {
	ConvertedText string `json:"converted_text"`
	OriginalText  string `json:"original_text"`
	ChangesCount  int    `json:"changes_count"`
}

ConvertResponse represents the response from text conversion

type M2ETool

type M2ETool struct{}

M2ETool implements the American to British English converter tool

func (*M2ETool) Definition

func (m *M2ETool) Definition() mcp.Tool

Definition returns the tool's definition for MCP registration

func (*M2ETool) Execute

func (m *M2ETool) Execute(ctx context.Context, logger *logrus.Logger, cache *sync.Map, args map[string]any) (*mcp.CallToolResult, error)

Execute executes the m2e tool

func (*M2ETool) ProvideExtendedInfo added in v0.22.0

func (m *M2ETool) ProvideExtendedInfo() *tools.ExtendedHelp

ProvideExtendedInfo provides detailed usage information for the m2e tool

Jump to

Keyboard shortcuts

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