feat(network): add ip route tool#263
Open
Albe83 wants to merge 30 commits intorhel-lightspeed:mainfrom
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
89d5846 to
74b8fb0
Compare
Rather than passing None and letting FastMCP apply default, explicitly set default valuse and pass those to FastMCP.
All transport types accetp a log_level parameter.
Remove cli_exit_on_error parameter since that does something different and is
not related to fixing the issue of pytest args getting picked up by Pydantic
Settings and causing tests to not run.
Use an expression to set the value of cli_ignore_unknown_args seems reasonable.
It may be an issue if someone has the string “pytest” in the executable path:
/home/pytest/.venv/bin/linux-mcp-server
That might be an edge case we don’t need to worry about at this point.
fix(containerfile): align wheelhouse source path with hatch package l…
Feat/dnf tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new read-only MCP tool to fetch routing tables via
ip route(IPv4/IPv6), with unit tests and documentation updates. Also adjusts a storage test to avoid false negatives when running as root.Motivation
Routing tables are a core diagnostic for network issues. Today the server exposes interfaces, connections, and listening ports but no route visibility. This tool completes the basic network triage set without introducing any write capability.
Changes
get_ip_route_tablefamily=ipv4|ipv6|all(default:ipv4)ip route showcommands incommands.py@log_tool_call,@disallow_local_execution_in_containers,readOnlyHint=Trueip_routegroup withipv4andipv6allaggregation, partial failure (one family fails), command failure/empty output, and error propagationgeteuid()==0to prevent false failures in root environmentsSecurity / Read-only
commands.pyTesting
make verifyNotes for Reviewer
family=allpath runs both commands and returns a combined output, with per-family error messages if one fails.