Documentation
¶
Index ¶
- func ExtractField(output, prefix string) string
- func HumanSize(bytes int64) string
- func LogToolCall(ctx context.Context, tool string, dur time.Duration, errs int)
- func ParseProcessField(s string) string
- func RegisterResources(server *mcp.Server)
- func RegisterTools(server *mcp.Server)
- func ShellQuote(s string) string
- func SplitHostPort(s string) (string, string, bool)
- func WithToolTimeout(ctx context.Context, name string, fallback time.Duration) (context.Context, context.CancelFunc)
- type AvailableUpdate
- type BusDevice
- type CPUDetails
- type CPUInfoOutput
- type CPUTemperatureOutput
- type CheckUpdatesInput
- type CheckUpdatesOutput
- type CronJob
- type DesktopSessionOutput
- type DiskInfoOutput
- type DiskUsageStat
- type DockerContainer
- type DockerContainerDetail
- type DockerContainerDetailOutput
- type DockerContainerDiffOutput
- type DockerContainerLogsOutput
- type DockerContainerMount
- type DockerContainerStats
- type DockerContainerStatsOutput
- type DockerContainerTopOutput
- type DockerDiskUsageCategory
- type DockerDiskUsageOutput
- type DockerFileChange
- type DockerImage
- type DockerImageDetail
- type DockerImageDetailOutput
- type DockerImageHistoryOutput
- type DockerImageLayer
- type DockerInfoOutput
- type DockerNetworkSummary
- type DockerNetworksOutput
- type DockerSystemInfoOutput
- type DockerSystemInfoSummary
- type DockerVolumeSummary
- type DockerVolumesOutput
- type EnvironmentVariable
- type EnvironmentVariablesOutput
- type ErrList
- type FailedLoginEntry
- type FailedLoginsOutput
- func GatherFailedLogins(ctx context.Context, lines int) (FailedLoginsOutput, error)
- func GatherFailedLoginsJournalctl(ctx context.Context, lines int) (FailedLoginsOutput, error)
- func HandleGetFailedLogins(ctx context.Context, req *mcp.CallToolRequest, input GetFailedLoginsInput) (*mcp.CallToolResult, FailedLoginsOutput, error)
- type GPUDevice
- type GPUInfoOutput
- func GatherAMDGPU(ctx context.Context) (GPUInfoOutput, error)
- func GatherGPUInfo(ctx context.Context) (GPUInfoOutput, error)
- func GatherNvidiaGPU(ctx context.Context) (GPUInfoOutput, error)
- func HandleGetGPUInfo(ctx context.Context, req *mcp.CallToolRequest, _ GetGPUInfoInput) (*mcp.CallToolResult, GPUInfoOutput, error)
- type GetCPUInfoInput
- type GetCPUTemperatureInput
- type GetDesktopSessionInfoInput
- type GetDiskInfoInput
- type GetDockerContainerDetailInput
- type GetDockerContainerDiffInput
- type GetDockerContainerLogsInput
- type GetDockerContainerStatsInput
- type GetDockerContainerTopInput
- type GetDockerDiskUsageInput
- type GetDockerImageDetailInput
- type GetDockerImageHistoryInput
- type GetDockerInfoInput
- type GetDockerNetworksInput
- type GetDockerSystemInfoInput
- type GetDockerVolumesInput
- type GetEnvironmentVariablesInput
- type GetFailedLoginsInput
- type GetGPUInfoInput
- type GetHardwareBusInfoInput
- type GetInodeUsageInput
- type GetInstalledPackagesInput
- type GetJournalLogsInput
- type GetLargestFilesInput
- type GetListeningPortsInput
- type GetLoadAverageInput
- type GetLoggedInUsersInput
- type GetManPageInput
- type GetMemoryInfoInput
- type GetMountOptionsInput
- type GetNetworkInfoInput
- type GetProcessInfoInput
- type GetServiceStatusInput
- type GetSystemInfoInput
- type GetSystemSnapshotInput
- type GetSystemdUnitsInput
- type GetTopIOProcessesInput
- type GetUserAutomationInput
- type HardwareBusInfoOutput
- type IOProcessStat
- type InodeUsageOutput
- type InodeUsageStat
- type InstalledPackage
- type InstalledPackagesOutput
- type InterfaceStats
- type JournalLogEntry
- type JournalLogsOutput
- type LargestFileEntry
- type LargestFilesOutput
- type ListeningPort
- type ListeningPortsOutput
- type LoadAverageOutput
- type LoggedInUser
- type LoggedInUsersOutput
- type ManPageOutput
- type MemoryInfoOutput
- type MountEntry
- type MountOptionsOutput
- type NetworkInfoOutput
- type PingHostInput
- type PingOutput
- type ProcessInfoOutput
- type ProcessStat
- type ResolveDNSInput
- type ResolveDNSOutput
- type ServiceStatusOutput
- type SystemInfoOutput
- type SystemSnapshotOutput
- type SystemdTimer
- type SystemdUnit
- type SystemdUnitsOutput
- type TemperatureStat
- type TopIOProcessesOutput
- type UserAutomationOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractField ¶
func LogToolCall ¶
func ParseProcessField ¶
func RegisterResources ¶
func RegisterTools ¶
func ShellQuote ¶
Types ¶
type AvailableUpdate ¶
type CPUDetails ¶
type CPUInfoOutput ¶
type CPUInfoOutput struct {
UsagePercent float64 `json:"usage_percent"`
PhysicalCoreCount int32 `json:"physical_core_count"`
Cores []CPUDetails `json:"cores"`
Errors []string `json:"errors,omitempty"`
}
func GatherCPUInfo ¶
func GatherCPUInfo(ctx context.Context) (CPUInfoOutput, error)
func HandleGetCPUInfo ¶
func HandleGetCPUInfo( ctx context.Context, req *mcp.CallToolRequest, _ GetCPUInfoInput, ) (*mcp.CallToolResult, CPUInfoOutput, error)
type CPUTemperatureOutput ¶
type CPUTemperatureOutput struct {
Temperatures []TemperatureStat `json:"temperatures"`
Message string `json:"message,omitempty"`
Errors []string `json:"errors,omitempty"`
}
func GatherCPUTemperature ¶
func GatherCPUTemperature(ctx context.Context) (CPUTemperatureOutput, error)
func HandleGetCPUTemperature ¶
func HandleGetCPUTemperature( ctx context.Context, req *mcp.CallToolRequest, _ GetCPUTemperatureInput, ) (*mcp.CallToolResult, CPUTemperatureOutput, error)
type CheckUpdatesInput ¶
type CheckUpdatesInput struct{}
type CheckUpdatesOutput ¶
type CheckUpdatesOutput struct {
Updates []AvailableUpdate `json:"updates"`
Total int `json:"total"`
Errors []string `json:"errors,omitempty"`
}
func GatherCheckUpdates ¶
func GatherCheckUpdates(ctx context.Context) (CheckUpdatesOutput, error)
func HandleCheckUpdates ¶
func HandleCheckUpdates( ctx context.Context, req *mcp.CallToolRequest, _ CheckUpdatesInput, ) (*mcp.CallToolResult, CheckUpdatesOutput, error)
type DesktopSessionOutput ¶ added in v0.1.8
type DesktopSessionOutput struct {
SessionType string `json:"session_type"`
CurrentDesktop string `json:"current_desktop"`
RuntimeDir string `json:"runtime_dir"`
Display string `json:"display"`
WaylandDisplay string `json:"wayland_display"`
Errors []string `json:"errors,omitempty"`
}
func GatherDesktopSessionInfo ¶ added in v0.1.8
func GatherDesktopSessionInfo( ctx context.Context, ) (DesktopSessionOutput, error)
func HandleGetDesktopSessionInfo ¶ added in v0.1.8
func HandleGetDesktopSessionInfo( ctx context.Context, req *mcp.CallToolRequest, _ GetDesktopSessionInfoInput, ) (*mcp.CallToolResult, DesktopSessionOutput, error)
type DiskInfoOutput ¶
type DiskInfoOutput struct {
Partitions []DiskUsageStat `json:"partitions"`
Errors []string `json:"errors,omitempty"`
}
func GatherDiskInfo ¶
func GatherDiskInfo( ctx context.Context, mountPoint string, ) (DiskInfoOutput, error)
func HandleGetDiskInfo ¶
func HandleGetDiskInfo( ctx context.Context, req *mcp.CallToolRequest, input GetDiskInfoInput, ) (*mcp.CallToolResult, DiskInfoOutput, error)
type DiskUsageStat ¶
type DockerContainer ¶
type DockerContainer struct {
ID string `json:"id"`
Name string `json:"name"`
Image string `json:"image"`
Status string `json:"status"`
}
func ListDockerContainers ¶
func ListDockerContainers(ctx context.Context) ([]DockerContainer, error)
type DockerContainerDetail ¶
type DockerContainerDetail struct {
ID string `json:"id"`
Name string `json:"name"`
Image string `json:"image"`
Created string `json:"created"`
State map[string]any `json:"state"`
Status string `json:"status"`
Path string `json:"path"`
Args []string `json:"args"`
Env []string `json:"env"`
Mounts []DockerContainerMount `json:"mounts"`
Network map[string]any `json:"network"`
Ports map[string]any `json:"ports"`
}
type DockerContainerDetailOutput ¶
type DockerContainerDetailOutput struct {
Container DockerContainerDetail `json:"container"`
Errors []string `json:"errors,omitempty"`
}
func GatherContainerDetail ¶
func GatherContainerDetail( ctx context.Context, containerID string, ) (DockerContainerDetailOutput, error)
func HandleGetContainerDetail ¶
func HandleGetContainerDetail( ctx context.Context, req *mcp.CallToolRequest, input GetDockerContainerDetailInput, ) (*mcp.CallToolResult, DockerContainerDetailOutput, error)
type DockerContainerDiffOutput ¶
type DockerContainerDiffOutput struct {
Changes []DockerFileChange `json:"changes"`
Errors []string `json:"errors,omitempty"`
}
func GatherContainerDiff ¶
func GatherContainerDiff( ctx context.Context, containerID string, ) (DockerContainerDiffOutput, error)
func HandleGetContainerDiff ¶
func HandleGetContainerDiff( ctx context.Context, req *mcp.CallToolRequest, input GetDockerContainerDiffInput, ) (*mcp.CallToolResult, DockerContainerDiffOutput, error)
type DockerContainerLogsOutput ¶
type DockerContainerLogsOutput struct {
Logs []string `json:"logs"`
Errors []string `json:"errors,omitempty"`
}
func GatherContainerLogs ¶
func HandleGetContainerLogs ¶
func HandleGetContainerLogs( ctx context.Context, req *mcp.CallToolRequest, input GetDockerContainerLogsInput, ) (*mcp.CallToolResult, DockerContainerLogsOutput, error)
type DockerContainerMount ¶
type DockerContainerStats ¶
type DockerContainerStats struct {
CPUPercent float64 `json:"cpu_percent"`
MemoryUsage uint64 `json:"memory_usage"`
MemoryLimit uint64 `json:"memory_limit"`
MemoryPercent float64 `json:"memory_percent"`
PIDs uint64 `json:"pids"`
Network map[string]map[string]uint64 `json:"network,omitempty"`
BlockRead uint64 `json:"block_read"`
BlockWrite uint64 `json:"block_write"`
}
type DockerContainerStatsOutput ¶
type DockerContainerStatsOutput struct {
Stats DockerContainerStats `json:"stats"`
Errors []string `json:"errors,omitempty"`
}
func GatherContainerStats ¶
func GatherContainerStats( ctx context.Context, containerID string, ) (DockerContainerStatsOutput, error)
func HandleGetContainerStats ¶
func HandleGetContainerStats( ctx context.Context, req *mcp.CallToolRequest, input GetDockerContainerStatsInput, ) (*mcp.CallToolResult, DockerContainerStatsOutput, error)
type DockerContainerTopOutput ¶
type DockerContainerTopOutput struct {
Titles []string `json:"titles"`
Processes [][]string `json:"processes"`
Errors []string `json:"errors,omitempty"`
}
func GatherContainerTop ¶
func HandleGetContainerTop ¶
func HandleGetContainerTop( ctx context.Context, req *mcp.CallToolRequest, input GetDockerContainerTopInput, ) (*mcp.CallToolResult, DockerContainerTopOutput, error)
type DockerDiskUsageCategory ¶
type DockerDiskUsageOutput ¶
type DockerDiskUsageOutput struct {
Containers DockerDiskUsageCategory `json:"containers"`
Images DockerDiskUsageCategory `json:"images"`
Volumes DockerDiskUsageCategory `json:"volumes"`
BuildCache DockerDiskUsageCategory `json:"build_cache"`
Errors []string `json:"errors,omitempty"`
}
func GatherDockerDiskUsage ¶
func GatherDockerDiskUsage(ctx context.Context) (DockerDiskUsageOutput, error)
func HandleGetDockerDiskUsage ¶
func HandleGetDockerDiskUsage( ctx context.Context, req *mcp.CallToolRequest, _ GetDockerDiskUsageInput, ) (*mcp.CallToolResult, DockerDiskUsageOutput, error)
type DockerFileChange ¶
type DockerImage ¶
type DockerImage struct {
Repository string `json:"repository"`
Tag string `json:"tag"`
ID string `json:"id"`
Size string `json:"size"`
}
func ListDockerImages ¶
func ListDockerImages(ctx context.Context) ([]DockerImage, error)
type DockerImageDetail ¶
type DockerImageDetail struct {
ID string `json:"id"`
RepoTags []string `json:"repo_tags"`
RepoDigests []string `json:"repo_digests"`
Created string `json:"created"`
Author string `json:"author"`
Architecture string `json:"architecture"`
OS string `json:"os"`
Size string `json:"size"`
Entrypoint []string `json:"entrypoint,omitempty"`
Cmd []string `json:"cmd,omitempty"`
Env []string `json:"env,omitempty"`
WorkingDir string `json:"working_dir,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Layers []string `json:"layers,omitempty"`
}
type DockerImageDetailOutput ¶
type DockerImageDetailOutput struct {
Image DockerImageDetail `json:"image"`
Errors []string `json:"errors,omitempty"`
}
func GatherImageDetail ¶
func GatherImageDetail( ctx context.Context, imageID string, ) (DockerImageDetailOutput, error)
func HandleGetImageDetail ¶
func HandleGetImageDetail( ctx context.Context, req *mcp.CallToolRequest, input GetDockerImageDetailInput, ) (*mcp.CallToolResult, DockerImageDetailOutput, error)
type DockerImageHistoryOutput ¶
type DockerImageHistoryOutput struct {
Layers []DockerImageLayer `json:"layers"`
Errors []string `json:"errors,omitempty"`
}
func GatherImageHistory ¶
func GatherImageHistory( ctx context.Context, imageID string, ) (DockerImageHistoryOutput, error)
func HandleGetImageHistory ¶
func HandleGetImageHistory( ctx context.Context, req *mcp.CallToolRequest, input GetDockerImageHistoryInput, ) (*mcp.CallToolResult, DockerImageHistoryOutput, error)
type DockerImageLayer ¶
type DockerInfoOutput ¶
type DockerInfoOutput struct {
Containers []DockerContainer `json:"containers"`
Images []DockerImage `json:"images"`
Errors []string `json:"errors,omitempty"`
}
func GatherDockerInfo ¶
func GatherDockerInfo(ctx context.Context) (DockerInfoOutput, error)
func HandleGetDockerInfo ¶
func HandleGetDockerInfo( ctx context.Context, req *mcp.CallToolRequest, _ GetDockerInfoInput, ) (*mcp.CallToolResult, DockerInfoOutput, error)
type DockerNetworkSummary ¶
type DockerNetworkSummary struct {
ID string `json:"id"`
Name string `json:"name"`
Driver string `json:"driver"`
Scope string `json:"scope"`
Attachable bool `json:"attachable"`
Internal bool `json:"internal"`
Ingress bool `json:"ingress"`
IPv6 bool `json:"ipv6"`
Labels map[string]string `json:"labels,omitempty"`
}
type DockerNetworksOutput ¶
type DockerNetworksOutput struct {
Networks []DockerNetworkSummary `json:"networks"`
Errors []string `json:"errors,omitempty"`
}
func GatherDockerNetworks ¶
func GatherDockerNetworks(ctx context.Context) (DockerNetworksOutput, error)
func HandleGetDockerNetworks ¶
func HandleGetDockerNetworks( ctx context.Context, req *mcp.CallToolRequest, _ GetDockerNetworksInput, ) (*mcp.CallToolResult, DockerNetworksOutput, error)
type DockerSystemInfoOutput ¶
type DockerSystemInfoOutput struct {
Info DockerSystemInfoSummary `json:"info"`
Errors []string `json:"errors,omitempty"`
}
func GatherDockerSystemInfo ¶
func GatherDockerSystemInfo( ctx context.Context, ) (DockerSystemInfoOutput, error)
func HandleGetDockerSystemInfo ¶
func HandleGetDockerSystemInfo( ctx context.Context, req *mcp.CallToolRequest, _ GetDockerSystemInfoInput, ) (*mcp.CallToolResult, DockerSystemInfoOutput, error)
type DockerSystemInfoSummary ¶
type DockerSystemInfoSummary struct {
ID string `json:"id"`
ServerVersion string `json:"server_version"`
Architecture string `json:"architecture"`
OSType string `json:"os_type"`
OperatingSystem string `json:"operating_system"`
KernelVersion string `json:"kernel_version"`
NCPU int `json:"ncpu"`
MemTotal string `json:"mem_total"`
Driver string `json:"driver"`
LoggingDriver string `json:"logging_driver"`
CgroupDriver string `json:"cgroup_driver"`
CgroupVersion string `json:"cgroup_version"`
DefaultRuntime string `json:"default_runtime"`
Runtimes []string `json:"runtimes,omitempty"`
ContainersTotal int `json:"containers_total"`
ContainersRunning int `json:"containers_running"`
ContainersPaused int `json:"containers_paused"`
ContainersStopped int `json:"containers_stopped"`
ImagesTotal int `json:"images_total"`
DockerRootDir string `json:"docker_root_dir"`
SecurityOptions []string `json:"security_options,omitempty"`
Swarm map[string]any `json:"swarm,omitempty"`
}
type DockerVolumeSummary ¶
type DockerVolumesOutput ¶
type DockerVolumesOutput struct {
Volumes []DockerVolumeSummary `json:"volumes"`
Errors []string `json:"errors,omitempty"`
}
func GatherDockerVolumes ¶
func GatherDockerVolumes(ctx context.Context) (DockerVolumesOutput, error)
func HandleGetDockerVolumes ¶
func HandleGetDockerVolumes( ctx context.Context, req *mcp.CallToolRequest, _ GetDockerVolumesInput, ) (*mcp.CallToolResult, DockerVolumesOutput, error)
type EnvironmentVariable ¶ added in v0.1.5
type EnvironmentVariablesOutput ¶ added in v0.1.5
type EnvironmentVariablesOutput struct {
Variables []EnvironmentVariable `json:"variables"`
Count int `json:"count"`
Errors []string `json:"errors,omitempty"`
}
func GatherEnvironmentVariables ¶ added in v0.1.5
func GatherEnvironmentVariables( ctx context.Context, search string, ) (EnvironmentVariablesOutput, error)
func HandleGetEnvironmentVariables ¶ added in v0.1.5
func HandleGetEnvironmentVariables( ctx context.Context, req *mcp.CallToolRequest, input GetEnvironmentVariablesInput, ) (*mcp.CallToolResult, EnvironmentVariablesOutput, error)
type FailedLoginEntry ¶
type FailedLoginEntry struct {
Username string `json:"username"`
Terminal string `json:"terminal"`
Source string `json:"source"`
Timestamp string `json:"timestamp"`
}
func ParseJournalctlFailedLogins ¶
func ParseJournalctlFailedLogins(output string) []FailedLoginEntry
func ParseLastbOutput ¶
func ParseLastbOutput(output string) []FailedLoginEntry
type FailedLoginsOutput ¶
type FailedLoginsOutput struct {
Entries []FailedLoginEntry `json:"entries"`
Errors []string `json:"errors,omitempty"`
}
func GatherFailedLogins ¶
func GatherFailedLogins( ctx context.Context, lines int, ) (FailedLoginsOutput, error)
func GatherFailedLoginsJournalctl ¶
func GatherFailedLoginsJournalctl( ctx context.Context, lines int, ) (FailedLoginsOutput, error)
func HandleGetFailedLogins ¶
func HandleGetFailedLogins( ctx context.Context, req *mcp.CallToolRequest, input GetFailedLoginsInput, ) (*mcp.CallToolResult, FailedLoginsOutput, error)
type GPUInfoOutput ¶
type GPUInfoOutput struct {
Vendor string `json:"vendor"`
GPUs []GPUDevice `json:"gpus"`
Errors []string `json:"errors,omitempty"`
}
func GatherAMDGPU ¶
func GatherAMDGPU(ctx context.Context) (GPUInfoOutput, error)
func GatherGPUInfo ¶
func GatherGPUInfo(ctx context.Context) (GPUInfoOutput, error)
func GatherNvidiaGPU ¶
func GatherNvidiaGPU(ctx context.Context) (GPUInfoOutput, error)
func HandleGetGPUInfo ¶
func HandleGetGPUInfo( ctx context.Context, req *mcp.CallToolRequest, _ GetGPUInfoInput, ) (*mcp.CallToolResult, GPUInfoOutput, error)
type GetCPUInfoInput ¶
type GetCPUInfoInput struct{}
type GetCPUTemperatureInput ¶
type GetCPUTemperatureInput struct{}
type GetDesktopSessionInfoInput ¶ added in v0.1.8
type GetDesktopSessionInfoInput struct{}
type GetDiskInfoInput ¶
type GetDiskInfoInput struct {
MountPoint string `json:"mount_point" jsonschema:"optional mount point filter"`
}
type GetDockerContainerDetailInput ¶
type GetDockerContainerDetailInput struct {
ContainerID string `json:"container_id" jsonschema:"container name or ID"`
}
type GetDockerContainerDiffInput ¶
type GetDockerContainerDiffInput struct {
ContainerID string `json:"container_id" jsonschema:"container name or ID"`
}
type GetDockerContainerLogsInput ¶
type GetDockerContainerLogsInput struct {
ContainerID string `json:"container_id" jsonschema:"container name or ID"`
Tail int `json:"tail,omitempty" jsonschema:"number of lines to tail (default: 100, max: 10000)"`
Timestamps bool `json:"timestamps,omitempty" jsonschema:"include timestamps (default: false)"`
}
type GetDockerContainerStatsInput ¶
type GetDockerContainerStatsInput struct {
ContainerID string `json:"container_id" jsonschema:"container name or ID"`
}
type GetDockerDiskUsageInput ¶
type GetDockerDiskUsageInput struct{}
type GetDockerImageDetailInput ¶
type GetDockerImageDetailInput struct {
ImageID string `json:"image_id" jsonschema:"image name or ID"`
}
type GetDockerImageHistoryInput ¶
type GetDockerImageHistoryInput struct {
ImageID string `json:"image_id" jsonschema:"image name or ID"`
}
type GetDockerInfoInput ¶
type GetDockerInfoInput struct{}
type GetDockerNetworksInput ¶
type GetDockerNetworksInput struct{}
type GetDockerSystemInfoInput ¶
type GetDockerSystemInfoInput struct{}
type GetDockerVolumesInput ¶
type GetDockerVolumesInput struct{}
type GetEnvironmentVariablesInput ¶ added in v0.1.5
type GetEnvironmentVariablesInput struct {
Search string `json:"search,omitempty" jsonschema:"optional search string to filter by name (matches prefix or substring, case-insensitive)"`
}
type GetFailedLoginsInput ¶
type GetFailedLoginsInput struct {
Lines int `json:"lines,omitempty" jsonschema:"number of recent entries (default: 20)"`
}
type GetGPUInfoInput ¶
type GetGPUInfoInput struct{}
type GetHardwareBusInfoInput ¶ added in v0.1.5
type GetHardwareBusInfoInput struct {
Search string `json:"search,omitempty" jsonschema:"optional search string to filter devices by any field (bus, slot, class, vendor, device)"`
}
type GetInodeUsageInput ¶
type GetInodeUsageInput struct {
MountPoint string `json:"mount_point,omitempty" jsonschema:"optional mount point filter"`
}
type GetInstalledPackagesInput ¶
type GetInstalledPackagesInput struct {
Name string `json:"name,omitempty" jsonschema:"optional package name filter"`
}
type GetJournalLogsInput ¶
type GetJournalLogsInput struct {
Unit string `json:"unit,omitempty" jsonschema:"optional systemd unit name (e.g. 'nginx.service')"`
Priority string `json:"priority,omitempty" jsonschema:"optional log priority: emerg,alert,crit,err,warning,notice,info,debug"`
Since string `json:"since,omitempty" jsonschema:"optional start time (e.g. '1 hour ago', '2024-07-03')"`
Until string `json:"until,omitempty" jsonschema:"optional end time"`
Lines int `json:"lines,omitempty" jsonschema:"number of recent lines (default: 50)"`
User bool `json:"user,omitempty" jsonschema:"query user-level journal (default: false)"`
}
type GetLargestFilesInput ¶
type GetListeningPortsInput ¶
type GetListeningPortsInput struct {
Protocol string `json:"protocol,omitempty" jsonschema:"optional protocol filter: tcp, udp"`
}
type GetLoadAverageInput ¶
type GetLoadAverageInput struct{}
type GetLoggedInUsersInput ¶
type GetLoggedInUsersInput struct{}
type GetManPageInput ¶ added in v0.1.2
type GetManPageInput struct {
Command string `json:"command" jsonschema:"command name to get the man page for"`
MaxLines int `json:"max_lines,omitempty" jsonschema:"maximum number of lines to return (default: 500, max: 10000)"`
CleanSpecialChars bool `json:"clean_special_chars,omitempty" jsonschema:"clean backspace formatting characters (default: true)"`
Search string `json:"search,omitempty" jsonschema:"search term to grep for in the man page (case-insensitive)"`
ContextLines int `` /* 137-byte string literal not displayed */
Offset int `json:"offset,omitempty" jsonschema:"line offset to start reading from (0-based)"`
}
type GetMemoryInfoInput ¶
type GetMemoryInfoInput struct{}
type GetMountOptionsInput ¶
type GetMountOptionsInput struct {
MountPoint string `json:"mount_point,omitempty" jsonschema:"optional mount point filter (e.g. '/')"`
}
type GetNetworkInfoInput ¶
type GetNetworkInfoInput struct{}
type GetProcessInfoInput ¶
type GetServiceStatusInput ¶
type GetSystemInfoInput ¶
type GetSystemInfoInput struct{}
type GetSystemSnapshotInput ¶
type GetSystemSnapshotInput struct{}
type GetSystemdUnitsInput ¶
type GetSystemdUnitsInput struct{}
type GetTopIOProcessesInput ¶
type GetTopIOProcessesInput struct {
Limit int `json:"limit,omitempty" jsonschema:"max results (default: 10, max: 50)"`
}
type GetUserAutomationInput ¶ added in v0.1.8
type GetUserAutomationInput struct{}
type HardwareBusInfoOutput ¶ added in v0.1.5
type HardwareBusInfoOutput struct {
PCIDevices []BusDevice `json:"pci_devices"`
USBDevices []BusDevice `json:"usb_devices"`
Errors []string `json:"errors,omitempty"`
}
func GatherHardwareBusInfo ¶ added in v0.1.5
func GatherHardwareBusInfo( ctx context.Context, search string, ) (HardwareBusInfoOutput, error)
func HandleGetHardwareBusInfo ¶ added in v0.1.5
func HandleGetHardwareBusInfo( ctx context.Context, req *mcp.CallToolRequest, input GetHardwareBusInfoInput, ) (*mcp.CallToolResult, HardwareBusInfoOutput, error)
type IOProcessStat ¶
type InodeUsageOutput ¶
type InodeUsageOutput struct {
Mounts []InodeUsageStat `json:"mounts"`
Errors []string `json:"errors,omitempty"`
}
func GatherInodeUsage ¶
func GatherInodeUsage( ctx context.Context, mountPoint string, ) (InodeUsageOutput, error)
func HandleGetInodeUsage ¶
func HandleGetInodeUsage( ctx context.Context, req *mcp.CallToolRequest, input GetInodeUsageInput, ) (*mcp.CallToolResult, InodeUsageOutput, error)
type InodeUsageStat ¶
type InstalledPackage ¶
type InstalledPackagesOutput ¶
type InstalledPackagesOutput struct {
Packages []InstalledPackage `json:"packages"`
Total int `json:"total"`
Errors []string `json:"errors,omitempty"`
}
func GatherInstalledPackages ¶
func GatherInstalledPackages( ctx context.Context, name string, ) (InstalledPackagesOutput, error)
func HandleGetInstalledPackages ¶
func HandleGetInstalledPackages( ctx context.Context, req *mcp.CallToolRequest, input GetInstalledPackagesInput, ) (*mcp.CallToolResult, InstalledPackagesOutput, error)
type InterfaceStats ¶
type InterfaceStats struct {
Name string `json:"name"`
BytesSent uint64 `json:"bytes_sent"`
BytesRecv uint64 `json:"bytes_recv"`
PacketsSent uint64 `json:"packets_sent"`
PacketsRecv uint64 `json:"packets_recv"`
ErrorsIn uint64 `json:"errors_in"`
ErrorsOut uint64 `json:"errors_out"`
DropsIn uint64 `json:"drops_in"`
DropsOut uint64 `json:"drops_out"`
}
type JournalLogEntry ¶
type JournalLogsOutput ¶
type JournalLogsOutput struct {
Entries []JournalLogEntry `json:"entries"`
Errors []string `json:"errors,omitempty"`
}
func GatherJournalLogs ¶
func HandleGetJournalLogs ¶
func HandleGetJournalLogs( ctx context.Context, req *mcp.CallToolRequest, input GetJournalLogsInput, ) (*mcp.CallToolResult, JournalLogsOutput, error)
type LargestFileEntry ¶
type LargestFilesOutput ¶
type LargestFilesOutput struct {
Path string `json:"path"`
Entries []LargestFileEntry `json:"entries"`
Errors []string `json:"errors,omitempty"`
}
func GatherLargestFiles ¶
func HandleGetLargestFiles ¶
func HandleGetLargestFiles( ctx context.Context, req *mcp.CallToolRequest, input GetLargestFilesInput, ) (*mcp.CallToolResult, LargestFilesOutput, error)
type ListeningPort ¶
type ListeningPortsOutput ¶
type ListeningPortsOutput struct {
Ports []ListeningPort `json:"ports"`
Errors []string `json:"errors,omitempty"`
}
func GatherListeningPorts ¶
func GatherListeningPorts( ctx context.Context, protocol string, ) (ListeningPortsOutput, error)
func HandleGetListeningPorts ¶
func HandleGetListeningPorts( ctx context.Context, req *mcp.CallToolRequest, input GetListeningPortsInput, ) (*mcp.CallToolResult, ListeningPortsOutput, error)
type LoadAverageOutput ¶
type LoadAverageOutput struct {
Load1 float64 `json:"load_1"`
Load5 float64 `json:"load_5"`
Load15 float64 `json:"load_15"`
Errors []string `json:"errors,omitempty"`
}
func GatherLoadAverage ¶
func GatherLoadAverage(ctx context.Context) (LoadAverageOutput, error)
func HandleGetLoadAverage ¶
func HandleGetLoadAverage( ctx context.Context, req *mcp.CallToolRequest, _ GetLoadAverageInput, ) (*mcp.CallToolResult, LoadAverageOutput, error)
type LoggedInUser ¶
type LoggedInUsersOutput ¶
type LoggedInUsersOutput struct {
Users []LoggedInUser `json:"users"`
Errors []string `json:"errors,omitempty"`
}
func GatherLoggedInUsers ¶
func GatherLoggedInUsers(ctx context.Context) (LoggedInUsersOutput, error)
func HandleGetLoggedInUsers ¶
func HandleGetLoggedInUsers( ctx context.Context, req *mcp.CallToolRequest, _ GetLoggedInUsersInput, ) (*mcp.CallToolResult, LoggedInUsersOutput, error)
type ManPageOutput ¶ added in v0.1.2
type ManPageOutput struct {
Command string `json:"command"`
Content string `json:"content"`
Truncated bool `json:"truncated,omitempty"`
Errors []string `json:"errors,omitempty"`
}
func GatherManPage ¶ added in v0.1.2
func HandleGetManPage ¶ added in v0.1.2
func HandleGetManPage( ctx context.Context, _ *mcp.CallToolRequest, input GetManPageInput, ) (*mcp.CallToolResult, ManPageOutput, error)
type MemoryInfoOutput ¶
type MemoryInfoOutput struct {
Total uint64 `json:"total"`
Used uint64 `json:"used"`
Free uint64 `json:"free"`
UsedPercent float64 `json:"used_percent"`
SwapTotal uint64 `json:"swap_total"`
SwapUsed uint64 `json:"swap_used"`
SwapFree uint64 `json:"swap_free"`
SwapUsedPercent float64 `json:"swap_used_percent"`
Errors []string `json:"errors,omitempty"`
}
func GatherMemoryInfo ¶
func GatherMemoryInfo(ctx context.Context) (MemoryInfoOutput, error)
func HandleGetMemoryInfo ¶
func HandleGetMemoryInfo( ctx context.Context, req *mcp.CallToolRequest, _ GetMemoryInfoInput, ) (*mcp.CallToolResult, MemoryInfoOutput, error)
type MountEntry ¶
type MountOptionsOutput ¶
type MountOptionsOutput struct {
Mounts []MountEntry `json:"mounts"`
Errors []string `json:"errors,omitempty"`
}
func GatherMountOptions ¶
func GatherMountOptions( ctx context.Context, mountPoint string, ) (MountOptionsOutput, error)
func HandleGetMountOptions ¶
func HandleGetMountOptions( ctx context.Context, req *mcp.CallToolRequest, input GetMountOptionsInput, ) (*mcp.CallToolResult, MountOptionsOutput, error)
type NetworkInfoOutput ¶
type NetworkInfoOutput struct {
Interfaces []InterfaceStats `json:"interfaces"`
Errors []string `json:"errors,omitempty"`
}
func GatherNetworkInfo ¶
func GatherNetworkInfo(ctx context.Context) (NetworkInfoOutput, error)
func HandleGetNetworkInfo ¶
func HandleGetNetworkInfo( ctx context.Context, req *mcp.CallToolRequest, _ GetNetworkInfoInput, ) (*mcp.CallToolResult, NetworkInfoOutput, error)
type PingHostInput ¶
type PingOutput ¶
type PingOutput struct {
Host string `json:"host"`
PacketsTransmitted int `json:"packets_transmitted"`
PacketsReceived int `json:"packets_received"`
PacketLossPercent float64 `json:"packet_loss_percent"`
MinLatencyMs float64 `json:"min_latency_ms"`
AvgLatencyMs float64 `json:"avg_latency_ms"`
MaxLatencyMs float64 `json:"max_latency_ms"`
Errors []string `json:"errors,omitempty"`
}
func GatherPing ¶
func HandlePingHost ¶
func HandlePingHost( ctx context.Context, req *mcp.CallToolRequest, input PingHostInput, ) (*mcp.CallToolResult, PingOutput, error)
type ProcessInfoOutput ¶
type ProcessInfoOutput struct {
Processes []ProcessStat `json:"processes"`
Errors []string `json:"errors,omitempty"`
}
func GatherProcessInfo ¶
func HandleGetProcessInfo ¶
func HandleGetProcessInfo( ctx context.Context, req *mcp.CallToolRequest, input GetProcessInfoInput, ) (*mcp.CallToolResult, ProcessInfoOutput, error)
type ProcessStat ¶
type ResolveDNSInput ¶
type ResolveDNSInput struct {
Hostname string `json:"hostname" jsonschema:"hostname to resolve (e.g. 'example.com')"`
}
type ResolveDNSOutput ¶
type ResolveDNSOutput struct {
Hostname string `json:"hostname"`
Addresses []string `json:"addresses"`
Errors []string `json:"errors,omitempty"`
}
func GatherDNSResolve ¶
func GatherDNSResolve( ctx context.Context, hostname string, ) (ResolveDNSOutput, error)
func HandleResolveDNS ¶
func HandleResolveDNS( ctx context.Context, req *mcp.CallToolRequest, input ResolveDNSInput, ) (*mcp.CallToolResult, ResolveDNSOutput, error)
type ServiceStatusOutput ¶
type ServiceStatusOutput struct {
Name string `json:"name"`
Loaded string `json:"loaded,omitempty"`
Active string `json:"active,omitempty"`
PID string `json:"pid,omitempty"`
Output string `json:"output"`
Errors []string `json:"errors,omitempty"`
}
func GatherServiceStatus ¶
func HandleGetServiceStatus ¶
func HandleGetServiceStatus( ctx context.Context, req *mcp.CallToolRequest, input GetServiceStatusInput, ) (*mcp.CallToolResult, ServiceStatusOutput, error)
type SystemInfoOutput ¶
type SystemInfoOutput struct {
Hostname string `json:"hostname"`
OSName string `json:"os_name"`
OSVersion string `json:"os_version"`
KernelVersion string `json:"kernel_version"`
Architecture string `json:"architecture"`
UptimeSeconds uint64 `json:"uptime_seconds"`
Errors []string `json:"errors,omitempty"`
}
func GatherSystemInfo ¶
func GatherSystemInfo(ctx context.Context) (SystemInfoOutput, error)
func HandleGetSystemInfo ¶
func HandleGetSystemInfo( ctx context.Context, req *mcp.CallToolRequest, _ GetSystemInfoInput, ) (*mcp.CallToolResult, SystemInfoOutput, error)
type SystemSnapshotOutput ¶
type SystemSnapshotOutput struct {
System SystemInfoOutput `json:"system"`
CPU CPUInfoOutput `json:"cpu"`
Temperature CPUTemperatureOutput `json:"temperature"`
Memory MemoryInfoOutput `json:"memory"`
Disk DiskInfoOutput `json:"disk"`
Network NetworkInfoOutput `json:"network"`
LoadAverage LoadAverageOutput `json:"load_average"`
Processes ProcessInfoOutput `json:"processes"`
Docker DockerInfoOutput `json:"docker"`
Errors ErrList `json:"errors,omitempty"`
}
func HandleGetSystemSnapshot ¶
func HandleGetSystemSnapshot( ctx context.Context, req *mcp.CallToolRequest, _ GetSystemSnapshotInput, ) (*mcp.CallToolResult, SystemSnapshotOutput, error)
type SystemdTimer ¶ added in v0.1.8
type SystemdUnit ¶
type SystemdUnitsOutput ¶
type SystemdUnitsOutput struct {
Units []SystemdUnit `json:"units"`
Errors []string `json:"errors,omitempty"`
}
func GatherSystemdUnits ¶
func GatherSystemdUnits(ctx context.Context) (SystemdUnitsOutput, error)
func HandleGetSystemdUnits ¶
func HandleGetSystemdUnits( ctx context.Context, req *mcp.CallToolRequest, _ GetSystemdUnitsInput, ) (*mcp.CallToolResult, SystemdUnitsOutput, error)
type TemperatureStat ¶
type TopIOProcessesOutput ¶
type TopIOProcessesOutput struct {
Processes []IOProcessStat `json:"processes"`
Errors []string `json:"errors,omitempty"`
}
func GatherTopIOProcesses ¶
func GatherTopIOProcesses( ctx context.Context, limit int, ) (TopIOProcessesOutput, error)
func HandleGetTopIOProcesses ¶
func HandleGetTopIOProcesses( ctx context.Context, req *mcp.CallToolRequest, input GetTopIOProcessesInput, ) (*mcp.CallToolResult, TopIOProcessesOutput, error)
type UserAutomationOutput ¶ added in v0.1.8
type UserAutomationOutput struct {
CronJobs []CronJob `json:"cron_jobs"`
SystemdTimers []SystemdTimer `json:"systemd_timers"`
Errors []string `json:"errors,omitempty"`
}
func GatherUserAutomation ¶ added in v0.1.8
func GatherUserAutomation( ctx context.Context, ) (UserAutomationOutput, error)
func HandleGetUserAutomation ¶ added in v0.1.8
func HandleGetUserAutomation( ctx context.Context, req *mcp.CallToolRequest, _ GetUserAutomationInput, ) (*mcp.CallToolResult, UserAutomationOutput, error)
Click to show internal directories.
Click to hide internal directories.