get_github_trending_developers
Retrieve trending GitHub developers filtered by programming language, spoken language, and time period using a straightforward API for actionable developer insights.
Instructions
Get trending developers on github
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | Language to filter repositories by | |
| since | No | Time period to filter repositories by | |
| spoken_language | No | Spoken language to filter repositories by |
Implementation Reference
- The specific case handler within the call_tool function that implements the logic for the 'get_github_trending_developers' tool. It parses arguments, fetches trending developers using the external fetch_developers function, formats the data into a structured JSON, and returns it as TextContent.case ToolName.GET_DEVELOPERS.value: # Get parameters from arguments language = arguments.get("language") since = arguments.get("since", "daily") # Fetch trending developers developers = fetch_developers( language=language, since=since ) # Format the response formatted_devs = [] for dev in developers: formatted_dev = { "username": dev["username"], "name": dev["name"], "url": dev["url"], "avatar": dev["avatar"], "repo": { "name": dev["repo"]["name"], "description": dev["repo"]["description"], "url": dev["repo"]["url"] } } formatted_devs.append(formatted_dev) return [ TextContent(type="text", text=json.dumps(formatted_devs, indent=2)) ]
- src/mcp_server_github_trending/server.py:45-67 (registration)Registration of the 'get_github_trending_developers' tool in the list_tools() function via the Tool object, including its name, description, and input schema.Tool( name=ToolName.GET_DEVELOPERS.value, description="Get trending developers on github", inputSchema={ "type": "object", "properties": { "language": { "type": "string", "description": "Language to filter repositories by", }, "since": { "type": "string", "description": "Time period to filter repositories by", "enum": ["daily", "weekly", "monthly"], }, "spoken_language": { "type": "string", "description": "Spoken language to filter repositories by", }, }, }, ), ]
- Input schema definition for the 'get_github_trending_developers' tool, specifying parameters for language, since period, and spoken language.inputSchema={ "type": "object", "properties": { "language": { "type": "string", "description": "Language to filter repositories by", }, "since": { "type": "string", "description": "Time period to filter repositories by", "enum": ["daily", "weekly", "monthly"], }, "spoken_language": { "type": "string", "description": "Spoken language to filter repositories by", }, }, },
- Enum definition providing the string name for the 'get_github_trending_developers' tool.class ToolName(Enum): GET_REPOSITORIES = "get_github_trending_repositories" GET_DEVELOPERS = "get_github_trending_developers"