feat: admin tools gating and full API coverage (119 tools)#13
Merged
Conversation
Three-tier tool visibility model: - MCP_READ_ONLY=true (default): 91 read-only tools - MCP_READ_ONLY=false: + 16 write tools (107 total) - MCP_ADMIN_TOOLS=true: + 12 admin tools (119 total) New regular read tools: - Nova: list_instance_actions, list_server_groups, list_volume_attachments - Neutron: list_trunks, list_network_ip_availabilities, list_bgpvpn_interconnections - Cinder: list_backups, list_transfers - Octavia: list_l7rules - Designate: list_zone_transfer_requests, list_zone_transfer_accepts - Glance: list_image_members - Barbican: list_containers, get_container, list_orders - Manila: list_snapshots, list_security_services, list_share_types - Ironic: list_portgroups New write tools: - Neutron: create_floating_ip, delete_floating_ip New admin tools (gated by MCP_ADMIN_TOOLS=true): - Nova: list_hypervisors, get_hypervisor, list_services, list_aggregates - Neutron: list_agents - Cinder: list_services - Octavia: list_amphorae - Glance: list_tasks - Ironic: list_chassis, node_power_state (admin + write) - Keystone: list_role_assignments, list_groups Admin tool descriptions prefixed with [Admin] for LLM awareness. Adds sapcc/gophercloud-sapcc/v2 dependency for BGP VPN interconnections.
Security: - Remove zone transfer request key from response (credential isolation) - Add ValidatePathSegment to hypervisor_id parameter - Use SafeQueryParams for ironic portgroups URL construction Consistency: - Standardize on make([]map[string]any, 0) for empty JSON arrays - Hoist client-side filters above EachPage callbacks - Fix Register comments (barbican/manila admin param is unused) - Use _ for unused admin param in designate Register Test coverage: - Add TestAllModulesRegisterWithAdmin for admin=true path Documentation: - Add comments explaining raw HTTP usage for ironic portgroups/chassis - Add comment explaining client-side type filtering in barbican
- Combine consecutive bool params: (readOnly bool, admin bool) → (readOnly, admin bool) - Fix trailing whitespace in designate.go (gofmt) - Replace fmt.Sprintf with string concatenation for simple case (perfsprint)
Merging this branch changes the coverage (3 decrease, 7 increase)
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
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
MCP_READ_ONLY(default read-only) → writes →MCP_ADMIN_TOOLS(admin)MCP_ADMIN_TOOLS=trueand are prefixed with[Admin]in descriptionssapcc/gophercloud-sapcc/v2dependency for BGP VPN interconnectionsNew tools by category
Regular read (19 new): instance_actions, server_groups, volume_attachments, trunks, network_ip_availabilities, bgpvpn_interconnections, backups, transfers, l7rules, zone_transfer_requests, zone_transfer_accepts, image_members, containers, get_container, orders, snapshots, security_services, share_types, portgroups
Write (2 new): create_floating_ip, delete_floating_ip
Admin read (11 new): hypervisors, get_hypervisor, services (nova), aggregates, agents, services (cinder), amphorae, tasks, chassis, role_assignments, groups
Admin write (1 new): node_power_state (requires both admin AND write mode)
Security
Test plan
go build ./...passesgo test ./...passes (including new admin registration test)go vet ./...clean