project

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package project implements tools for managing Go projects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(ctx context.Context, req *mcp.CallToolRequest, args Params) (*mcp.CallToolResult, any, error)

Handler executes the project_init tool.

func Register

func Register(server *mcp.Server)

Register registers the tool with the server.

Types

type Params

type Params struct {
	//nolint:lll
	Path         string   `json:"path" jsonschema:"Absolute target directory for the project. Always pass absolute paths in multi-root workspaces."`
	ModulePath   string   `json:"module_path" jsonschema:"Go module path (e.g., github.com/user/repo)"`
	Dependencies []string `json:"dependencies,omitempty" jsonschema:"Initial dependencies to install"`
}

Params defines the input parameters.

type Runner

type Runner interface {
	Run(ctx context.Context, dir, name string, args ...string) (string, error)
}

Runner defines the interface for running commands.

var CommandRunner Runner = &stdRunner{}

CommandRunner is used to execute CLI commands.

Jump to

Keyboard shortcuts

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