Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: get_file_contents use "/" for root#666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
LuluBeatson merged 5 commits intomainfromlulu/empty-path
Jul 11, 2025
Merged

Conversation

LuluBeatson
Copy link
Contributor

@LuluBeatsonLuluBeatson commentedJul 11, 2025
edited
Loading

Problem: To get root directory, agent was callingget_file_contents with path"" which is not allowed for a required param.

Fix: Changedpath to an optional and set a default of"/" (root)

Screenshot

Tested with: Sonnet-3.5, Sonnet-4, GPT-o4-mini, GPT-4o

get the contents of the github/github-mcp-server repo

Check the tool is called with path="/"

image

@LuluBeatsonLuluBeatson marked this pull request as ready for reviewJuly 11, 2025 13:41
@CopilotCopilotAI review requested due to automatic review settingsJuly 11, 2025 13:41
@LuluBeatsonLuluBeatson requested a review froma team as acode ownerJuly 11, 2025 13:41
Copy link
Contributor

@CopilotCopilotAI 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 fixes an issue with theget_file_contents function where agents couldn't access the root directory due to unclear parameter documentation. The fix clarifies that root directory access requires using "/" as the path parameter.

  • Updated parameter description to explicitly mention root directory handling
  • Ensured consistency across code documentation and README
  • Fixed agent confusion about empty string vs "/" for root directory access

Reviewed Changes

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

FileDescription
pkg/github/repositories.goUpdated path parameter description to clarify root directory usage
pkg/github/toolsnaps/get_file_contents.snapUpdated test snapshot to reflect new parameter description
README.mdUpdated documentation to match the corrected parameter description

@LuluBeatson
Copy link
ContributorAuthor

Thank you@tonytrg. I've decided to go your suggestion of making the path optional with "/" default - I think this most reliable

Copy link
Contributor

@tonytrgtonytrg left a comment

Choose a reason for hiding this comment

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

❤️

@LuluBeatsonLuluBeatson merged commitd15026b intomainJul 11, 2025
16 checks passed
@LuluBeatsonLuluBeatson deleted the lulu/empty-path branchJuly 11, 2025 17:07
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@tonytrgtonytrgtonytrg approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@LuluBeatson@tonytrg

[8]ページ先頭

©2009-2025 Movatter.jp