Skip to main content
Glama

GitHub Activity

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),
    	);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions retrieving 'recent' activity and 'public events', hinting at read-only and non-destructive behavior, but doesn't clarify aspects like rate limits, authentication needs, data freshness, or what 'recent' means (e.g., time range). For a data retrieval tool with zero annotation coverage, this leaves significant gaps in understanding operational constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. It lists the types of activities included (commits, issues, etc.), which adds useful detail without verbosity. Every part earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the purpose and scope but lacks details on behavioral traits, usage context, and output format. Without annotations or output schema, more guidance on what the tool returns (e.g., structured data vs. raw events) would improve completeness, but it meets a minimum viable level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters ('limit' and 'include_details') well-documented in the schema. The description adds no additional parameter semantics beyond implying retrieval of 'recent' activity, which isn't tied to specific parameters. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract from the schema's clarity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get Duyet's recent GitHub activity including commits, issues, pull requests, releases, and other public events'. It specifies the verb ('Get'), resource ('GitHub activity'), and scope ('Duyet's recent'), but doesn't explicitly differentiate from sibling tools like 'get_analytics' or 'web-search', which might also retrieve data. The specificity of targeting a particular user's GitHub activity is good but not contrasted with alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_analytics' (which might overlap for data retrieval) or 'web-search' (which could search GitHub), nor does it specify prerequisites or exclusions. Usage is implied by the purpose but lacks explicit context for selection among available options.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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