Skip to main content
Glama

get_credly_badges

Retrieve Credly badges and certifications to automatically populate CVs and resumes with verified credentials.

Instructions

Get Credly badges and certifications

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of badges to retrieve

Implementation Reference

  • The core handler function for the 'get_credly_badges' tool. Fetches badges from Credly API using CREDLY_USER_ID env var, processes and formats badge details (name, issuer, dates), sorts them, and returns formatted text content.
    async def get_credly_badges(limit: int) -> list[TextContent]: """Get Credly badges.""" if not CREDLY_USER_ID: return [TextContent( type="text", text="Credly user ID not configured. Set CREDLY_USER_ID" )] try: async with httpx.AsyncClient() as client: response = await client.get( f"https://www.credly.com/users/{CREDLY_USER_ID}/badges.json", params={"page": 1, "per_page": limit}, headers={"Accept": "application/json"}, timeout=30.0 ) response.raise_for_status() data = response.json() # Format badges badges = [] for badge in data.get("data", []): name = badge["badge_template"]["name"] # Extract issuer issuer = "Unknown Issuer" if badge.get("badge_template", {}).get("issuer", {}).get("entities"): entities = badge["badge_template"]["issuer"]["entities"] if entities and entities[0].get("entity", {}).get("name"): issuer = entities[0]["entity"]["name"] # Format date issued_at = badge.get("issued_at", "") if issued_at: date_obj = datetime.fromisoformat(issued_at.replace('Z', '+00:00')) date_str = date_obj.strftime("%b %Y") else: date_str = "Unknown" # Check expiry expires_at = badge.get("expires_at") expiry_str = "" if expires_at: exp_date = datetime.fromisoformat(expires_at.replace('Z', '+00:00')) expiry_str = f" (Expires: {exp_date.strftime('%b %Y')})" badges.append(f"{name} - {issuer} ({date_str}){expiry_str}") # Sort by date (newest first) badges.sort(reverse=True) output = "\n".join(badges) if badges else "No badges found" return [TextContent( type="text", text=f"Credly Badges ({len(badges)}):\n\n{output}" )] except Exception as e: return [TextContent(type="text", text=f"Credly API Error: {str(e)}")]
  • Registers the 'get_credly_badges' tool in the MCP server with its description and input schema defining the optional 'limit' parameter.
    Tool( name="get_credly_badges", description="Get Credly badges and certifications", inputSchema={ "type": "object", "properties": { "limit": { "type": "number", "description": "Maximum number of badges to retrieve", "default": 50 } } } ),
  • Defines the input schema for the tool, specifying an optional 'limit' number parameter with default 50.
    inputSchema={ "type": "object", "properties": { "limit": { "type": "number", "description": "Maximum number of badges to retrieve", "default": 50 } } }
  • Dispatch logic in the main call_tool handler that routes calls to the get_credly_badges function.
    elif name == "get_credly_badges": return await get_credly_badges(arguments.get("limit", 50))
  • Usage of get_credly_badges within the generate_enhanced_cv tool to include badges in the CV report.
    credly_result = await get_credly_badges(50)

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/eyaab/cv-resume-builder-mcp'

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