mcp

package
v0.0.0-...-768bafe Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntryKind

type EntryKind string
const (
	EntryKindTodo EntryKind = "todo"
	EntryKindDone EntryKind = "done"
)

type MCP

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

MCP represents the MCP service with a specific provider

func New

func New(log logger.Logger, provider mcptypes.MCPProvider) *MCP

New creates a new MCP instance with the given provider and logger Example usage:

provider := groq.NewClient(log, apiKey, model)
mcpService := mcp.New(log, provider)
response, err := mcpService.ParseMessage(ctx, userID, text)

func (*MCP) ParseMessage

func (m *MCP) ParseMessage(ctx context.Context, text string) (*ParsedResponse, error)

ParseMessage processes user message through LLM provider and returns parsed entries

type ParsedEntry

type ParsedEntry struct {
	Kind        EntryKind `json:"kind"`        // "todo" or "done"
	Title       string    `json:"title"`       // short title
	Date        string    `json:"date"`        // YYYY-MM-DD
	Description string    `json:"description"` // cleaned text
	Language    string    `json:"language"`    // "ru" | "en" | "unknown"
	Confidence  float64   `json:"confidence"`  // 0..1
}

ParsedEntry represents a single parsed task entry from the LLM

type ParsedResponse

type ParsedResponse struct {
	Entries []ParsedEntry `json:"entries"`
}

ParsedResponse contains all parsed entries from the LLM

Directories

Path Synopsis
provider

Jump to

Keyboard shortcuts

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