From 8a30509f4ecba8b42380c599ec5562c85f9e51ab Mon Sep 17 00:00:00 2001 From: tonytrg Date: Mon, 7 Jul 2025 17:03:35 +0200 Subject: [PATCH 1/6] remove reason param for get_me --- README.md | 2 +- pkg/github/context_tools.go | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index b281ad042..8ba842a46 100644 --- a/README.md +++ b/README.md @@ -550,7 +550,7 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description Context - **get_me** - Get my user profile - - `reason`: Optional: the reason for requesting the user information (string, optional) + - No parameters required diff --git a/pkg/github/context_tools.go b/pkg/github/context_tools.go index 3525277fe..006f10b3a 100644 --- a/pkg/github/context_tools.go +++ b/pkg/github/context_tools.go @@ -40,9 +40,6 @@ func GetMe(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Too Title: t("TOOL_GET_ME_USER_TITLE", "Get my user profile"), ReadOnlyHint: ToBoolPtr(true), }), - mcp.WithString("reason", - mcp.Description("Optional: the reason for requesting the user information"), - ), ) type args struct{} From f84a7ad79f924532f90665f2ae35af3595dc0509 Mon Sep 17 00:00:00 2001 From: tonytrg Date: Mon, 7 Jul 2025 17:05:43 +0200 Subject: [PATCH 2/6] updating toolsnap --- pkg/github/__toolsnaps__/get_me.snap | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkg/github/__toolsnaps__/get_me.snap b/pkg/github/__toolsnaps__/get_me.snap index fc098f9d1..57871e118 100644 --- a/pkg/github/__toolsnaps__/get_me.snap +++ b/pkg/github/__toolsnaps__/get_me.snap @@ -5,12 +5,7 @@ }, "description": "Get details of the authenticated GitHub user. Use this when a request includes \"me\", \"my\". The output will not change unless the user changes their profile, so only call this once.", "inputSchema": { - "properties": { - "reason": { - "description": "Optional: the reason for requesting the user information", - "type": "string" - } - }, + "properties": {}, "type": "object" }, "name": "get_me" From 0eb5c9a18ebaa6e868ffa684305023ede98b2f93 Mon Sep 17 00:00:00 2001 From: tonytrg Date: Mon, 7 Jul 2025 17:11:13 +0200 Subject: [PATCH 3/6] update contributing --- CONTRIBUTING.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 314e4e0b2..11e8d7ab9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,18 +14,21 @@ Please note that this project is released with a [Contributor Code of Conduct](C These are one time installations required to be able to test your changes locally as part of the pull request (PR) submission process. -1. install Go [through download](https://go.dev/doc/install) | [through Homebrew](https://formulae.brew.sh/formula/go) -1. [install golangci-lint v2](https://golangci-lint.run/welcome/install/#local-installation) +1. Install Go [through download](https://go.dev/doc/install) | [through Homebrew](https://formulae.brew.sh/formula/go) +2. [Install golangci-lint v2](https://golangci-lint.run/welcome/install/#local-installation) ## Submitting a pull request 1. [Fork][fork] and clone the repository -1. Make sure the tests pass on your machine: `go test -v ./...` -1. Make sure linter passes on your machine: `golangci-lint run` -1. Create a new branch: `git checkout -b my-branch-name` -1. Make your change, add tests, and make sure the tests and linter still pass -1. Push to your fork and [submit a pull request][pr] targeting the `main` branch -1. Pat yourself on the back and wait for your pull request to be reviewed and merged. +2. Make sure the tests pass on your machine: `go test -v ./...` +3. Make sure linter passes on your machine: `golangci-lint run` +4. Create a new branch: `git checkout -b my-branch-name` +5. Add your changes and tests, and make sure the Action workflows still pass +- Run linter: `script/lint` +- Update snapshots and run tests: `UPDATE_TOOLSNAPS=true go test ./...` +- Update readme documentation: `script/generate-docs` +6. Push to your fork and [submit a pull request][pr] targeting the `main` branch +7. Pat yourself on the back and wait for your pull request to be reviewed and merged. Here are a few things you can do that will increase the likelihood of your pull request being accepted: From 081efe809a11754ceeb26fdf527aab666f41d5f2 Mon Sep 17 00:00:00 2001 From: tonytrg Date: Mon, 7 Jul 2025 17:18:27 +0200 Subject: [PATCH 4/6] updating tool get_me --- pkg/github/__toolsnaps__/get_me.snap | 2 +- pkg/github/context_tools.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/github/__toolsnaps__/get_me.snap b/pkg/github/__toolsnaps__/get_me.snap index 57871e118..07edfe2cc 100644 --- a/pkg/github/__toolsnaps__/get_me.snap +++ b/pkg/github/__toolsnaps__/get_me.snap @@ -3,7 +3,7 @@ "title": "Get my user profile", "readOnlyHint": true }, - "description": "Get details of the authenticated GitHub user. Use this when a request includes \"me\", \"my\". The output will not change unless the user changes their profile, so only call this once.", + "description": "Get details of the authenticated GitHub user. Use this when a request is about the user's own profile for GitHub. Or when it is necessary to get information to build other tool calls.", "inputSchema": { "properties": {}, "type": "object" diff --git a/pkg/github/context_tools.go b/pkg/github/context_tools.go index 006f10b3a..5b6f74ec5 100644 --- a/pkg/github/context_tools.go +++ b/pkg/github/context_tools.go @@ -35,7 +35,7 @@ type UserDetails struct { // GetMe creates a tool to get details of the authenticated user. func GetMe(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) { tool := mcp.NewTool("get_me", - mcp.WithDescription(t("TOOL_GET_ME_DESCRIPTION", "Get details of the authenticated GitHub user. Use this when a request includes \"me\", \"my\". The output will not change unless the user changes their profile, so only call this once.")), + mcp.WithDescription(t("TOOL_GET_ME_DESCRIPTION", "Get details of the authenticated GitHub user. Use this when a request is about the user's own profile for GitHub. Or when it is necessary to get information to build other tool calls.")), mcp.WithToolAnnotation(mcp.ToolAnnotation{ Title: t("TOOL_GET_ME_USER_TITLE", "Get my user profile"), ReadOnlyHint: ToBoolPtr(true), From 9ead27ed8e249614b6bda6f4cc218662ce7a607b Mon Sep 17 00:00:00 2001 From: tonytrg Date: Mon, 7 Jul 2025 18:03:28 +0200 Subject: [PATCH 5/6] add small changes --- CONTRIBUTING.md | 6 +++--- pkg/github/context_tools.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 11e8d7ab9..b4012f0b2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,9 +24,9 @@ These are one time installations required to be able to test your changes locall 3. Make sure linter passes on your machine: `golangci-lint run` 4. Create a new branch: `git checkout -b my-branch-name` 5. Add your changes and tests, and make sure the Action workflows still pass -- Run linter: `script/lint` -- Update snapshots and run tests: `UPDATE_TOOLSNAPS=true go test ./...` -- Update readme documentation: `script/generate-docs` + - Run linter: `script/lint` + - Update snapshots and run tests: `UPDATE_TOOLSNAPS=true go test ./...` + - Update readme documentation: `script/generate-docs` 6. Push to your fork and [submit a pull request][pr] targeting the `main` branch 7. Pat yourself on the back and wait for your pull request to be reviewed and merged. diff --git a/pkg/github/context_tools.go b/pkg/github/context_tools.go index 5b6f74ec5..9817fea7b 100644 --- a/pkg/github/context_tools.go +++ b/pkg/github/context_tools.go @@ -35,7 +35,7 @@ type UserDetails struct { // GetMe creates a tool to get details of the authenticated user. func GetMe(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) { tool := mcp.NewTool("get_me", - mcp.WithDescription(t("TOOL_GET_ME_DESCRIPTION", "Get details of the authenticated GitHub user. Use this when a request is about the user's own profile for GitHub. Or when it is necessary to get information to build other tool calls.")), + mcp.WithDescription(t("TOOL_GET_ME_DESCRIPTION", "Get details of the authenticated GitHub user. Use this when a request is about the user's own profile for GitHub. Or when information is missing to build other tool calls.")), mcp.WithToolAnnotation(mcp.ToolAnnotation{ Title: t("TOOL_GET_ME_USER_TITLE", "Get my user profile"), ReadOnlyHint: ToBoolPtr(true), From eafa0f5499958cbb03732832504444b0609337c0 Mon Sep 17 00:00:00 2001 From: tonytrg Date: Mon, 7 Jul 2025 18:04:18 +0200 Subject: [PATCH 6/6] update snapshots --- pkg/github/__toolsnaps__/get_me.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/github/__toolsnaps__/get_me.snap b/pkg/github/__toolsnaps__/get_me.snap index 07edfe2cc..13b061741 100644 --- a/pkg/github/__toolsnaps__/get_me.snap +++ b/pkg/github/__toolsnaps__/get_me.snap @@ -3,7 +3,7 @@ "title": "Get my user profile", "readOnlyHint": true }, - "description": "Get details of the authenticated GitHub user. Use this when a request is about the user's own profile for GitHub. Or when it is necessary to get information to build other tool calls.", + "description": "Get details of the authenticated GitHub user. Use this when a request is about the user's own profile for GitHub. Or when information is missing to build other tool calls.", "inputSchema": { "properties": {}, "type": "object"