# internal/platform/mcpsubmit

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

## Run

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

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

## Accepted

```go
type Accepted struct {
	Data              []byte
	Text              string
	StructuredContent map[string]any
}
```

Accepted describes a canonical accepted submission.

- `Data: []byte`: 
- `Text: string`: 
- `StructuredContent: map[string]any`: 

## Options

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

Options configures a single-tool submit server.

- `OutPath: string`: 
- `ServerName: string`: 
- `ToolName: string`: 
- `ToolTitle: string`: 
- `ToolDescription: string`: 
- `SchemaJSON: string`: 
- `AllowRepeatedCalls: bool`: 
- `ParseAndEncode: func(string) (Accepted, error)`:
