Skip to main content
Glama
Packet Tracer MCP — Node.js port

Packet Tracer MCP — Node.js port

pt_send_raw

Execute arbitrary JavaScript in Packet Tracer through the bridge, optionally waiting for results by calling reportResult() in your code. Use it to explore the IPC API or run custom commands.

Instructions

Send arbitrary JavaScript to Packet Tracer via bridge. Useful for exploring the IPC API or running custom commands.

If wait_result=True, reportResult() is auto-injected into scope. Just call reportResult(data) in your code — no need to define it. Examples: pt_send_raw("reportResult(getDevices('router'))", wait_result=True) pt_send_raw("addDevice('TestR','2911',500,300)")

Parameters:

  • js_code: JavaScript to execute in PT's Script Engine

  • wait_result: if True, waits for a response via reportResult()

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "js_code": "<js_code>"
    },
    "name": "pt_send_raw"
  }
}

Input Schema

NameRequiredDescriptionDefault
js_codeYes
wait_resultNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.0

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It usefully discloses that wait_result=True auto-injects reportResult() into scope and blocks for a response, which is genuine behavioral context. It omits error/timeout behavior, what happens if the bridge is unavailable, and what the call returns when wait_result is false.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, followed by the important injection caveat, examples, then a parameter summary. The trailing 'Parameters:' block partially repeats the wait_result explanation already given above, a minor redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema and no annotations, so the description should fully define the contract. It explains execution and blocking semantics but never states what a successful run returns (presumably the reported data), how failures surface, or that the bridge must be connected before calling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does: js_code is JavaScript executed in PT's Script Engine, and wait_result controls whether the call blocks via reportResult(). Two concrete examples show correct call shapes for both modes, adding meaning well beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: sending arbitrary JavaScript to Packet Tracer via the bridge. The word 'arbitrary' marks it as an escape hatch versus the purpose-built siblings (pt_cli, pt_add_device), though no sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Useful for exploring the IPC API or running custom commands' implies usage but gives no explicit when-to-use rules, no when-not-to-use (e.g., prefer pt_add_device or pt_cli for standard operations), and no prerequisites such as a live bridge connection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools