mcp

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ToolGet            = "workflowy_get"
	ToolList           = "workflowy_list"
	ToolSearch         = "workflowy_search"
	ToolTargets        = "workflowy_targets"
	ToolID             = "workflowy_id"
	ToolCreate         = "workflowy_create"
	ToolUpdate         = "workflowy_update"
	ToolMove           = "workflowy_move"
	ToolDelete         = "workflowy_delete"
	ToolComplete       = "workflowy_complete"
	ToolUncomplete     = "workflowy_uncomplete"
	ToolReportCount    = "workflowy_report_count"
	ToolReportChildren = "workflowy_report_children"
	ToolReportCreated  = "workflowy_report_created"
	ToolReportModified = "workflowy_report_modified"
	ToolReportMirrors  = "workflowy_report_mirrors"
	ToolReplace        = "workflowy_replace"
	ToolTransform      = "workflowy_transform"
)

Variables

This section is empty.

Functions

func ParseExposeList

func ParseExposeList(raw string) ([]string, error)

ParseExposeList converts the --expose flag into a deduplicated, ordered tool list. Supports groups: all, read, write. Individual tools can be referenced either by their short name (e.g., "get") or full MCP name (e.g., "workflowy_get").

func RunServer

func RunServer(ctx context.Context, cfg Config) error

RunServer starts the MCP stdio server with the requested tool set.

Types

type Config

type Config struct {
	APIKeyFile        string
	DefaultAPIKeyFile string
	Expose            string
	Version           string
	WriteRootID       string
	ReadRootID        string
}

Config controls MCP server startup.

type ToolBuilder

type ToolBuilder struct {
	// contains filtered or unexported fields
}

ToolBuilder wires Workflowy operations into MCP tool handlers.

func NewToolBuilder

func NewToolBuilder(client workflowy.Client, writeRootID, readRootID string) ToolBuilder

NewToolBuilder creates a builder bound to the provided Workflowy client. If writeRootID is set, write operations are restricted to that node and its descendants. If readRootID is set, all operations are restricted to that node and its descendants.

func (ToolBuilder) BuildTools

func (b ToolBuilder) BuildTools(toolNames []string) ([]mcpserver.ServerTool, error)

BuildTools constructs the requested tools in the order provided.

Jump to

Keyboard shortcuts

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