Skip to main content
Glama

generateCodeSnippet

Turns natural language network build instructions into executable PTBuilder JavaScript code. Use your desired Cisco Packet Tracer topology, get runnable code.

Instructions

Use AI (Gemini) to generate PTBuilder JavaScript code from a natural language description. Returns executable JavaScript code that can be run in the PTBuilder code editor. Requires GEMINI_API_KEY environment variable or ~/.cisco-pt-mcp/config.json with gemini_api_key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYesNatural language description of what to build. Example: 'Create 5 switches in a line and connect them sequentially'
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses that the tool calls an external AI model, requires credentials (GEMINI_API_KEY or a config file), and returns executable JavaScript code without claiming to execute it. It does not discuss failure modes or cost, but it does convey side effects and prerequisites.

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

Conciseness5/5

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

The definition is a single compact sentence plus a key prerequisite. The most important purpose is front-loaded, and every clause adds useful information: AI mechanism, output, and required credentials. There is no filler.

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

Completeness5/5

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

Given the single required parameter, the complete schema coverage, and the absence of annotations, the description includes all essential call-time information: input, output, tool purpose, and the credential requirement. An agent can successfully invoke this tool without needing additional context.

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?

The schema already fully documents the single 'description' parameter with an example and 100% coverage. The tool description adds a high-level mention of natural language input, but it mainly mirrors what the schema already provides. This is adequate but does not significantly go beyond structured data.

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

Purpose5/5

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

The description states a specific verb ('generate'), the resource type ('PTBuilder JavaScript code'), and the source ('a natural language description'). It also names the AI mechanism (Gemini), which distinguishes this code-generation tool from the network-mutation siblings.

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

Usage Guidelines4/5

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

The description clearly indicates the tool is for turning a natural language description into PTBuilder JavaScript code, which implies the core use case. It does not explicitly name alternatives like generateNetworkFromDescription or executeBuilderCode, so it lacks explicit exclusions and alternative routing.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/2001sithum/cisco-pt-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server