Documentation
¶
Index ¶
- Variables
- func GetConfig(ctx context.Context, req *mcp.CallToolRequest, args GetConfigInput) (*mcp.CallToolResult, any, error)
- func RunPing(ctx context.Context, req *mcp.CallToolRequest, args RunPingInput) (*mcp.CallToolResult, any, error)
- func RunShowCommand(ctx context.Context, req *mcp.CallToolRequest, args RunShowCommandInput) (*mcp.CallToolResult, any, error)
- func RunTraceroute(ctx context.Context, req *mcp.CallToolRequest, args RunTracerouteInput) (*mcp.CallToolResult, any, error)
- type GetConfigInput
- type RunPingInput
- type RunShowCommandInput
- type RunTracerouteInput
Constants ¶
This section is empty.
Variables ¶
var Obfuscate = true
Obfuscate controls whether sensitive values are replaced with hashes in tool output. Enabled by default; set to false via --no-obfuscate.
Functions ¶
func GetConfig ¶
func GetConfig(ctx context.Context, req *mcp.CallToolRequest, args GetConfigInput) (*mcp.CallToolResult, any, error)
GetConfig retrieves the running or startup configuration from a network device.
func RunPing ¶ added in v1.2.0
func RunPing(ctx context.Context, req *mcp.CallToolRequest, args RunPingInput) (*mcp.CallToolResult, any, error)
RunPing executes a ping command on a network device.
func RunShowCommand ¶
func RunShowCommand(ctx context.Context, req *mcp.CallToolRequest, args RunShowCommandInput) (*mcp.CallToolResult, any, error)
RunShowCommand executes an arbitrary show command on a network device.
func RunTraceroute ¶ added in v1.2.0
func RunTraceroute(ctx context.Context, req *mcp.CallToolRequest, args RunTracerouteInput) (*mcp.CallToolResult, any, error)
RunTraceroute executes a traceroute command on a network device.
Types ¶
type GetConfigInput ¶
type GetConfigInput struct {
Host string `json:"host" jsonschema:"hostname or IP address of the network device"`
Username string `json:"username" jsonschema:"SSH username"`
Port int `json:"port" jsonschema:"SSH port, defaults to 22"`
ConfigType string `json:"config_type" jsonschema:"configuration type: running (default) or startup"`
}
GetConfigInput defines the input parameters for the get_config tool.
type RunPingInput ¶ added in v1.2.0
type RunPingInput struct {
Host string `json:"host" jsonschema:"hostname or IP address of the network device to connect to"`
Destination string `json:"destination" jsonschema:"IP address or hostname to ping"`
Username string `json:"username" jsonschema:"SSH username"`
Port int `json:"port" jsonschema:"SSH port, defaults to 22"`
Count int `json:"count" jsonschema:"number of echo requests to send"`
Source string `json:"source" jsonschema:"source IP address or interface name"`
VRF string `json:"vrf" jsonschema:"VRF name"`
Size int `json:"size" jsonschema:"packet size in bytes"`
DeviceType string `` /* 167-byte string literal not displayed */
}
RunPingInput defines the input parameters for the run_ping tool.
type RunShowCommandInput ¶
type RunShowCommandInput struct {
Host string `json:"host" jsonschema:"hostname or IP address of the network device"`
Command string `json:"command" jsonschema:"show command to execute, e.g. 'show bgp summary | json' or 'show interfaces status | json'"`
Username string `json:"username" jsonschema:"SSH username"`
Port int `json:"port" jsonschema:"SSH port, defaults to 22"`
}
RunShowCommandInput defines the input parameters for the run_show_command tool.
type RunTracerouteInput ¶ added in v1.2.0
type RunTracerouteInput struct {
Host string `json:"host" jsonschema:"hostname or IP address of the network device to connect to"`
Destination string `json:"destination" jsonschema:"IP address or hostname to trace the path to"`
Username string `json:"username" jsonschema:"SSH username"`
Port int `json:"port" jsonschema:"SSH port, defaults to 22"`
MaxHops int `json:"max_hops" jsonschema:"maximum number of hops (TTL); defaults to device default (usually 30)"`
Timeout int `json:"timeout" jsonschema:"per-probe timeout in seconds"`
Probe int `json:"probe" jsonschema:"number of probes per hop"`
Source string `json:"source" jsonschema:"source IP address or interface name"`
VRF string `json:"vrf" jsonschema:"VRF name"`
DeviceType string `` /* 134-byte string literal not displayed */
}
RunTracerouteInput defines the input parameters for the run_traceroute tool.