Skip to main content
Glama

list_vm_shares

List all VirtioFS shared directories configured for a specified virtual machine, providing an overview of active file system mounts.

Instructions

List shared directories (VirtioFS) registered for a VM.

Args: name: VM name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • MCP tool handler for 'list_vm_shares'. Decorated with @mcp.tool(), calls utm.list_vm_shares(name) and returns a dict with 'name' and 'shares'.
    @mcp.tool()
    def list_vm_shares(name: str) -> dict:
        """List shared directories (VirtioFS) registered for a VM.
    
        Args:
            name: VM name
        """
        shares = utm.list_vm_shares(name)
        return {"name": name, "shares": shares}
  • Core AppleScript implementation of list_vm_shares. Builds an AppleScript that iterates over UTM's VM registry (shared directories), extracting POSIX paths, and returns them as a list of strings.
    def list_vm_shares(name: str) -> list[str]:
        """List shared directories registered for a VM. Returns POSIX paths."""
        _validate_vm_name(name)
        script = f'''
        tell application "UTM"
            set vm to virtual machine named "{_esc(name)}"
            set shares to registry of vm
            set output to ""
            repeat with s in shares
                set output to output & (POSIX path of s) & linefeed
            end repeat
            return output
        end tell
        '''
        raw = _run(script)
        return [p.strip() for p in raw.strip().split("\n") if p.strip()]
  • The @mcp.tool() decorator on list_vm_shares registers it with the FastMCP server as a tool named 'list_vm_shares'.
    @mcp.tool()
    def list_vm_shares(name: str) -> dict:
        """List shared directories (VirtioFS) registered for a VM.
    
        Args:
            name: VM name
        """
        shares = utm.list_vm_shares(name)
        return {"name": name, "shares": shares}
  • The function signature (name: str) -> dict defines the input/output schema: accepts a VM name string, returns a dict with name and shares list.
    @mcp.tool()
    def list_vm_shares(name: str) -> dict:
        """List shared directories (VirtioFS) registered for a VM.
    
        Args:
            name: VM name
        """
        shares = utm.list_vm_shares(name)
        return {"name": name, "shares": shares}
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only states 'list' as a read operation but does not disclose what happens for missing VMs, output format, or any side effects.

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

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very concise, a single line describing the action. No fluff, but could include more detail without excessive length.

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?

No output schema, no annotations, and only one parameter. The description does not explain what the list contains, pagination, or error behavior, which is insufficient for a list operation.

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

Parameters2/5

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

The single parameter 'name' has minimal description ('VM name') beyond the schema's property name. Schema coverage is 0%, so the description should add more context, but it does not.

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?

Clearly states it lists shared directories (VirtioFS) for a VM. The verb 'list' and resource 'shared directories' are specific, and it distinguishes from sibling tools like add_vm_share, remove_vm_share, and set_vm_shares.

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 on when to use this tool vs. alternatives. Sibling share-related tools exist but no context is provided for choosing among them.

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/neverprepared/mcp-utm'

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