mcp

package
v0.0.0-...-5f6f967 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(cfg Config) *gomcp.Server

NewServer creates an MCP server with all taskmd tools registered.

Types

type Config

type Config struct {
	Version string

	// Efforts and PhaseOrder come from the .taskmd.yaml of the project the
	// server was started in. Tools accept a per-call task_dir, so a call
	// targeting a different project still uses this configuration — the same
	// limitation that applies to every other config-driven behaviour here.
	Efforts effort.Scale
	// PhaseOrder lists phase ids in configured order; nil means no phases.
	PhaseOrder []string
	// UnphasedPlacement sets where the next tool ranks unphased tasks under
	// strict phase ordering. The zero value means next.UnphasedCurrent.
	UnphasedPlacement next.UnphasedPlacement

	// Worktrees builds the cross-worktree overlay per scanned dir; read tools
	// serve the merged view (effective status plus additive provenance fields)
	// when it is active, and mutation tools return the sibling-only guard
	// error. The zero value disables the overlay entirely.
	Worktrees worktree.Builder
}

Config is the server-wide configuration, resolved once at startup.

type ContextInput

type ContextInput struct {
	TaskDir        string              `json:"task_dir,omitempty" jsonschema:"task directory to scan, defaults to current directory"`
	TaskID         string              `json:"task_id" jsonschema:"required,task ID to resolve context for"`
	Scopes         map[string][]string `json:"scopes,omitempty" jsonschema:"scope definitions mapping scope names to file paths"`
	ProjectRoot    string              `json:"project_root,omitempty" jsonschema:"project root directory for resolving file paths"`
	Resolve        bool                `json:"resolve,omitempty" jsonschema:"expand directory paths to individual files"`
	IncludeContent bool                `json:"include_content,omitempty" jsonschema:"inline file contents and task body"`
	MaxFiles       int                 `json:"max_files,omitempty" jsonschema:"cap number of files returned, 0 for unlimited"`
}

ContextInput defines the input schema for the context tool.

type GetInput

type GetInput struct {
	TaskDir string `json:"task_dir,omitempty" jsonschema:"task directory to scan, defaults to current directory"`
	TaskID  string `json:"task_id" jsonschema:"required,task ID to retrieve"`
}

GetInput defines the input schema for the get tool.

type GraphInput

type GraphInput struct {
	TaskDir       string   `json:"task_dir,omitempty" jsonschema:"task directory to scan, defaults to current directory"`
	RootTaskID    string   `json:"root_task_id,omitempty" jsonschema:"focus on a specific task and its dependencies/dependents"`
	ExcludeStatus []string `json:"exclude_status,omitempty" jsonschema:"exclude tasks with these statuses"`
	Filters       []string `json:"filters,omitempty" jsonschema:"filter expressions, e.g. status=pending, priority=high"`
}

GraphInput defines the input schema for the graph tool.

type ListInput

type ListInput struct {
	TaskDir string   `json:"task_dir,omitempty" jsonschema:"task directory to scan, defaults to current directory"`
	Filters []string `json:"filters,omitempty" jsonschema:"filter expressions, e.g. status=pending, priority=high"`
	Sort    string   `json:"sort,omitempty" jsonschema:"sort field: id, title, status, priority, effort, created"`
}

ListInput defines the input schema for the list tool.

type NextInput

type NextInput struct {
	TaskDir   string   `json:"task_dir,omitempty" jsonschema:"task directory to scan, defaults to current directory"`
	Limit     int      `json:"limit,omitempty" jsonschema:"max number of recommendations to return, defaults to 5"`
	Filters   []string `json:"filters,omitempty" jsonschema:"filter expressions, e.g. priority=high, tag=mvp"`
	QuickWins bool     `json:"quick_wins,omitempty" jsonschema:"only show tasks at the lowest configured effort"`
	Critical  bool     `json:"critical,omitempty" jsonschema:"only show tasks on the critical path"`
}

NextInput defines the input schema for the next tool.

type SearchInput

type SearchInput struct {
	TaskDir string `json:"task_dir,omitempty" jsonschema:"task directory to scan, defaults to current directory"`
	Query   string `json:"query" jsonschema:"required,search query for full-text search across task titles and bodies"`
}

SearchInput defines the input schema for the search tool.

type SetInput

type SetInput struct {
	TaskDir  string   `json:"task_dir,omitempty" jsonschema:"task directory to scan, defaults to current directory"`
	TaskID   string   `json:"task_id" jsonschema:"required,task ID to update"`
	Status   string   `json:"status,omitempty" jsonschema:"new status: pending, in-progress, completed, in-review, blocked, cancelled"`
	Priority string   `json:"priority,omitempty" jsonschema:"new priority: low, medium, high, critical"`
	Effort   string   `` /* 128-byte string literal not displayed */
	Owner    string   `json:"owner,omitempty" jsonschema:"new owner/assignee"`
	Tags     []string `json:"tags,omitempty" jsonschema:"replace all tags with this list"`
	AddTags  []string `json:"add_tags,omitempty" jsonschema:"tags to add to existing tags"`
	RemTags  []string `json:"rem_tags,omitempty" jsonschema:"tags to remove from existing tags"`
	AddPRs   []string `json:"add_prs,omitempty" jsonschema:"PR URLs to add"`
	RemPRs   []string `json:"rem_prs,omitempty" jsonschema:"PR URLs to remove"`
}

SetInput defines the input schema for the set tool.

type StatusInput

type StatusInput struct {
	TaskDir string `json:"task_dir,omitempty" jsonschema:"task directory to scan, defaults to current directory"`
	TaskID  string `json:"task_id" jsonschema:"required,task ID to retrieve"`
}

StatusInput defines the input schema for the status tool.

type ValidateInput

type ValidateInput struct {
	TaskDir string `json:"task_dir,omitempty" jsonschema:"task directory to scan, defaults to current directory"`
	Strict  bool   `json:"strict,omitempty" jsonschema:"enable strict mode for additional warnings"`
}

ValidateInput defines the input schema for the validate tool.

Jump to

Keyboard shortcuts

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