Documentation
¶
Overview ¶
Package tools implements MCP tool handlers for mtb.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DepsOutput ¶
type DepsOutput struct {
PackageCount int `json:"packageCount"`
Packages []PackageInfo `json:"packages"`
}
func HandleDeps ¶
func HandleDeps(ctx context.Context, req *mcp.CallToolRequest, input DepsInput) (*mcp.CallToolResult, DepsOutput, error)
type LanguageSummary ¶
type PackageInfo ¶
type RepoResult ¶
type RepoResult struct {
Name string `json:"name"`
FullName string `json:"fullName"`
Description string `json:"description,omitempty"`
URL string `json:"url"`
Stars int `json:"stars"`
Language string `json:"language,omitempty"`
Topics []string `json:"topics,omitempty"`
UpdatedAt string `json:"updatedAt"`
}
type SearchInput ¶
type SearchInput struct {
Query string `json:"query" jsonschema:"search query describing what you need (e.g. 'json schema validator python')"`
Language string `json:"language,omitempty" jsonschema:"filter by programming language (e.g. 'go', 'python', 'javascript')"`
MaxResults *int `json:"max_results,omitempty" jsonschema:"maximum number of results to return (default 10, max 25)"`
}
type SearchOutput ¶
type SearchOutput struct {
TotalCount int `json:"totalCount"`
Results []RepoResult `json:"results"`
}
func HandleSearch ¶
func HandleSearch(ctx context.Context, req *mcp.CallToolRequest, input SearchInput) (*mcp.CallToolResult, SearchOutput, error)
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 HandleStats ¶
func HandleStats(ctx context.Context, req *mcp.CallToolRequest, input StatsInput) (*mcp.CallToolResult, StatsOutput, error)
Click to show internal directories.
Click to hide internal directories.