tools

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package tools implements MCP tool handlers for mtb.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrResult

func ErrResult[T any](msg string) (*mcp.CallToolResult, T, error)

ErrResult returns an MCP error result with the given message.

Types

type ChecklistInput added in v0.5.0

type ChecklistInput struct {
	Project string `json:"project" jsonschema:"description of the project being evaluated"`
}

type ChecklistItem added in v0.5.0

type ChecklistItem struct {
	Category    string `json:"category"`
	Question    string `json:"question"`
	Description string `json:"description"`
}

type ChecklistOutput added in v0.5.0

type ChecklistOutput struct {
	Items    []ChecklistItem `json:"items"`
	Guidance string          `json:"guidance"`
}

func HandleChecklist added in v0.5.0

type CompareInput added in v0.8.0

type CompareInput struct {
	Project string `json:"project" jsonschema:"description of the project being evaluated"`
}

type CompareOutput added in v0.8.0

type CompareOutput struct {
	Guidance string `json:"guidance"`
}

func HandleCompare added in v0.8.0

type ConsultInput added in v0.4.0

type ConsultInput struct {
	Problem  string `json:"problem" jsonschema:"what the user wants to build or the problem they want to solve"`
	Path     string `json:"path,omitempty" jsonschema:"project directory to scan for existing dependencies"`
	Language string `json:"language,omitempty" jsonschema:"filter GitHub search by programming language"`
}

type ConsultOutput added in v0.4.0

type ConsultOutput struct {
	Questions []string `json:"questions"`
	Guidance  string   `json:"guidance"`
}

func HandleConsult added in v0.4.0

type DepsInput

type DepsInput struct {
	Path string `json:"path" jsonschema:"path to directory to scan for dependencies"`
}

type DepsOutput

type DepsOutput struct {
	Guidance string `json:"guidance"`
}

type LanguageSummary

type LanguageSummary struct {
	Name       string `json:"Name"`
	Bytes      int64  `json:"Bytes"`
	Lines      int64  `json:"Lines"`
	Code       int64  `json:"Code"`
	Comment    int64  `json:"Comment"`
	Blank      int64  `json:"Blank"`
	Complexity int64  `json:"Complexity"`
	Count      int64  `json:"Count"`
}

type StatsInput

type StatsInput struct {
	Path              string   `json:"path" jsonschema:"path to directory or file to analyze"`
	Cocomo            *bool    `json:"cocomo,omitempty" jsonschema:"include COCOMO cost estimates (default true)"`
	Complexity        *bool    `json:"complexity,omitempty" jsonschema:"include complexity metrics (default true)"`
	ExcludeDir        []string `json:"exclude_dir,omitempty" jsonschema:"directories to exclude from analysis"`
	ExcludeExtensions []string `json:"exclude_ext,omitempty" jsonschema:"file extensions to exclude (e.g. min.js)"`
	IncludeExtensions []string `json:"include_ext,omitempty" jsonschema:"only include these file extensions"`
}

type StatsOutput

type StatsOutput struct {
	LanguageSummary         []LanguageSummary `json:"languageSummary"`
	EstimatedCost           float64           `json:"estimatedCost"`
	EstimatedScheduleMonths float64           `json:"estimatedScheduleMonths"`
	EstimatedPeople         float64           `json:"estimatedPeople"`
}

func RunSCC

func RunSCC(absPath string, cocomo, complexity bool, excludeDir, excludeExt, includeExt []string) (*StatsOutput, error)

RunSCC runs scc on the given absolute path and returns analysis results.

Jump to

Keyboard shortcuts

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