server_info
Retrieve runtime identity details such as build ID, active workspace root, and resolved base directory for this AIRG server instance.
Instructions
Return runtime identity details for this AIRG server instance.
Includes build id, active workspace root, and resolved base directory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ctx | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/tools/command_tools.py:30-40 (handler)The main handler function for the server_info tool. It activates the runtime context, retrieves SERVER_BUILD, WORKSPACE_ROOT, and BASE_DIR, and returns an info string.
def server_info(ctx: Context | None = None) -> str: """Return runtime identity details for this AIRG server instance. Includes build id, active workspace root, and resolved base directory. """ tokens = activate_runtime_context(ctx) from config import BASE_DIR try: return f"ai-runtime-guard build={SERVER_BUILD} workspace={WORKSPACE_ROOT} base_dir={BASE_DIR}" finally: reset_runtime_context(tokens) - src/server.py:21-31 (registration)The server_info function is registered as an MCP tool via mcp.tool()(tool) in the registration loop.
for tool in [ server_info, restore_backup, execute_command, read_file, write_file, edit_file, delete_file, list_directory, ]: mcp.tool()(tool) - src/tools/__init__.py:1-9 (registration)server_info is re-exported from the tools package via __init__.py.
from .command_tools import execute_command, server_info from .file_tools import delete_file, edit_file, list_directory, read_file, write_file from .restore_tools import restore_backup __all__ = [ "server_info", "execute_command", "read_file", "write_file", - src/mcp_config_manager.py:30-39 (helper)server_info is listed in the AIRG_MCP_TOOLS constant used for config management.
AIRG_MCP_TOOLS = [ "server_info", "restore_backup", "execute_command", "read_file", "write_file", "edit_file", "delete_file", "list_directory", ] - src/server.py:6-15 (registration)server_info is imported from tools in the MCP server entrypoint.
from tools import ( delete_file, edit_file, execute_command, list_directory, read_file, restore_backup, server_info, write_file, )