Skip to main content
Glama

github_activity

Retrieve recent GitHub activity including commits, issues, pull requests, and releases to track development progress and contributions.

Instructions

Get Duyet's recent GitHub activity including commits, issues, pull requests, releases, and other public events

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of recent activities to retrieve (1-20, default: 5)
include_detailsNoInclude detailed information like commit messages and issue titles

Implementation Reference

  • The handler function for the 'github_activity' tool. It fetches the GitHub activity data using getGitHubActivityData, formats it, and returns it as text content. Handles errors gracefully.
    async ({ limit = 5, include_details = false }) => { try { const data = await getGitHubActivityData(limit, include_details); const formattedContent = formatGitHubActivityForDisplay(data); return { content: [ { type: "text", text: formattedContent, }, ], }; } catch (error) { console.error("GitHub API error:", error); const errorMessage = error instanceof Error ? error.message : "Unknown error"; const errorContent = `Error fetching GitHub activity: ${errorMessage} GitHub Profile: https://github.com/duyet`; return { content: [ { type: "text", text: errorContent, }, ], }; } }, );
  • Zod-based input schema definition for the tool parameters: limit (1-20, default 5) and include_details (boolean, default false).
    inputSchema: { limit: limitSchema.describe( "Number of recent activities to retrieve (1-20, default: 5)", ), include_details: includeDetailsSchema.describe( "Include detailed information like commit messages and issue titles", ), },
  • Top-level registration call that invokes the tool registration during server initialization.
    registerGitHubActivityTool(server);
  • The registerGitHubActivityTool function that calls server.registerTool('github_activity', ...) including title, description, schema, and handler.
    export function registerGitHubActivityTool(server: McpServer) { server.registerTool( "github_activity", { title: "GitHub Activity", description: "Get Duyet's recent GitHub activity including commits, issues, pull requests, releases, and other public events", inputSchema: { limit: limitSchema.describe( "Number of recent activities to retrieve (1-20, default: 5)", ), include_details: includeDetailsSchema.describe( "Include detailed information like commit messages and issue titles", ), }, }, async ({ limit = 5, include_details = false }) => { try { const data = await getGitHubActivityData(limit, include_details); const formattedContent = formatGitHubActivityForDisplay(data); return { content: [ { type: "text", text: formattedContent, }, ], }; } catch (error) { console.error("GitHub API error:", error); const errorMessage = error instanceof Error ? error.message : "Unknown error"; const errorContent = `Error fetching GitHub activity: ${errorMessage} GitHub Profile: https://github.com/duyet`; return { content: [ { type: "text", text: errorContent, }, ], }; } }, ); }
  • Main helper function to get cached GitHub activity data, called by the tool handler. Applies limits and uses cache.
    export async function getGitHubActivityData( limit = 5, includeDetails = false, ): Promise<GitHubActivityData> { const limitNum = Math.min(Math.max(limit, 1), 20); const cacheKey = `github-activity-${limitNum}-${includeDetails}`; return cacheOrFetch(cacheKey, CACHE_CONFIGS.GITHUB, () => fetchGitHubActivityData(limitNum, includeDetails), ); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/duyet/duyet-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server