// types.go - Shared types for toolsrv package protocol import "encoding/json" // ToolInfo describes a tool provided by a server. type ToolInfo struct { Server string Name string Description string InputSchema json.RawMessage Prompt string Tier string Scope string OutputFormat string } // ToolResult is the structured result from a tool execution. type ToolResult struct { Content []ToolResultContent `json:"content"` IsError bool `json:"isError,omitempty"` } // ToolResultContent is a single content item in a tool result. type ToolResultContent struct { Type string `json:"type"` Text string `json:"text,omitempty"` MediaType string `json:"mediaType,omitempty"` Data string `json:"data,omitempty"` } // BypassRequest represents a bypass request from toolsrv. type BypassRequest struct { ID string `json:"id"` Cmd string `json:"cmd"` Cwd string `json:"cwd"` Env map[string]string `json:"env,omitempty"` }