Skip to main content
Glama

server_info

Retrieve runtime identity details for an AI runtime guard server instance, including build ID, workspace root, and base directory.

Instructions

Return runtime identity details for this AIRG server instance.

Includes build id, active workspace root, and resolved base directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ctxNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual server_info tool handler function. It activates runtime context, then returns a string with the build ID, workspace root, and base directory.
    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)
  • The server_info function takes an optional Context and returns a str. No complex schema — it's a simple string output.
    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)
    Registration: the server_info function is passed to mcp.tool()() on line 22, registering it as an MCP tool.
    for tool in [
        server_info,
        restore_backup,
        execute_command,
        read_file,
        write_file,
        edit_file,
        delete_file,
        list_directory,
    ]:
        mcp.tool()(tool)
  • Export of server_info from the tools package, making it importable by server.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",
        "edit_file",
        "delete_file",
        "list_directory",
        "restore_backup",
    ]
  • The _resolve_server_build() helper used by server_info to determine the build version string.
    def _resolve_server_build() -> str:
        env_override = str(os.environ.get("AIRG_SERVER_BUILD", "")).strip()
        if env_override:
            return env_override
        try:
            return f"v{version('ai-runtime-guard')}"
        except PackageNotFoundError:
            return "dev"
    
    
    SERVER_BUILD = _resolve_server_build()
Behavior3/5

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

No annotations are provided, so the description must carry the full burden. It indicates the tool returns identity details but does not disclose whether it requires permissions, error behavior (e.g., if server is unavailable), or performance characteristics. Adequate but could be more explicit about safety.

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 two sentences: one stating the overall purpose and one listing the included items. Every word serves a purpose with no fluff.

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?

An output schema exists, so return values are documented elsewhere, but the description does not mention edge cases, error conditions, or the purpose of the undocumented parameter. For a simple informational tool, it is mostly adequate but incomplete regarding the parameter.

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

Parameters1/5

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

The input schema has one parameter 'ctx' which is optional and nullable, but the description does not mention it at all. With 0% schema description coverage, the description fails to add any meaning to this parameter, leaving an agent without guidance on what 'ctx' represents.

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 clearly states the tool returns runtime identity details for the AIRG server, listing specific items like build id, active workspace root, and resolved base directory. This is a specific verb+resource combination that is distinct from sibling tools like file operations or restore_backup.

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?

No guidance is provided on when to use this tool versus alternatives. As a diagnostic tool, it could be used for configuration validation, but the description does not mention context, prerequisites, or exclusions.

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/runtimeguard/ai-runtime-guard'

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