mcptools

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package mcptools is the thin glue between the MCP server and the store. It registers the six tools, converts inputs to store calls, and renders results to Markdown. Validation errors are returned as readable tool-result text so the model can read and self-correct; only infrastructure failures surface as Go errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context(rep store.ContextReport, today string) string

Context renders the working-state report (§4.6).

func Register

func Register(s *mcp.Server, st *store.Store)

Register wires the tools onto the server.

func RenderContextReport

func RenderContextReport(rep store.ContextReport) string

RenderContextReport renders the working-state report dated today (local). Convenience for callers (CLI) that don't carry their own clock.

func SearchResults

func SearchResults(query string, results []store.SearchResult) string

SearchResults renders the compact match list (§4.5).

func Ticket

func Ticket(t domain.Ticket, existed bool) string

Ticket renders the canonical full ticket view (§4.4). If existed is true a duplicate-create note is prepended.

Types

type AddCommentInput

type AddCommentInput struct {
	Key    string `json:"key" jsonschema:"required"`
	Body   string `json:"body" jsonschema:"required. Markdown allowed."`
	Author string `json:"author,omitempty" jsonschema:"default 'agent'"`
}

type ClaimTicketInput added in v0.2.0

type ClaimTicketInput struct {
	Key     string `json:"key" jsonschema:"required, e.g. T-42"`
	Agent   string `` /* 138-byte string literal not displayed */
	Release bool   `json:"release,omitempty" jsonschema:"release your claim instead of taking it"`
	Force   bool   `json:"force,omitempty" jsonschema:"take over (or release) a claim held by another agent"`
}

type CreateTicketInput

type CreateTicketInput struct {
	Title       string   `json:"title" jsonschema:"imperative mood, e.g. 'Add Zigbee sensor bridge'"`
	Description string   `json:"description,omitempty" jsonschema:"goal, constraints, acceptance criteria"`
	Project     string   `json:"project,omitempty" jsonschema:"defaults to 'default'"`
	ParentKey   string   `json:"parent_key,omitempty" jsonschema:"e.g. T-7; makes this a subtask"`
	Priority    string   `json:"priority,omitempty" jsonschema:"critical|high|normal|low, default normal"`
	Labels      []string `json:"labels,omitempty"`
}

type GetContextInput

type GetContextInput struct {
	Project string `json:"project,omitempty" jsonschema:"omit for all projects"`
}

type GetTicketInput

type GetTicketInput struct {
	Key string `json:"key" jsonschema:"required"`
}

type SearchTicketsInput

type SearchTicketsInput struct {
	Query   string `json:"query,omitempty" jsonschema:"FTS5 query; omit to filter only"`
	Status  string `json:"status,omitempty"`
	Project string `json:"project,omitempty"`
	Label   string `json:"label,omitempty"`
	Limit   int    `json:"limit,omitempty" jsonschema:"default 10, max 50"`
}

type UpdateTicketInput

type UpdateTicketInput struct {
	Key         string   `json:"key" jsonschema:"required, e.g. T-42"`
	Status      string   `json:"status,omitempty"`
	Priority    string   `json:"priority,omitempty"`
	Title       string   `json:"title,omitempty"`
	Description *string  `json:"description,omitempty" jsonschema:"replaces description; pass \"\" to clear it; prefer add_comment for progress notes"`
	Labels      []string `json:"labels,omitempty" jsonschema:"replaces the full label set; pass [] to clear"`
	LinkBlocks  string   `json:"link_blocks,omitempty" jsonschema:"key of a ticket this one blocks"`
	LinkRelates string   `json:"link_relates,omitempty" jsonschema:"key of a related ticket"`
}

Jump to

Keyboard shortcuts

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