Skip to content

Fix/restructure#118

Merged
gautambaghel merged 7 commits intomainfrom
fix/restructure
Jul 31, 2025
Merged

Fix/restructure#118
gautambaghel merged 7 commits intomainfrom
fix/restructure

Conversation

@gautambaghel
Copy link
Member

@gautambaghel gautambaghel commented Jul 25, 2025

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@gautambaghel gautambaghel requested a review from a team as a code owner July 25, 2025 18:10
@hashneo
Copy link

hashneo commented Jul 25, 2025

Any reason why you are keeping camel case for the tool names? Would't it be good to make the move to snake case?

@gautambaghel
Copy link
Member Author

@hashneo - good point, maybe this restruct is good time to switch over. I've observed that when you change the tool names some AI hosts (copilot, claude, cursor) fumble and sometimes even errors out.

however, if you restart them once or twice they're fine.

maybe we need to let people know somehow

hashneo
hashneo previously approved these changes Jul 26, 2025
Copy link

@hashneo hashneo left a comment

Choose a reason for hiding this comment

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

Nit: Some of the tools still have options on 1 line (resolve_provider_doc_id.go for example) which makes it a little difficult to read but overall nothing jumps out to me as problematic.

@gautambaghel
Copy link
Member Author

@hashneo - took your suggestion, will need an approval again :)

@gautambaghel gautambaghel requested a review from hashneo July 28, 2025 03:27
@hashneo
Copy link

hashneo commented Jul 28, 2025

LGTM!

Copy link
Contributor

Copilot AI left a comment

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 implements a comprehensive restructuring of the Terraform MCP Server codebase to improve maintainability and organization. The primary purpose is to refactor the existing code structure by separating concerns into dedicated packages and updating API parameter naming conventions for consistency.

  • Reorganizes code into specialized packages (pkg/utils, pkg/client, pkg/tools, pkg/resources)
  • Updates API parameter names to use snake_case convention (e.g., providerNameprovider_name)
  • Moves common functionality to shared utility and client packages

Reviewed Changes

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

Show a summary per file
File Description
pkg/utils/utils.go New utility package with common functions extracted from tfregistry
pkg/client/registry.go New client package for registry API communication
pkg/tools/*.go Tool implementations moved from tfregistry to dedicated tools package
pkg/resources/*.go Resource handling moved to dedicated resources package
e2e/payloads.go Updates test payloads to use new snake_case parameter names

@gautambaghel gautambaghel merged commit dc429e3 into main Jul 31, 2025
31 checks passed
@gautambaghel gautambaghel deleted the fix/restructure branch July 31, 2025 05:48
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.

2 participants