Skip to main content
Glama

adv_get_version

Retrieve version details for the Adversary MCP Server to verify compatibility and access security features for vulnerability detection and exploit generation.

Instructions

Get server version information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler method _handle_get_version that implements the core logic of the adv_get_version tool. It fetches the version using get_version() from the package __init__ and returns formatted JSON with version, server_type, and domain_layer info.
    async def _handle_get_version( self, name: str, arguments: dict ) -> list[types.TextContent]: """Get server version information.""" try: from adversary_mcp_server import get_version version_info = { "version": get_version(), "server_type": "mcp", "domain_layer": "enabled", } return [ types.TextContent(type="text", text=json.dumps(version_info, indent=2)) ] except Exception as e: logger.error(f"Version check failed: {e}") raise CleanAdversaryToolError(f"Version check failed: {str(e)}")
  • The input/output schema definition for the adv_get_version tool in the get_tools() method, specifying no required input parameters.
    Tool( name="adv_get_version", description="Get server version information", inputSchema={"type": "object", "properties": {}}, ),
  • Registration of the adv_get_version tool in the central tool_dispatcher function within _register_tools(), mapping the tool name to its handler.
    elif name == "adv_get_version": return await self._handle_get_version(name, arguments)
  • The helper function get_version() called by the handler to dynamically retrieve the package version, with fallbacks to pyproject.toml parsing and a default constant.
    def get_version() -> str: """Get the current version of the adversary-mcp-server package.""" try: return version("adversary-mcp-server") except Exception: # Fallback - read from pyproject.toml using standard library try: return _read_version_from_pyproject() except Exception: # Final fallback to constant if all methods fail return DEFAULT_VERSION

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