Skip to main content
Glama

Generate PTBuilder script

generate_script
Read-only

Create a PTBuilder script for a Cisco Packet Tracer topology after validating device and link configuration, ready to paste into Builder Code Editor and run; validation errors block output unless forced.

Instructions

Generate the PTBuilder JavaScript for the current topology. Tell the user to open a new, empty Packet Tracer workspace (File > New), open Extensions > Builder Code Editor, paste the script and click Run. Runs validation first: errors block generation unless force: true. The script is the first text block; warnings, if any, are a second text block.

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": "generate_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoGenerate even if validation reports errors.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only cover readOnlyHint and openWorldHint, and the description adds real behavior beyond them: validation runs first, errors block generation unless force is set, and the response is ordered with the script as the first text block and warnings second. It stops short of describing what validation checks or whether generation has side effects on the stored topology.

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?

Four sentences, front-loaded with the purpose, then the user-facing procedure, then the force/validation rule, then the output layout. No filler; the imperative 'Tell the user to open...' earns its place because it governs agent behavior after the call.

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

Completeness4/5

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

For a zero-required-parameter tool with no output schema, the definition covers purpose, blocking behavior, and the shape of the returned text blocks. Missing only prerequisites — e.g., that a topology must exist or be loaded first, which matters given build_topology and load_topology siblings.

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

Parameters3/5

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

Schema coverage is 100% and the single parameter's description already states 'Generate even if validation reports errors.' The description restates that behavior ('errors block generation unless force: true') with marginal added framing, so baseline 3 applies.

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 — 'Generate the PTBuilder JavaScript for the current topology' — which clearly identifies the artifact produced and its scope. It does not differentiate itself from a plausible sibling like export_script, so an agent must infer the boundary from sibling names alone.

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?

The post-run workflow (open empty workspace, paste in Builder Code Editor, Run) makes the intended context clear, but there is no explicit when-to-use vs. when-not guidance and no comparison to export_script or build_topology. Usage is implied by the surrounding procedure rather than stated.

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