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 ¶
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
Click to show internal directories.
Click to hide internal directories.