Skip to main content
Glama

liara_get_vm

Retrieve virtual machine details including configuration, status, and specifications from the Liara cloud platform using the VM ID.

Instructions

Get details of a virtual machine

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vmIdYesThe VM ID

Implementation Reference

  • The core handler function that executes the logic to retrieve details of a specific Liara virtual machine (VM) by ID using the IaaS API.
     */
    export async function getVM(
        client: LiaraClient,
        vmId: string
    ): Promise<VirtualMachine> {
        validateRequired(vmId, 'VM ID');
        const iaasClient = createIaaSClient(client);
        return await iaasClient.get<VirtualMachine>(`/vm/${vmId}`);
    }
  • Type definition for the VirtualMachine object, which represents the output schema of the liara_get_vm tool.
    export interface VirtualMachine {
        _id: string;
        name: string;
        planID: string;
        status: VmStatus;
        os: string;
        ip?: string;
        createdAt: string;
    }
  • Helper function to create a specialized LiaraClient for IaaS API (different base URL: https://iaas-api.liara.ir), used by getVM.
    function createIaaSClient(client: LiaraClient): LiaraClient {
        // Access the internal client to get the API token
        const internalClient = (client as any).client;
        const apiToken = internalClient?.defaults?.headers?.Authorization?.replace('Bearer ', '') || 
                         process.env.LIARA_API_TOKEN;
        const teamId = (client as any).teamId || process.env.LIARA_TEAM_ID;
    
        if (!apiToken) {
            throw new Error('API token is required for IaaS operations');
        }
    
        // Create new client with IaaS base URL
        // Import LiaraClient class dynamically
        return new LiaraClient({
            apiToken,
            teamId,
            baseURL: 'https://iaas-api.liara.ir',
        });
    }
  • Type definition for VmStatus used in VirtualMachine.
    export type VmStatus = 'RUNNING' | 'STOPPED' | 'CREATING' | 'FAILED';
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 this is a read operation ('Get'), but doesn't mention authentication requirements, rate limits, error conditions, or what specific details are returned (e.g., status, configuration, metrics). This is inadequate for a tool with no annotation coverage.

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 with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is insufficient. It doesn't explain what 'details' are returned (e.g., JSON structure, fields like CPU, memory, state) or behavioral aspects like permissions needed. For a tool that likely returns structured VM data, this leaves significant gaps for an AI agent.

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

Parameters3/5

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

Schema description coverage is 100%, with the single parameter 'vmId' clearly documented in the schema. The description doesn't add any parameter-specific context beyond what the schema provides, such as format examples or where to find the VM ID. This meets the baseline for high schema coverage.

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 ('details of a virtual machine'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'liara_get_app' or 'liara_get_database', which have similar 'Get details of X' patterns, so it's not fully distinctive.

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. For example, it doesn't mention whether to use this for single VM details versus 'liara_list_vms' for listing multiple VMs, or clarify prerequisites like needing the VM ID first.

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/razavioo/liara-mcp'

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