Skip to main content
Glama

topo_add_devices

Add devices to a Huawei eNSP topology file, specifying model, name, count, position, and settings with automatic console port assignment.

Instructions

往拓扑里批量加设备。

Args: path: .topo 文件路径。 devices: 设备列表,每项支持这些字段:

    - model(必填):型号,见 list_models。
    - name:设备名,省略则按 eNSP 习惯自动编号(S5700 叫 LSW1、
      AR2220 叫 AR1,重名自动往后排)。
    - count:一次加几台,默认 1;配合省略 name 可以批量生成。
    - x / y:画布坐标,省略则先堆在原点,之后跑 topo_layout 自动摆开。
    - settings:终端类设备的初始参数,PC/Server 可填
      {"ip": "...", "mask": "...", "gateway": "..."},
      AP 可填 {"mac": "...", "sn": "..."}。具体字段见
      list_models 返回的 settingsFields。

举例:[{"model": "S5700", "name": "Core", "count": 2},
      {"model": "PC", "settings": {"ip": "192.168.1.10"}}]

console 端口会自动从 2000 起顺序分配,不会和已有设备冲突。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
devicesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations present, the description carries the transparency burden and does reveal important side effects: it adds devices batch-wise and auto-assigns console ports without conflicts. It does not mention failure modes, whether the topology file is modified/overwritten, idempotency, or what happens on invalid model/settings, so some behavioral aspects remain opaque.

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 description uses a clean Args list, bullet sub-fields, an example block, and a one-line port note. It is compact, scannable, and free of redundant filler, making it easy for an agent to extract the necessary information quickly.

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?

The description is largely self-contained: it defines all device fields, references list_models for model details, and mentions topo_layout for coordinate placement. It does not state what the function returns or explicitly reference sibling add/remove tools, but the included examples and port behavior make it sufficient for common use.

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

Parameters5/5

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

Although the JSON schema only has bare path and devices fields, the description fully documents the meaningful sub-fields (model, name, count, x/y, settings), marks model as required, gives defaults for name/count, and provides concrete examples. This goes well beyond the schema and removes ambiguity about the devices array's structure.

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 opens with a specific verb and object: '批量加设备' (batch add devices) to a topology, and the parameter examples clarify the operation. It clearly distinguishes from siblings like topo_layout and list_models by focusing on the add action, so an agent can identify the tool's purpose without opening the schema.

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 description provides practical examples and a useful note about console-port auto-allocation from 2000 without conflicts. However, it never explicitly states when to prefer this tool over siblings such as topo_create or topo_remove, leaving some selection guidance implicit.

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