pt_screenshot
Captures the Packet Tracer logical canvas and saves it as a PNG, JPG, or BMP image, returning only the file path to avoid bloating context.
Instructions
Captures PT's logical canvas and saves it as an image.
Returns the file's PATH, not the image: a capture weighs tens of thousands of bytes and dumping it in the reply would fill the context without anyone being able to see it.
PNG compresses a diagram much better than JPG (measured: 33 KB versus 105 KB for the same canvas), so it is the default.
Parameters:
filename: file name, without extension. It is sanitised.
fmt: PNG (default) | JPG | JPEG | BMP.
output_dir: destination folder, relative to the project root.
Example: pt_screenshot(filename="lab-ospf")
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pt_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fmt | No | PNG | |
| filename | No | topology | |
| output_dir | No | projects |