Call netx REST from native netx__* tools.

Drop the local python -m netx_mcp / mcp-client path so terminal users only need API URL + token.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-04 23:38:24 +08:00
parent 5179eb74b1
commit ed219842d3
22 changed files with 1431 additions and 179 deletions

View file

@ -30,4 +30,4 @@ You are **Netx Ops**, a network operations specialist for ZTE UME / netx.
- `ops-netx-managed-ne-playbook` — managed / UME CLI batch
## Tools
`mcp__netx__*` only. Multi-NE CLI = one `execManagedNe` batch.
`netx__*` only. Multi-NE CLI = one `execManagedNe` batch.

View file

@ -1,5 +1,6 @@
# Netx Ops agent preset — UME alarms / NE inventory / managed CLI.
# Host keeps registries, sandbox, model route; this file owns persona, skills, netx MCP.
# Host keeps registries, sandbox, model route; this file owns persona + skills.
# netx__* tools are registered on the HOST by package `dsh-netxops`.
# ── identity ────────────────────────────────────────────────────────────────
@ -36,7 +37,7 @@
- Managed SSH/Telnet CLI → `ops-netx-managed-ne-playbook`
## Tools
Call netx MCP as `mcp__netx__*` (camelCase tool names). See skill bodies for decision trees.
Call netx as `netx__*` (camelCase tool names). See skill bodies for decision trees.
Batch multi-NE CLI in **one** `execManagedNe` call (`ne_ids` / `ume_ne_ids` / `targets`).
- id: agent-instructions
@ -63,7 +64,6 @@
- id: tool-skill
name: '@deepseek-ai/dsh-tool-skill'
# netx MCP is mounted on the HOST by package `dsh-netxops` (cordis.patch.yml).
# netx__* tools are mounted on the HOST by package `dsh-netxops` (cordis.patch.yml).
# The same package copies this preset into `$DSH_HOME/.agent-presets/netxops`
# on activate — no manual link-preset script for normal installs.
# Tools appear as mcp__netx__* on the host tool registry.

View file

@ -15,7 +15,7 @@ Differs from UME inventory (`ops-netx-ume-playbook`): this is **SSH/Telnet** (ZT
## Tool order
Use `mcp__netx__*`.
Use `netx__*`.
1. **Locate**
- `listManagedNe`: `keyword`, `connect_status=pass` (preferred)
@ -27,7 +27,7 @@ Use `mcp__netx__*`.
- **Multi-NE = batch-first (one tool call; server concurrency default 4, max 20)**:
- Same commands: `ne_ids` / `ume_ne_ids` + shared `commands`
- Different commands per NE: `targets=[{ume_ne_id|ne_id, commands:[…]}, …]`
- Many single-NE calls in one turn are **serial** on stdio — forbidden for multi-NE work
- Many single-NE calls in one turn are **serial** — forbidden for multi-NE work
- Per session: call `listCliTargets` at most once; merge shows into each target's `commands[]`
- Timeouts: raise `read_timeout_sec` (default 60; slow 90–120) or fewer commands — no blind retry

View file

@ -14,7 +14,7 @@ For any Netx Ops request about UME **alarms** or **NE inventory**, load this ski
## Tool names
Host tool names are `mcp__netx__<camelCase>` (`serverName=netx`):
Host tool names are `netx__<camelCase>`:
| Purpose | Tool |
|---------|------|