m2e

package
v0.59.134 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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() mcpapi.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) (*mcpapi.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