get_developer_analysis
Analyze GitHub developer activity and contributions by entering a username to gain insights into their open source engagement and impact.
Instructions
Get detailed analysis of a GitHub developer, including their activity and contributions.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | GitHub username |
Implementation Reference
- index.ts:183-206 (handler)The main handler function that fetches developer analysis data from the OSSInsight API or falls back to web scraping the OSSInsight page.async function getDeveloperAnalysis(username: string): Promise<any> { try { // Get user information through API if available const userData = await apiRequest(`/users/${username}`); return { user_data: userData }; } catch (error) { // If API fails, rely on web page data console.error(`API request failed, falling back to web scraping: ${error}`); const webUrl = `${OSSINSIGHT_WEB_URL}/analyze/user/${username}`; return { web_data: await scrapeOSSInsightPage(webUrl, { name: 'h1', bio: '.user-bio', repos: '.repos-count', // Add more selectors as needed }), web_url: webUrl }; } }
- schemas.ts:10-12 (schema)Zod schema defining the input parameter 'username' for the tool.export const GetDeveloperAnalysisParamsSchema = z.object({ username: z.string().describe("GitHub username") });
- index.ts:292-296 (registration)Tool specification registration in the ListToolsRequestHandler response.{ name: "get_developer_analysis", description: "Get detailed analysis of a GitHub developer, including their activity and contributions.", inputSchema: zodToJsonSchema(GetDeveloperAnalysisParamsSchema) },
- index.ts:330-334 (registration)Tool invocation handler in the CallToolRequestSchema switch statement.case "get_developer_analysis": { const args = GetDeveloperAnalysisParamsSchema.parse(request.params.arguments); const analysis = await getDeveloperAnalysis(args.username); return { content: [{ type: "text", text: JSON.stringify(analysis, null, 2) }] }; }