Documentation
¶
Index ¶
- func RegisterFS(server *mcp.Server, g *guardrail.Guardrail)
- func RegisterSFTP(server *mcp.Server, g *guardrail.Guardrail)
- func RegisterSSH(server *mcp.Server, g *guardrail.Guardrail)
- func RegisterTools(server *mcp.Server, g *guardrail.Guardrail)
- func Serve(ctx context.Context) error
- type FSBaseOutput
- type FSCpInput
- type FSListInput
- type FSListOutput
- type FSMkdirInput
- type FSMvInput
- type FSRmInput
- type FSTouchInput
- type FileInfo
- type ListNodesInput
- type ListNodesOutput
- type NodeInfo
- type ReadFileInput
- type ReadFileOutput
- type SshRunInput
- type SshRunOutput
- type TransferFileInput
- type TransferFileOutput
- type WriteFileInput
- type WriteFileOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTools ¶
RegisterTools 统一注册各模块的 MCP 能力,并注入安全护栏
Types ¶
type FSBaseOutput ¶
type FSBaseOutput struct {
Status string `json:"status" jsonschema:"Operation status"`
}
type FSListInput ¶
type FSListOutput ¶
type FSMkdirInput ¶
type FSTouchInput ¶
type FileInfo ¶
type FileInfo struct {
Name string `json:"name" jsonschema:"File name"`
Size int64 `json:"size" jsonschema:"Size in bytes"`
Mode string `json:"mode" jsonschema:"File mode/permissions"`
ModTime time.Time `json:"modTime" jsonschema:"Last modification time"`
IsDir bool `json:"isDir" jsonschema:"True if it is a directory"`
}
type ListNodesInput ¶
type ListNodesInput struct {
Tag string `json:"tag,omitempty" jsonschema:"Filter nodes by tag. If empty, lists all nodes."`
}
type ListNodesOutput ¶
type NodeInfo ¶
type NodeInfo struct {
ID string `json:"id" jsonschema:"Node ID / Name"`
Alias []string `json:"alias,omitempty" jsonschema:"Node aliases"`
Address string `json:"address" jsonschema:"Host address and port"`
User string `json:"user" jsonschema:"SSH user"`
AuthType string `json:"authType" jsonschema:"Authentication type"`
ProxyJump string `json:"proxyJump,omitempty" jsonschema:"Proxy jump host"`
Tags []string `json:"tags,omitempty" jsonschema:"Node tags"`
}
type ReadFileInput ¶
type ReadFileInput struct {
NodeID string `json:"nodeID" jsonschema:"Node ID for the remote machine"`
Path string `json:"path" jsonschema:"Absolute path to the remote file"`
Offset int64 `json:"offset,omitempty" jsonschema:"Byte offset to start reading from"`
Limit int64 `json:"limit,omitempty" jsonschema:"Max bytes to read (default 50KB, max 100KB)"`
}
type ReadFileOutput ¶
type ReadFileOutput struct {
Content string `json:"content" jsonschema:"File content represented as string"`
EOF bool `json:"eof" jsonschema:"True if end of file reached"`
Size int64 `json:"size" jsonschema:"Total size of the remote file"`
Status string `json:"status" jsonschema:"Operation status"`
}
type SshRunInput ¶
type SshRunOutput ¶
type TransferFileInput ¶
type TransferFileOutput ¶
type TransferFileOutput struct {
Status string `json:"status" jsonschema:"Operation status"`
}
type WriteFileInput ¶
type WriteFileInput struct {
NodeID string `json:"nodeID" jsonschema:"Node ID for the remote machine"`
Path string `json:"path" jsonschema:"Absolute path to the remote file"`
Content string `json:"content" jsonschema:"Content to write"`
Append bool `json:"append,omitempty" jsonschema:"If true, append to existing file; if false, overwrite completely"`
}
type WriteFileOutput ¶
Click to show internal directories.
Click to hide internal directories.