mcp

package
v2.3.76 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(db *sql.DB, verbose bool) *mcp.Server

NewServer creates a new MCP server with fp-go tools

func Run

func Run(ctx context.Context, verbose bool) error

Run starts the MCP server with stdio transport

Types

type GetExampleArgs

type GetExampleArgs struct {
	Symbol string `json:"symbol" jsonschema:"The symbol name to look up (e.g., 'Type.Method' or 'ExampleType_Method')"`
}

GetExampleArgs represents the arguments for the get_example tool

type GetExampleOutput

type GetExampleOutput struct {
	Examples []GoExample `json:"examples" jsonschema:"List of examples matching the symbol"`
	Count    int         `json:"count" jsonschema:"Number of examples found"`
}

GetExampleOutput represents the output of the get_example tool

type GoExample

type GoExample struct {
	ID         string `json:"id" jsonschema:"Unique identifier in format 'package::ExampleName'"`
	Package    string `json:"package" jsonschema:"Package path"`
	Symbol     string `json:"symbol,omitempty" jsonschema:"Symbol name (e.g., 'Type.Method' parsed from function name)"`
	Name       string `json:"name" jsonschema:"Function name (e.g., 'ExampleType_Method')"`
	DocComment string `json:"doc_comment,omitempty" jsonschema:"Documentation comment for the example"`
	Code       string `json:"code,omitempty" jsonschema:"Full source code of the example function"`
	Output     string `json:"output,omitempty" jsonschema:"Expected output from // Output: block"`
	Imports    string `json:"imports,omitempty" jsonschema:"Import statements needed by the example"`
	File       string `json:"file,omitempty" jsonschema:"File path where the example is located"`
}

GoExample represents a Go example function

type ListSkillsOutput

type ListSkillsOutput struct {
	Skills []SkillInfo `json:"skills" jsonschema:"List of available skills"`
}

ListSkillsOutput represents the output of the list_skills tool

type SearchExamplesArgs

type SearchExamplesArgs struct {
	Query         string `` /* 127-byte string literal not displayed */
	PackageFilter string `json:"package_filter,omitempty" jsonschema:"Optional package name to filter results (e.g., 'option' or 'either')"`
}

SearchExamplesArgs represents the arguments for the search_examples tool

type SearchExamplesOutput

type SearchExamplesOutput struct {
	Examples []GoExample `json:"examples" jsonschema:"List of examples matching the search query"`
	Count    int         `json:"count" jsonschema:"Number of examples found"`
}

SearchExamplesOutput represents the output of the search_examples tool

type SkillInfo

type SkillInfo struct {
	Name        string `json:"name" jsonschema:"The name of the skill (directory name)"`
	Description string `json:"description,omitempty" jsonschema:"A brief description of the skill from its SKILL.md file"`
	Path        string `json:"path" jsonschema:"The relative path to the skill directory"`
}

SkillInfo represents information about a skill

type UseSkillArgs

type UseSkillArgs struct {
	Name string `json:"name" jsonschema:"The name of the skill to use (directory name from list_skills)"`
}

UseSkillArgs represents the arguments for the use_skill tool

type UseSkillOutput

type UseSkillOutput struct {
	Name        string `json:"name" jsonschema:"The name of the skill"`
	Description string `json:"description,omitempty" jsonschema:"A brief description of the skill from its SKILL.md file"`
	Content     string `json:"content" jsonschema:"The content of the skill's SKILL.md file after the YAML frontmatter header"`
}

UseSkillOutput represents the output of the use_skill tool

Jump to

Keyboard shortcuts

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