Skip to main content
Glama

Start Proxy

start_proxy

Start a transparent proxy to forward host-PLC traffic and record bidirectional frames. Capture live frames without Wireshark by redirecting the host target to the proxy, then parse and diagnose.

Instructions

起透明代理: 上位机 → 代理 → 真实 PLC, 透传同时按协议分帧录制双向帧。

现场联调时把上位机目标地址改成本代理, 无需 Wireshark 即可拿到全部 交互帧 (get_proxy_frames), 再喂 parse_frame/diagnose 做在线分析。 protocol 当前支持 modbus/fins/melsec (S7 TPKT 分帧暂不支持); listen_port=0 由系统分配。代理是诊断设施: 只透传与录制, 不改写帧。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
protocolYes
listen_hostNo127.0.0.1
listen_portNo
target_hostYes
target_portYes
idle_timeout_secNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hintYes
statusYes
targetYes
protocolYes
recordedYes
listen_portYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.6.1
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +false
    • addedOutput schema / description
      Added value: +"start_proxy 输出。"
    • addedOutput schema / properties
      Added value: +{
      +  "hint": {
      +    "type": "string"
      +  },
      +  "listen_port": {
      +    "type": "integer"
      +  },
      +  "protocol": {
      +    "type": "string"
      +  },
      +  "recorded": {
      +    "type": "integer"
      +  },
      +  "status": {
      +    "type": "string"
      +  },
      +  "target": {
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "status",
      +  "protocol",
      +  "listen_port",
      +  "target",
      +  "recorded",
      +  "hint"
      +]
  2. First observedv0.4.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=false, destructiveHint=false, and idempotentHint=false, so the description doesn't need to restate those. It adds valuable behavioral context: the proxy is a diagnostic facility that only forwards and records frames, never rewrites them; listen_port=0 means the system assigns a port; and protocol support is limited to modbus/fins/melsec. This goes beyond the annotations and helps the agent understand side effects and constraints.

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 is compact and front-loaded: the first sentence states the core function, the second gives the use case and workflow, and the third covers constraints and special values. Every sentence earns its place, and the structure makes it easy for an agent to quickly understand what the tool does and when to use it.

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?

Given the tool's complexity (6 params, no schema descriptions, output schema present), the description covers the essential context: purpose, use case, protocol limitations, and the diagnostic-only guarantee. It doesn't explain idle_timeout_sec or the output schema, but the output schema exists and the parameter names are reasonably self-explanatory. The description is complete enough for an agent to select and invoke the tool correctly in most cases.

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 description coverage is 0%, so the description must compensate. It explains the meaning of protocol (supported values: modbus/fins/melsec), listen_port=0 (system-assigned), and the overall role of target_host/target_port (the real PLC address). It doesn't explain idle_timeout_sec or listen_host, but the parameter names are fairly self-explanatory and the description covers the most critical semantics.

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 ('起透明代理'), the resource (上位机 → 代理 → 真实 PLC), and the core behavior (透传同时按协议分帧录制双向帧). It clearly distinguishes this from sibling tools like start_listener and get_proxy_frames by explaining the transparent proxy role and recording function.

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

Usage Guidelines5/5

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

The description explicitly tells when to use this tool: during on-site debugging, point the upper computer at this proxy instead of the real PLC, and you can capture all interaction frames without Wireshark. It also names the workflow: use get_proxy_frames to retrieve frames, then feed them to parse_frame/diagnose. It even states a limitation (S7 TPKT framing not supported), which helps the agent decide when not to use it.

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