tftp
Manage files on a TFTP server by listing, uploading, downloading, and deleting device firmware and configuration files.
Instructions
Manage TFTP server files (CRUD-style)
v0.3.0: TFTP server integration for device firmware/config file serving
TFTP server runs on SSH proxy (port 69/udp) with root directory /opt/gns3-ssh-proxy/tftp. Provides read-write access for devices to upload/download files.
Actions: - list: List all files in TFTP root directory - upload: Upload file to TFTP server (requires filename and content) - download: Download file from TFTP server (requires filename) - delete: Delete file from TFTP server (requires filename) - status: Check TFTP server status
File Content Handling: - Upload: Provide raw bytes in content parameter (base64 encoded automatically) - Download: Returns file content as base64 encoded string
Returns: JSON response with success status, action, and results
Examples: # List TFTP files >>> tftp(action="list") { "success": true, "action": "list", "files": [ {"filename": "config.txt", "size": 1024, "modified": "2025-01-15 10:30:00"}, {"filename": "firmware.bin", "size": 5242880, "modified": "2025-01-14 09:15:00"} ] }
# Upload configuration file
>>> tftp(action="upload", filename="startup-config.txt", content=b"hostname Router1\n...")
{"success": true, "action": "upload", "message": "Uploaded startup-config.txt"}
# Download file
>>> tftp(action="download", filename="config.txt")
{"success": true, "action": "download", "content": "aG9zdG5hbWUgUm91dGVyMQo="}
# Delete file
>>> tftp(action="delete", filename="old-config.txt")
{"success": true, "action": "delete", "message": "Deleted old-config.txt"}
# Check TFTP server status
>>> tftp(action="status")
{
"success": true,
"action": "status",
"tftp_enabled": true,
"tftp_port": 69,
"tftp_root": "/opt/gns3-ssh-proxy/tftp",
"file_count": 5,
"total_size": 10485760
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action: 'list' (list files), 'upload' (upload file), 'download' (download file), 'delete' (delete file), 'status' (check TFTP server status) | |
| content | No | File content for upload (raw bytes) | |
| filename | No | Filename for upload/download/delete operations |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |