Add list_user_events for recent GitHub activity by kaii9 · Pull Request #3491 · github/github-mcp-server · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
32 changes: 32 additions & 0 deletions pkg/github/__toolsnaps__/list_user_events.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"annotations": {
"idempotentHint": false,
"readOnlyHint": true,
"title": "List user activity"
},
"description": "List recent GitHub activity performed by a user, such as pushes, pull requests, issues, and stars. GitHub returns public events for other users and may include private events when querying the authenticated user's own activity, subject to token permissions. Returns event metadata, visibility, and event-specific payloads. GitHub limits the feed to up to 300 events from the past 30 days; events may be delayed from 30 seconds to 6 hours. This is not a complete or real-time contribution history.",
"inputSchema": {
"properties": {
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "integer"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"username": {
"description": "GitHub username whose activity to list",
"type": "string"
}
},
"required": [
"username"
],
"type": "object"
},
"name": "list_user_events"
}
45 changes: 45 additions & 0 deletions pkg/github/__toolsnaps__/list_user_events_output.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"inputSchema": null,
"name": "list_user_events",
"outputSchema": {
"items": {
"additionalProperties": false,
"properties": {
"actor": {
"type": "string"
},
"created_at": {
"type": [
"null",
"string"
]
},
"id": {
"type": "string"
},
"payload": true,
"public": {
"type": [
"null",
"boolean"
]
},
"repo": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"id",
"type"
],
"type": "object"
},
"type": [
"null",
"array"
]
}
}
1 change: 1 addition & 0 deletions pkg/github/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ func AllTools(t translations.TranslationHelperFunc, opts ...ToolOption) []invent

// User tools
SearchUsers(t),
ListUserEvents(t),

// Organization tools
SearchOrgs(t),
Expand Down
150 changes: 150 additions & 0 deletions pkg/github/users.go
Loading