Skip to content

Commit e5a5312

Browse files
Merge branch 'github:main' into building
2 parents 882e71a + 82c4930 commit e5a5312

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pkg/github/__toolsnaps__/get_me.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
},
66
"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.",
77
"inputSchema": {
8-
"type": "object"
8+
"type": "object",
9+
"properties": {}
910
},
1011
"name": "get_me"
1112
}

pkg/github/context_tools.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package github
22

33
import (
44
"context"
5+
"encoding/json"
56
"time"
67

78
ghErrors "github.com/github/github-mcp-server/pkg/errors"
@@ -43,9 +44,9 @@ func GetMe(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Too
4344
Title: t("TOOL_GET_ME_USER_TITLE", "Get my user profile"),
4445
ReadOnlyHint: true,
4546
},
46-
InputSchema: &jsonschema.Schema{
47-
Type: "object",
48-
},
47+
// Use json.RawMessage to ensure "properties" is included even when empty.
48+
// OpenAI strict mode requires the properties field to be present.
49+
InputSchema: json.RawMessage(`{"type":"object","properties":{}}`),
4950
},
5051
mcp.ToolHandlerFor[map[string]any, any](func(ctx context.Context, _ *mcp.CallToolRequest, _ map[string]any) (*mcp.CallToolResult, any, error) {
5152
client, err := getClient(ctx)

0 commit comments

Comments
 (0)