mcpserver

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyzeInput

type AnalyzeInput struct {
	Paths  []string `json:"paths,omitempty" jsonschema:"Paths to analyze. Defaults to current directory if empty."`
	Format string   `json:"format,omitempty" jsonschema:"Output format: toon (default), json, or markdown."`
}

AnalyzeInput is the base input for all analyze tools.

type ChurnInput

type ChurnInput struct {
	AnalyzeInput
	Days int `json:"days,omitempty" jsonschema:"Number of days of git history to analyze. Default 30."`
	Top  int `json:"top,omitempty" jsonschema:"Show top N files by churn. Default 20."`
}

ChurnInput adds churn-specific options.

type CohesionInput

type CohesionInput struct {
	AnalyzeInput
	IncludeTests bool   `json:"include_tests,omitempty" jsonschema:"Include test files in analysis."`
	Sort         string `json:"sort,omitempty" jsonschema:"Sort by metric: lcom, wmc, cbo, or dit. Default lcom."`
	Top          int    `json:"top,omitempty" jsonschema:"Show top N classes. Default 20."`
}

CohesionInput adds cohesion-specific options.

type ComplexityInput

type ComplexityInput struct {
	AnalyzeInput
	IncludeHalstead     bool `json:"include_halstead,omitempty" jsonschema:"Include Halstead software science metrics."`
	CyclomaticThreshold int  `json:"cyclomatic_threshold,omitempty" jsonschema:"Cyclomatic complexity threshold for warnings. Default 10."`
	CognitiveThreshold  int  `json:"cognitive_threshold,omitempty" jsonschema:"Cognitive complexity threshold for warnings. Default 15."`
	FunctionsOnly       bool `json:"functions_only,omitempty" jsonschema:"Show only function-level metrics, omit file summaries."`
}

ComplexityInput adds complexity-specific options.

type DeadcodeInput

type DeadcodeInput struct {
	AnalyzeInput
	Confidence float64 `json:"confidence,omitempty" jsonschema:"Minimum confidence threshold (0.0-1.0). Default 0.8."`
}

DeadcodeInput adds deadcode-specific options.

type DefectInput

type DefectInput struct {
	AnalyzeInput
	HighRiskOnly bool `json:"high_risk_only,omitempty" jsonschema:"Show only high-risk files."`
}

DefectInput adds defect prediction options.

type DuplicatesInput

type DuplicatesInput struct {
	AnalyzeInput
	MinLines  int     `json:"min_lines,omitempty" jsonschema:"Minimum lines for clone detection. Default 6."`
	Threshold float64 `json:"threshold,omitempty" jsonschema:"Similarity threshold (0.0-1.0). Default 0.8."`
}

DuplicatesInput adds duplicate detection options.

type GraphInput

type GraphInput struct {
	AnalyzeInput
	Scope          string `json:"scope,omitempty" jsonschema:"Analysis scope: file, function, module, or package. Default module."`
	IncludeMetrics bool   `json:"include_metrics,omitempty" jsonschema:"Include PageRank and centrality metrics."`
}

GraphInput adds graph-specific options.

type HotspotInput

type HotspotInput struct {
	AnalyzeInput
	Days int `json:"days,omitempty" jsonschema:"Number of days of git history to analyze. Default 30."`
	Top  int `json:"top,omitempty" jsonschema:"Show top N files by hotspot score. Default 20."`
}

HotspotInput adds hotspot-specific options.

type OwnershipInput

type OwnershipInput struct {
	AnalyzeInput
	Top            int  `json:"top,omitempty" jsonschema:"Show top N files by ownership concentration. Default 20."`
	IncludeTrivial bool `json:"include_trivial,omitempty" jsonschema:"Include trivial lines in ownership calculation."`
}

OwnershipInput adds ownership-specific options.

type RepoMapInput

type RepoMapInput struct {
	AnalyzeInput
	Top int `json:"top,omitempty" jsonschema:"Number of top symbols to include. Default 50."`
}

RepoMapInput adds repo map options.

type SATDInput

type SATDInput struct {
	AnalyzeInput
	IncludeTests bool     `json:"include_tests,omitempty" jsonschema:"Include test files in analysis."`
	StrictMode   bool     `json:"strict_mode,omitempty" jsonschema:"Only match explicit markers with colons (e.g., TODO:)."`
	Patterns     []string `json:"patterns,omitempty" jsonschema:"Additional patterns to detect beyond defaults."`
}

SATDInput adds SATD-specific options.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server wraps the MCP server and registers all omen analysis tools.

func NewServer

func NewServer(version string) *Server

NewServer creates a new MCP server with all omen tools registered.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run starts the MCP server over stdio transport.

type TDGInput

type TDGInput struct {
	AnalyzeInput
	Hotspots      int  `json:"hotspots,omitempty" jsonschema:"Number of hotspots to show. Default 10."`
	ShowPenalties bool `json:"show_penalties,omitempty" jsonschema:"Show applied penalties in output."`
}

TDGInput adds TDG-specific options.

type TemporalCouplingInput

type TemporalCouplingInput struct {
	AnalyzeInput
	Days         int `json:"days,omitempty" jsonschema:"Number of days of git history to analyze. Default 30."`
	MinCochanges int `json:"min_cochanges,omitempty" jsonschema:"Minimum co-changes to consider files coupled. Default 3."`
	Top          int `json:"top,omitempty" jsonschema:"Show top N file pairs. Default 20."`
}

TemporalCouplingInput adds temporal coupling options.

Jump to

Keyboard shortcuts

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