Documentation
¶
Index ¶
- func New(opts Options) *mcp.Server
- func SupportedSchemaVersions() []string
- type BrowserSessionInput
- type ClickImageInput
- type ClickTextInput
- type ClipboardReadInput
- type ClipboardWriteInput
- type FindColorInput
- type FindImageInput
- type FindTextInput
- type KeyInput
- type ObserveInput
- type Options
- type PasteInput
- type SemanticActionInput
- type ServerInfo
- type TextInput
- type ToolInfo
- type TypeTextInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SupportedSchemaVersions ¶
func SupportedSchemaVersions() []string
SupportedSchemaVersions returns the action-payload schema versions this server can accept. Re-exported here so MCP-side callers don't need to depend on the contract package directly. Mirrors contract.SupportedSchemaVersions exactly.
Types ¶
type BrowserSessionInput ¶
type ClickImageInput ¶
type ClickImageInput struct {
FindImageInput
Button string `json:"button,omitempty"`
Count int `json:"count,omitempty"`
MinConfidence float64 `json:"min_confidence,omitempty"`
Strict bool `json:"strict,omitempty"`
}
type ClickTextInput ¶
type ClickTextInput struct {
FindTextInput
Button string `json:"button,omitempty"`
Count int `json:"count,omitempty"`
Strict bool `json:"strict,omitempty" jsonschema:"fail with TARGET_AMBIGUOUS when multiple candidates pass min_confidence"`
}
type ClipboardReadInput ¶
type ClipboardWriteInput ¶
type FindColorInput ¶
type FindColorInput struct {
Point *contract.Point `json:"point,omitempty" jsonschema:"sample this single pixel"`
Color string `json:"color,omitempty" jsonschema:"hex color #rrggbb to search for"`
Region contract.RegionRef `` /* 176-byte string literal not displayed */
Tolerance int `json:"tolerance,omitempty" jsonschema:"per-channel tolerance (default 8)"`
MinArea int `json:"min_area,omitempty" jsonschema:"minimum blob area in pixels (default 4)"`
}
type FindImageInput ¶
type FindImageInput struct {
Region contract.RegionRef `` /* 231-byte string literal not displayed */
TemplatePath string `json:"template_path" jsonschema:"path to a PNG or JPEG template"`
Threshold float64 `json:"threshold,omitempty" jsonschema:"match threshold; defaults to 0.9"`
Scales []float64 `json:"scales,omitempty" jsonschema:"scale factors to try; gocv backend only"`
}
type FindTextInput ¶
type FindTextInput struct {
Region contract.RegionRef `` /* 261-byte string literal not displayed */
Query string `json:"query" jsonschema:"text or regex pattern to look for"`
Lang string `json:"lang,omitempty" jsonschema:"Tesseract language code; defaults to eng"`
CaseSensitive bool `json:"case_sensitive,omitempty"`
Regex bool `json:"regex,omitempty" jsonschema:"interpret query as a regular expression"`
MinConfidence float64 `json:"min_confidence,omitempty" jsonschema:"drop candidates below this OCR confidence (0..1)"`
Preprocess string `` /* 142-byte string literal not displayed */
PSM int `json:"psm,omitempty" jsonschema:"Tesseract page segmentation mode (0..13); 0 omits the flag and uses tesseract default"`
OEM int `json:"oem,omitempty" jsonschema:"Tesseract OCR engine mode (0..3); 0 omits the flag and uses tesseract default"`
}
type KeyInput ¶
type KeyInput struct {
Key string `json:"key" jsonschema:"key or chord such as enter, ctrl+l, alt+tab"`
}
type ObserveInput ¶
type ObserveInput struct {
Screenshot bool `json:"screenshot,omitempty" jsonschema:"include a screenshot in the observation"`
}
type PasteInput ¶
type SemanticActionInput ¶
type ServerInfo ¶
type ServerInfo struct {
Name string `json:"name"`
Version string `json:"version"`
SchemaVersions []string `json:"schema_versions"`
}
ServerInfo is the server-identity envelope returned to MCP clients during initialize. SchemaVersions advertises every action-payload schema version the server can accept.
func GetServerInfo ¶
func GetServerInfo(version contract.VersionInfo) ServerInfo
GetServerInfo returns the server identity plus the supported action-payload schema versions. Called by serve handlers that want to advertise version negotiation metadata.
type ToolInfo ¶
ToolInfo describes one registered MCP tool: its wire name, one-line description, and the read_only / destructive annotations that come from the add() call site. The conventions emit subcommand and the doctor.available_tools field consume this catalog so the tool list has one source of truth (the add() calls inside New()).