Skip to content

fix: name username in the description of every tool that takes it - #49

Merged
krisiasty merged 1 commit into
mainfrom
fix/username-in-tool-descriptions
Nov 16, 2026
Merged

krisiasty merged 1 commit into
mainfrom
fix/username-in-tool-descriptions

Conversation

@krisiasty

Copy link
Copy Markdown
Owner

Summary

mcpproxy (v0.73.0) flags username on every tool that takes it with capability.mismatch:

Input parameter "username" reads as a free-form data sink and is never explained in the description — a likely exfiltration channel.

The check treats a free-text parameter as a data sink when its own description contains a "harvest" phrase, such as "environment variable", and the tool description neither names the parameter nor mentions that phrase's noun. Our username description ends "falls back to the DEVICE_USERNAME environment variable", and no tool description named username.

This adds a shared usernameGuidance sentence to the eight tool descriptions that take username: get_config, run_show_command, run_ping, run_traceroute, fortigate_list_vdoms, get_logs, list_log_units and detect_platform:

username is the SSH login name; if omitted, the DEVICE_USERNAME environment variable is used.

The tool description now explains the parameter, which is what the check asks for. trust_host_key takes no username and is unchanged.

After upgrading, mcpproxy will see changed descriptions on these eight tools and may ask for them to be approved again.

Test plan

  • Listed the tools from the built binary over MCP and applied the v0.73.0 data-sink logic, ported to a script: main flags username on 8 of 9 tools; this branch flags none, and no description has a double space where the sentences join
  • go test ./...
  • golangci-lint run ./...: 0 issues

🤖 Generated with Claude Code

mcpproxy's capability.mismatch check flagged username on every tool
that takes it as "a free-form data sink never explained in the
description": the parameter's own description mentions an environment
variable (its DEVICE_USERNAME fallback) and the tool description never
named the parameter. Append a shared usernameGuidance sentence to the
eight tool descriptions, saying what username is and that it falls
back to DEVICE_USERNAME.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@krisiasty
krisiasty merged commit 43ee096 into main Nov 16, 2026
4 checks passed
@krisiasty
krisiasty deleted the fix/username-in-tool-descriptions branch November 16, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant