Skip to main content
Glama

get_certification_history

Retrieve recent certification decisions for AI agent actions, including risk zones and timestamps, to monitor safety audit trails.

Instructions

Retrieve the recent certification history.

This tool returns a list of recent certifications, most recent first. The history includes decision, zone, timestamp, and other metadata. Up to 50 certifications are stored; older ones are discarded.

Args: limit: Maximum number of certifications to return (default 10, max 50)

Returns: Dictionary with keys: - certifications: List of recent certification summaries - total_count: Total certifications in history - timestamp: Current time (ISO 8601)

Each certification entry contains: - certificate_id: Unique certificate identifier - action_id: Action that was certified - agent_id: Agent that proposed the action - decision: Final decision ("Certified", "CertifiedWithWarning", etc.) - zone: Risk zone ("Safe", "Caution", "Danger") - timestamp: When the certification occurred - description: Optional action description

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The get_certification_history tool implementation, which retrieves recent certifications from a deque and returns them as a JSON-compatible dictionary.
    def get_certification_history(limit: int = 10) -> Dict[str, Any]:
        """
        Retrieve the recent certification history.
    
        This tool returns a list of recent certifications, most recent first.
        The history includes decision, zone, timestamp, and other metadata.
        Up to 50 certifications are stored; older ones are discarded.
    
        Args:
            limit: Maximum number of certifications to return (default 10, max 50)
    
        Returns:
            Dictionary with keys:
            - certifications: List of recent certification summaries
            - total_count: Total certifications in history
            - timestamp: Current time (ISO 8601)
    
        Each certification entry contains:
            - certificate_id: Unique certificate identifier
            - action_id: Action that was certified
            - agent_id: Agent that proposed the action
            - decision: Final decision ("Certified", "CertifiedWithWarning", etc.)
            - zone: Risk zone ("Safe", "Caution", "Danger")
            - timestamp: When the certification occurred
            - description: Optional action description
        """
        try:
            limit = min(max(limit, 1), 50)  # Clamp to [1, 50]
    
            # Reverse to get most recent first
            recent = list(reversed(list(_certification_history)))[:limit]
    
            response = {
                "certifications": recent,
                "total_count": len(_certification_history),
                "limit": limit,
                "timestamp": datetime.now(timezone.utc).isoformat().replace("+00:00", "Z"),
            }
    
            logger.info(f"Retrieved {len(recent)} certifications from history")
    
            return response
    
        except Exception as e:
            logger.error(f"Error in get_certification_history: {e}")
            return {
                "error": f"Failed to retrieve history: {str(e)}",
                "timestamp": datetime.now(timezone.utc).isoformat().replace("+00:00", "Z"),
            }
Behavior5/5

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

With no annotations provided, the description carries full behavioral burden excellently. It discloses critical data lifecycle constraints ('Up to 50 certifications are stored; older ones are discarded'), ordering guarantees ('most recent first'), and rich return structure details that annotations would typically cover.

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

Conciseness3/5

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

While well-structured with Args/Returns sections, the description is verbose; the extensive Returns field enumeration duplicates information that should ideally live in the output schema (which exists per context signals). The retention limit sentence earns its place, but the field-by-field return documentation could be trimmed.

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

Completeness4/5

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

Given zero annotations and minimal schema coverage, the description provides comprehensive context including data retention policies, return format, and parameter constraints. The output schema exists, so the detailed return documentation in the description is somewhat redundant, though the behavioral metadata (50 item limit, discarding) is essential.

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

Parameters4/5

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

With 0% schema description coverage, the Args section compensates effectively by documenting the 'limit' parameter's purpose, default value (10), and maximum constraint (50) - crucial information not present in the bare JSON schema.

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

Purpose5/5

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

The description uses specific verb 'Retrieve' and resource 'certification history', clearly distinguishing it from sibling 'certify_action' (which implies writing/creating) and 'check_budget' (unrelated domain). It establishes the scope as 'recent' history with explicit ordering ('most recent first').

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

Usage Guidelines3/5

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

The description implies usage by detailing what the tool returns (history vs new certifications), but lacks explicit selection guidance like 'Use this to audit past decisions; to certify new actions use certify_action instead.' No when-not-to-use or prerequisite guidance is provided.

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/tb8412/qae-claude-mcp-example'

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