mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 20:40:13 +03:00
docs: improve MCP link tools filter parameter descriptions
Updated the filters parameter description in create_link and update_link MCP tools to specify the required array format and provide examples. Changes: - Updated create_link filters description with array format requirements - Updated update_link filters description with array format and example - Added specific filter types: frequency_drop, packet_loss, delay, corrupt, bpf This helps users understand the correct format: - frequency_drop: [N] (drop every Nth packet) - packet_loss: [rate] (packet loss percentage) - delay: [ms, jitter] (latency and jitter in milliseconds) - corrupt: [rate] (packet corruption percentage) - bpf: [expression] (Berkeley Packet Filter) Prevents TypeError: 'int' object is not iterable errors.
This commit is contained in:
parent
3ba11c8bff
commit
eac6c9f17d
@ -153,7 +153,10 @@ LINK_TOOLS = [
|
||||
},
|
||||
},
|
||||
"link_type": {"type": "string", "description": "Link type: ethernet or serial (optional)"},
|
||||
"filters": {"type": "object", "description": "Packet filters (optional)"},
|
||||
"filters": {
|
||||
"type": "object",
|
||||
"description": "Packet filters (optional). Must use array format: frequency_drop: [N], packet_loss: [rate], delay: [ms, jitter], corrupt: [rate], bpf: [expression]"
|
||||
},
|
||||
},
|
||||
"required": ["project_id", "nodes"],
|
||||
},
|
||||
@ -181,7 +184,10 @@ LINK_TOOLS = [
|
||||
"project_id": {"type": "string", "description": "Project UUID"},
|
||||
"link_id": {"type": "string", "description": "Link UUID"},
|
||||
"suspend": {"type": "boolean", "description": "Suspend the link (optional)"},
|
||||
"filters": {"type": "object", "description": "Packet filters (optional)"},
|
||||
"filters": {
|
||||
"type": "object",
|
||||
"description": "Packet filters (optional). Must use array format: frequency_drop: [N], packet_loss: [rate], delay: [ms, jitter], corrupt: [rate], bpf: [expression]. Example: {\"frequency_drop\": [10], \"packet_loss\": [5]}"
|
||||
},
|
||||
},
|
||||
"required": ["project_id", "link_id"],
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user