Internal

internal/platform/mcpsubmit

Package mcpsubmit serves a minimal MCP stdio server for one structured payload.

import "github.com/nilstate/scafld/v2/internal/platform/mcpsubmit"

Package mcpsubmit serves a minimal MCP stdio server for one structured payload.

Functions

func Run(ctx context.Context, stdin io.Reader, stdout io.Writer, stderr io.Writer, opts Options) error

Source: internal/platform/mcpsubmit/server.go:39

Run serves a minimal MCP stdio server that accepts exactly one tool call and writes the canonical payload JSON to Options.OutPath.

Types

type Accepted

Source: internal/platform/mcpsubmit/server.go:19

Accepted describes a canonical accepted submission.

type Accepted struct {
	Data              []byte
	Text              string
	StructuredContent map[string]any
}
Fields
  • Data []byte
  • Text string
  • StructuredContent map[string]any

type Options

Source: internal/platform/mcpsubmit/server.go:26

Options configures a single-tool submit server.

type Options struct {
	OutPath            string
	ServerName         string
	ToolName           string
	ToolTitle          string
	ToolDescription    string
	SchemaJSON         string
	AllowRepeatedCalls bool
	ParseAndEncode     func(string) (Accepted, error)
}
Fields
  • OutPath string
  • ServerName string
  • ToolName string
  • ToolTitle string
  • ToolDescription string
  • SchemaJSON string
  • AllowRepeatedCalls bool
  • ParseAndEncode func(string) (Accepted, error)