Skip to main content
Glama

adv_get_status

Retrieve comprehensive server status including session management capabilities, active sessions, and cache statistics for security monitoring and vulnerability detection.

Instructions

Get comprehensive server status including session management capabilities, active sessions, and cache statistics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that implements the logic for the 'adv_get_status' tool. It gathers server capabilities, security constraints, session management status, and returns a JSON-formatted status report.
    async def _handle_get_status(
        self, name: str, arguments: dict
    ) -> list[types.TextContent]:
        """Handle comprehensive status requests including session management."""
        try:
            capabilities = self._scan_service.get_scan_capabilities()
            security_constraints = self._scan_service.get_security_constraints()
    
            status = {
                "server": "adversary",
                "capabilities": capabilities,
                "security_constraints": security_constraints,
                "status": "operational",
                "session_management": {
                    "available": self._session_manager is not None,
                    "active_sessions": 0,
                    "cache_statistics": {},
                },
            }
    
            # Add session management information if available
            if self._session_manager:
                status["session_management"]["active_sessions"] = len(
                    self._session_manager.list_active_sessions()
                )
                status["session_management"][
                    "cache_statistics"
                ] = self._session_manager.get_cache_statistics()
                status["session_management"]["features"] = [
                    "context_aware_analysis",
                    "project_context_caching",
                    "multi_phase_analysis",
                    "cross_file_analysis",
                    "intelligent_cache_warming",
                ]
    
            return [
                types.TextContent(
                    type="text", text=json.dumps(status, indent=2, default=str)
                )
            ]
    
        except Exception as e:
            logger.error(f"Status check failed: {e}")
            raise CleanAdversaryToolError(f"Status check failed: {str(e)}")
  • The tool dispatcher function decorated with @self.server.call_tool() that routes calls to 'adv_get_status' to its handler _handle_get_status.
    @self.server.call_tool()
    async def tool_dispatcher(
        name: str, arguments: dict
    ) -> list[types.TextContent]:
        """Dispatch MCP tool calls to the appropriate handler."""
        if name == "adv_scan_file":
            return await self._handle_scan_file(name, arguments)
        elif name == "adv_scan_folder":
            return await self._handle_scan_folder(name, arguments)
        elif name == "adv_scan_code":
            return await self._handle_scan_code(name, arguments)
        elif name == "adv_get_status":
            return await self._handle_get_status(name, arguments)
        elif name == "adv_get_version":
            return await self._handle_get_version(name, arguments)
        elif name == "adv_mark_false_positive":
            return await self._handle_mark_false_positive(name, arguments)
        elif name == "adv_unmark_false_positive":
            return await self._handle_unmark_false_positive(name, arguments)
        else:
            raise ValueError(f"Unknown tool: {name}")
  • The Tool schema definition for 'adv_get_status' in the get_tools() method, specifying name, description, and empty input schema.
        name="adv_get_status",
        description="Get comprehensive server status including session management capabilities, active sessions, and cache statistics",
        inputSchema={"type": "object", "properties": {}},
    ),
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 information is retrieved but doesn't describe how the data is formatted, whether it's real-time or cached, potential rate limits, authentication requirements, or error conditions. For a status tool with zero annotation coverage, this leaves significant gaps in understanding its operational behavior.

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

Conciseness5/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 ('Get comprehensive server status') and lists key components without redundancy. Every word earns its place, making it easy for an agent to parse quickly. There's no wasted verbiage or structural issues.

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

Completeness3/5

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

Given the tool's complexity (low, with no parameters) and lack of annotations/output schema, the description is minimally adequate. It covers what the tool does but lacks behavioral details (e.g., response format, performance characteristics). For a status tool, more context on data freshness or structure would be helpful, but it meets the basic threshold for a simple read operation.

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?

The tool has 0 parameters, and schema description coverage is 100% (empty schema). The description doesn't need to explain parameters, so it appropriately focuses on the tool's purpose. A baseline of 4 is justified since no parameter documentation is required, and the description doesn't introduce unnecessary parameter details.

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 ('comprehensive server status'), specifying three components: session management capabilities, active sessions, and cache statistics. It distinguishes from siblings like 'adv_get_version' by focusing on operational status rather than version information. However, it doesn't explicitly differentiate from other status-related tools (none exist in the sibling list), so it's not a perfect 5.

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. It doesn't mention prerequisites, timing considerations, or comparisons to sibling tools like 'adv_scan_code' or 'adv_scan_file'. The agent must infer usage from the purpose alone, which is insufficient for optimal tool selection.

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/brettbergin/adversary-mcp-server'

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