Skip to main content
Glama
CSOAI-ORG

OWASP Agentic MCP

assess_agent_security

Assess an AI agent's security posture based on the OWASP Agentic AI Top 10 framework. Supply details on key controls like input validation, output filtering, and privilege management to get a structured risk analysis.

Instructions

Full OWASP Agentic AI Top 10 security assessment.

Behavior: This tool is read-only and stateless — it produces analysis output without modifying any external systems, databases, or files. Safe to call repeatedly with identical inputs (idempotent). Free tier: 10/day rate limit. Pro tier: unlimited. No authentication required for basic usage.

When to use: Use this tool when you need structured analysis or classification of inputs against established frameworks or standards.

When NOT to use: Not suitable for real-time production decision-making without human review of results.

Args: agent_name (str): The agent name to analyze or process. has_input_validation (bool): The has input validation to analyze or process. has_output_filtering (bool): The has output filtering to analyze or process. has_tool_allowlist (bool): The has tool allowlist to analyze or process. has_least_privilege (bool): The has least privilege to analyze or process. has_context_isolation (bool): The has context isolation to analyze or process. has_action_logging (bool): The has action logging to analyze or process. has_auth_between_agents (bool): The has auth between agents to analyze or process. has_resource_limits (bool): The has resource limits to analyze or process. has_dependency_scanning (bool): The has dependency scanning to analyze or process. has_alignment_testing (bool): The has alignment testing to analyze or process. api_key (str): The api key to analyze or process.

Behavioral Transparency: - Side Effects: This tool is read-only and produces no side effects. It does not modify any external state, databases, or files. All output is computed in-memory and returned directly to the caller. - Authentication: No authentication required for basic usage. Pro/Enterprise tiers require a valid MEOK API key passed via the MEOK_API_KEY environment variable. - Rate Limits: Free tier: 10 calls/day. Pro tier: unlimited. Rate limit headers are included in responses (X-RateLimit-Remaining, X-RateLimit-Reset). - Error Handling: Returns structured error objects with 'error' key on failure. Never raises unhandled exceptions. Invalid inputs return descriptive validation errors. - Idempotency: Fully idempotent — calling with the same inputs always produces the same output. Safe to retry on timeout or transient failure. - Data Privacy: No input data is stored, logged, or transmitted to external services. All processing happens locally within the MCP server process.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_nameYes
has_input_validationNo
has_output_filteringNo
has_tool_allowlistNo
has_least_privilegeNo
has_context_isolationNo
has_action_loggingNo
has_auth_between_agentsNo
has_resource_limitsNo
has_dependency_scanningNo
has_alignment_testingNo
callerNo
api_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • server.py:138-138 (registration)
    Tool registration via @mcp.tool() decorator on FastMCP instance
    @mcp.tool()
  • Core handler: assesses agent against OWASP Top 10 for Agentic AI (10 controls), computes risk rating (LOW/MEDIUM/HIGH/CRITICAL) and returns JSON assessment report
    def assess_agent_security(
        agent_name: str,
        has_input_validation: bool = False,
        has_output_filtering: bool = False,
        has_tool_allowlist: bool = False,
        has_least_privilege: bool = False,
        has_context_isolation: bool = False,
        has_action_logging: bool = False,
        has_auth_between_agents: bool = False,
        has_resource_limits: bool = False,
        has_dependency_scanning: bool = False,
        has_alignment_testing: bool = False,
        caller: str = "",
        api_key: str = "",
    ) -> str:
        """Full OWASP Agentic AI Top 10 security assessment.
    
        Behavior:
            This tool is read-only and stateless — it produces analysis output
            without modifying any external systems, databases, or files.
            Safe to call repeatedly with identical inputs (idempotent).
            Free tier: 10/day rate limit. Pro tier: unlimited.
            No authentication required for basic usage.
    
        When to use:
            Use this tool when you need structured analysis or classification
            of inputs against established frameworks or standards.
    
        When NOT to use:
            Not suitable for real-time production decision-making without
            human review of results.
    
        Args:
            agent_name (str): The agent name to analyze or process.
            has_input_validation (bool): The has input validation to analyze or process.
            has_output_filtering (bool): The has output filtering to analyze or process.
            has_tool_allowlist (bool): The has tool allowlist to analyze or process.
            has_least_privilege (bool): The has least privilege to analyze or process.
            has_context_isolation (bool): The has context isolation to analyze or process.
            has_action_logging (bool): The has action logging to analyze or process.
            has_auth_between_agents (bool): The has auth between agents to analyze or process.
            has_resource_limits (bool): The has resource limits to analyze or process.
            has_dependency_scanning (bool): The has dependency scanning to analyze or process.
            has_alignment_testing (bool): The has alignment testing to analyze or process.
            api_key (str): The api key to analyze or process.
    
        Behavioral Transparency:
            - Side Effects: This tool is read-only and produces no side effects. It does not modify
              any external state, databases, or files. All output is computed in-memory and returned
              directly to the caller.
            - Authentication: No authentication required for basic usage. Pro/Enterprise tiers
              require a valid MEOK API key passed via the MEOK_API_KEY environment variable.
            - Rate Limits: Free tier: 10 calls/day. Pro tier: unlimited. Rate limit headers are
              included in responses (X-RateLimit-Remaining, X-RateLimit-Reset).
            - Error Handling: Returns structured error objects with 'error' key on failure.
              Never raises unhandled exceptions. Invalid inputs return descriptive validation errors.
            - Idempotency: Fully idempotent — calling with the same inputs always produces the
              same output. Safe to retry on timeout or transient failure.
            - Data Privacy: No input data is stored, logged, or transmitted to external services.
              All processing happens locally within the MCP server process.
        """
        if err := _check_auth(api_key):
            return err
        if err := _rl(caller):
            return err
    
        control_map = {
            "A01": has_input_validation, "A02": has_tool_allowlist,
            "A03": has_least_privilege, "A04": has_context_isolation,
            "A05": has_output_filtering, "A06": has_action_logging,
            "A07": has_auth_between_agents, "A08": has_resource_limits,
            "A09": has_dependency_scanning, "A10": has_alignment_testing,
        }
    
        results = []
        for risk_id, mitigated in control_map.items():
            risk = OWASP_AGENTIC_TOP_10[risk_id]
            results.append({
                "id": risk_id,
                "name": risk["name"],
                "severity": risk["severity"],
                "mitigated": mitigated,
                "status": "PASS" if mitigated else "FAIL",
                "recommended_mitigations": risk["mitigations"] if not mitigated else [],
            })
    
        passed = sum(1 for r in results if r["status"] == "PASS")
        critical_passed = sum(1 for r in results if r["status"] == "PASS" and r["severity"] == "CRITICAL")
        critical_total = sum(1 for r in results if r["severity"] == "CRITICAL")
    
        if passed == 10:
            risk_rating = "LOW"
        elif critical_passed == critical_total and passed >= 7:
            risk_rating = "MEDIUM"
        elif critical_passed < critical_total:
            risk_rating = "CRITICAL"
        else:
            risk_rating = "HIGH"
    
        return json.dumps({
            "agent": agent_name,
            "framework": "OWASP Top 10 for Agentic AI (2025)",
            "assessment_date": datetime.now().isoformat(),
            "overall_risk": risk_rating,
            "score": round(passed / 10 * 100, 1),
            "risks_mitigated": passed,
            "risks_unmitigated": 10 - passed,
            "critical_risks_mitigated": f"{critical_passed}/{critical_total}",
            "results": results,
        }, indent=2)
  • Input schema: agent_name (str), 10 boolean security controls (A01-A10), caller (str), api_key (str). Returns JSON string
    def assess_agent_security(
        agent_name: str,
        has_input_validation: bool = False,
        has_output_filtering: bool = False,
        has_tool_allowlist: bool = False,
        has_least_privilege: bool = False,
        has_context_isolation: bool = False,
        has_action_logging: bool = False,
        has_auth_between_agents: bool = False,
        has_resource_limits: bool = False,
        has_dependency_scanning: bool = False,
        has_alignment_testing: bool = False,
        caller: str = "",
        api_key: str = "",
    ) -> str:
  • Helper functions: _check_auth validates API key, _rl enforces free tier rate limit (10 calls/day)
    def _check_auth(api_key: str = "") -> str | None:
        if _MEOK_API_KEY and api_key != _MEOK_API_KEY:
            return "Invalid API key. Get one at https://meok.ai/api-keys"
        return None
    
    
    # ── Rate limiting ───────────────────────────────────────────────
    FREE_DAILY_LIMIT = 10
    _usage: dict[str, list[datetime]] = defaultdict(list)
    
    
    def _rl(caller: str = "anonymous", tier: str = "free") -> Optional[str]:
        if tier == "pro":
            return None
        now = datetime.now()
        cutoff = now - timedelta(days=1)
        _usage[caller] = [t for t in _usage[caller] if t > cutoff]
        if len(_usage[caller]) >= FREE_DAILY_LIMIT:
            return (
                f"Free tier limit ({FREE_DAILY_LIMIT}/day). "
                "Upgrade: https://meok.ai/mcp/owasp-agentic/pro"
            )
        _usage[caller].append(now)
        return None
Behavior5/5

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

With no annotations, the description fully covers side effects (read-only, idempotent), authentication, rate limits, error handling, and data privacy in a structured 'Behavioral Transparency' section.

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?

Well-organized with sections, but contains redundancy (Behavior and Behavioral Transparency overlap) and overly repetitive parameter descriptions. 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?

Thorough coverage of behavior, usage, and transparency. Only weakness is weak parameter descriptions, but output schema exists and the overall context is complete.

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

Parameters2/5

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

Schema coverage is 0%, so the description must compensate. However, the 'Args' section provides only minimal, repetitive descriptions like 'The has_input_validation to analyze or process.' that add little meaning beyond the parameter names.

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 starts with 'Full OWASP Agentic AI Top 10 security assessment', a clear verb+resource. It distinguishes from sibling tools like check_data_leakage by being an overall assessment.

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

Usage Guidelines5/5

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

Has explicit 'When to use' and 'When NOT to use' sections, providing clear guidance on appropriate contexts and a caveat against real-time use without human review.

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/CSOAI-ORG/owasp-agentic-mcp'

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