Skip to main content
Glama

get_credly_badges

Retrieve Credly badges and certifications to automatically populate your CV or resume with verified credentials.

Instructions

Get Credly badges and certifications

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of badges to retrieve

Implementation Reference

  • The main handler function implementing get_credly_badges tool. Fetches badges from Credly API using CREDLY_USER_ID env var, parses JSON response, extracts badge name, issuer, issued date, expiry date, formats them, sorts by issued date descending, returns markdown-formatted list.
    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)}")]
  • Registration of the get_credly_badges tool in the list_tools() handler, including name, description, and input schema defining optional 'limit' parameter (number, default 50).
    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
                }
            }
        }
    ),
  • Input schema for get_credly_badges tool: object with optional 'limit' property (number, default 50).
    inputSchema={
        "type": "object",
        "properties": {
            "limit": {
                "type": "number",
                "description": "Maximum number of badges to retrieve",
                "default": 50
            }
        }
    }
  • Configuration for Credly integration: CREDLY_USER_ID environment variable used by the handler to fetch user's badges.
    # Credly Configuration
    CREDLY_USER_ID = os.getenv("CREDLY_USER_ID")
  • Usage of get_credly_badges in generate_enhanced_cv tool to include badges in CV enhancement report.
    credly_result = await get_credly_badges(50)
    data_sections.append(f"\n{credly_result[0].text}")
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 states what the tool does but lacks critical details: it doesn't specify whether this retrieves public or private badges, requires authentication, has rate limits, returns structured data, or handles errors. For a tool with zero annotation coverage, this is a significant gap in transparency.

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

Conciseness4/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. However, it could be slightly more structured by including key behavioral details (e.g., 'Retrieves public Credly badges with optional pagination'), but it earns high marks for brevity.

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

Completeness2/5

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

Given the complexity of retrieving external data (Credly badges), no annotations, and no output schema, the description is incomplete. It doesn't explain what the return values look like (e.g., JSON array of badges with fields like name, issue date), authentication requirements, or error handling, leaving the agent with insufficient context for reliable use.

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?

The input schema has 100% description coverage (the 'limit' parameter is well-documented), so the baseline is 3. The description adds no parameter-specific information beyond what the schema provides, such as typical limit values or how results are ordered, but it doesn't need to compensate for schema gaps.

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 verb ('Get') and resource ('Credly badges and certifications'), making the purpose immediately understandable. However, it doesn't distinguish this tool from potential siblings (like 'get_linkedin_profile' or 'read_cv'), which would require mentioning specific data sources or formats unique to Credly.

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. With siblings like 'get_linkedin_profile' and 'read_cv' that might also retrieve professional credentials, there's no indication of when Credly badges are preferred or what context warrants their use over other tools.

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

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