Skip to content

improve: add depth param#68

Merged
cavramoniu-ionos merged 17 commits into
mainfrom
improve/add-depth-param
Jun 17, 2026
Merged

improve: add depth param#68
cavramoniu-ionos merged 17 commits into
mainfrom
improve/add-depth-param

Conversation

@cavramoniu-ionos

Copy link
Copy Markdown
Contributor

Summary

  • Added depth optional parameter to cloudapi-v6 tools (compute and k8s)
  • Updated docs for all affected tools

@cavramoniu-ionos cavramoniu-ionos changed the base branch from main to feat/dynamic-mode June 16, 2026 11:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an optional depth parameter to CloudAPI v6 MCP tools (Compute + Managed Kubernetes) so callers can control the nesting depth of returned objects, and updates routing tests/docs to reflect the new query parameter behavior.

Changes:

  • Added Depth *int32 to relevant tool input structs (and introduced new List*Input types for list tools that previously used struct{}).
  • Updated Compute + K8s tool handlers to pass depth through to the SDK request builders (defaulting list operations to depth=1).
  • Updated endpoint routing tests to assert depth=1 is sent for list operations; updated multiple docs pages (with some remaining gaps noted in PR comments).

Reviewed changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
tools/k8s/nodepool.go Adds depth support to list/get nodepool calls.
tools/k8s/node.go Adds depth support to list/get node calls.
tools/k8s/cluster.go Adds depth support to list/get cluster calls (list defaults to 1).
tools/inputs.go Extends input schemas with optional depth and introduces new List*Input structs.
tools/compute/volume.go Adds depth support to list/get volume calls (list defaults to 1).
tools/compute/template.go Adds depth support to list/get template calls (list defaults to 1).
tools/compute/target_group.go Adds depth support to list/get target group calls (list defaults to 1).
tools/compute/snapshot.go Adds depth support to list/get snapshot calls (list defaults to 1).
tools/compute/server.go Adds depth support to server + server-subresource tools (lists default to 1).
tools/compute/security_group.go Adds depth support to security group + rules tools (lists default to 1).
tools/compute/request.go Adds depth support to request tools (list defaults to 1).
tools/compute/private_cross_connect.go Adds depth support to PCC tools (list defaults to 1).
tools/compute/nic.go Adds depth support to NIC tools (list defaults to 1).
tools/compute/network_loadbalancer.go Adds depth support to NLB + forwarding rules tools (lists default to 1).
tools/compute/nat_gateway.go Adds depth support to NAT gateway + rules tools (lists default to 1).
tools/compute/location.go Adds depth support to location listing (defaults to 1).
tools/compute/loadbalancer.go Adds depth support to LB + balanced NICs tools (lists default to 1).
tools/compute/lan.go Adds depth support to LAN + LAN NICs tools (lists default to 1).
tools/compute/ip_block.go Adds depth support to IP block tools (list defaults to 1).
tools/compute/image.go Adds depth support to image listing (defaults to 1).
tools/compute/firewall_rule.go Adds depth support to firewall rule tools (list defaults to 1).
tools/compute/datacenter.go Adds depth support to datacenter tools (list defaults to 1) and updates tool description.
tools/compute/contract.go Adds optional depth support to get_contract.
tools/compute/application_loadbalancer.go Adds depth support to ALB + forwarding rules tools (lists default to 1).
test/k8s_test.go Asserts depth=1 query param for affected K8s list tools.
test/compute_test.go Asserts depth=1 query param for affected Compute list tools.
docs/k8s/nodepool.md Documents depth for list_k8s_nodepools.
docs/k8s/node.md Documents depth for node list/get tools.
docs/k8s/cluster.md Documents depth for list_k8s_clusters.
docs/compute/volume.md Documents depth for volume list/get tools.
docs/compute/template.md Documents depth for get_template.
docs/compute/target-group.md Documents depth for get_target_group.
docs/compute/snapshot.md Documents depth for snapshot list/get tools.
docs/compute/server.md Documents depth for list_servers.
docs/compute/server-subresources.md Documents depth for get_server_gpu and get_server_remote_console.
docs/compute/security-group.md Documents depth for list_security_groups and get_security_group_rule.
docs/compute/request.md Documents depth for get_request and get_request_status.
docs/compute/private-cross-connect.md Documents depth for get_private_cross_connect.
docs/compute/nic.md Documents depth for list_nics.
docs/compute/network-loadbalancer.md Documents depth for list_network_loadbalancers.
docs/compute/nat-gateway.md Documents depth for list_nat_gateways.
docs/compute/location.md Documents depth for list_locations.
docs/compute/loadbalancer.md Documents depth for list_loadbalancers.
docs/compute/lan.md Documents depth for list_lans.
docs/compute/ip-block.md Documents depth for get_ip_block.
docs/compute/image.md Documents depth for list_images.
docs/compute/firewall-rule.md Documents depth for firewall rule list/get tools.
docs/compute/datacenter.md Documents depth for list_datacenters.
docs/compute/contract.md Documents depth for get_contract.
docs/compute/application-loadbalancer.md Documents depth for list_application_loadbalancers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/inputs.go Outdated
Comment thread docs/compute/datacenter.md
Comment thread docs/compute/server.md
Comment thread docs/compute/nic.md
Comment thread docs/compute/lan.md
Comment thread docs/compute/template.md
Comment thread docs/compute/security-group.md
Comment thread docs/compute/server-subresources.md
Comment thread docs/k8s/cluster.md
Comment thread docs/k8s/nodepool.md
Base automatically changed from feat/dynamic-mode to main June 16, 2026 12:31
@cavramoniu-ionos cavramoniu-ionos requested a review from Copilot June 16, 2026 12:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 66 out of 66 changed files in this pull request and generated 3 comments.

Comment thread docs/compute/security-group.md Outdated
Comment thread tools/dynamic/catalog.go
Comment thread main.go

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 51 out of 51 changed files in this pull request and generated 10 comments.

Comment thread docs/compute/server-subresources.md
Comment thread docs/compute/server-subresources.md
Comment thread docs/compute/server-subresources.md
Comment thread docs/compute/security-group.md
Comment thread tools/compute/datacenter.go
Comment thread docs/compute/template.md
Comment thread docs/compute/target-group.md
Comment thread docs/compute/request.md
Comment thread docs/compute/private-cross-connect.md
Comment thread docs/compute/ip-block.md

@avirtopeanu-ionos avirtopeanu-ionos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, can you also add to the CHANGELOG.md ?

@cavramoniu-ionos cavramoniu-ionos merged commit 7d15995 into main Jun 17, 2026
3 checks passed
@cavramoniu-ionos cavramoniu-ionos deleted the improve/add-depth-param branch June 17, 2026 09:07
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.

3 participants