Skip to main content
Glama

liara_list_ftp_accesses

Retrieve FTP access records for a specific disk in your Liara cloud application to monitor file transfer activities and manage permissions.

Instructions

List FTP accesses for a disk

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNameYesThe name of the app
diskNameYesThe name of the disk
pageNoPage number (1-based)
perPageNoNumber of items per page
limitNoAlternative to perPage: maximum number of items to return
offsetNoAlternative to page: number of items to skip

Implementation Reference

  • The core handler function that implements the tool logic: lists FTP accesses for a specific disk in a Liara project by querying the API.
    export async function listFtpAccesses(
        client: LiaraClient,
        appName: string,
        diskName: string,
        pagination?: PaginationOptions
    ): Promise<FtpAccess[]> {
        validateAppName(appName);
        validateRequired(diskName, 'Disk name');
        const params = paginationToParams(pagination);
        
        return await client.get<FtpAccess[]>(
            `/v1/projects/${appName}/disks/${diskName}/ftp`,
            params
        );
    }
  • TypeScript interface defining the input/output schema for FTP access objects returned by liara_list_ftp_accesses.
    export interface FtpAccess {
        _id?: string;
        hostname: string;
        port: number;
        username: string;
        password: string;
    }
  • Imports and supporting utilities used by the FTP accesses handler, including client, types, and validation functions.
    import { LiaraClient } from '../api/client.js';
    import {
        Disk,
        CreateDiskRequest,
        FtpAccess,
        PaginationOptions,
        paginationToParams,
    } from '../api/types.js';
    import { validateAppName, validateRequired } from '../utils/errors.js';
    
    /**
     * List disks for a project
     */
    export async function listDisks(
        client: LiaraClient,
        appName: string,
        pagination?: PaginationOptions
    ): Promise<Disk[]> {
        validateAppName(appName);
        // Disks are included in project details, but we can still apply pagination client-side if needed
        const project = await client.get<any>(`/v1/projects/${appName}`);
        const disks = project.disks || [];
        
        // Apply client-side pagination if needed (since disks come from project details)
        if (pagination) {
            const page = pagination.page || 1;
            const perPage = pagination.perPage || pagination.limit || 100;
            const start = (page - 1) * perPage;
            const end = start + perPage;
            return disks.slice(start, end);
        }
        
        return disks;
    }
    
    /**
     * Get details of a specific disk
     */
    export async function getDisk(
        client: LiaraClient,
        appName: string,
        diskName: string
    ): Promise<Disk> {
        validateAppName(appName);
        validateRequired(diskName, 'Disk name');
        
        return await client.get<Disk>(`/v1/projects/${appName}/disks/${diskName}`);
    }
    
    /**
     * Create a new disk for a project
     */
    export async function createDisk(
        client: LiaraClient,
        appName: string,
        request: CreateDiskRequest
    ): Promise<Disk> {
        validateAppName(appName);
        validateRequired(request.name, 'Disk name');
        validateRequired(request.size, 'Disk size');
        validateRequired(request.mountPath, 'Mount path');
    
        if (request.size <= 0) {
            throw new Error('Disk size must be greater than 0');
        }
    
        return await client.post<Disk>(
            `/v1/projects/${appName}/disks`,
            request
        );
    }
    
    /**
     * Delete a disk
     */
    export async function deleteDisk(
        client: LiaraClient,
        appName: string,
        diskName: string
    ): Promise<void> {
        validateAppName(appName);
        validateRequired(diskName, 'Disk name');
        await client.delete(`/v1/projects/${appName}/disks/${diskName}`);
    }
    
    /**
     * Create FTP access for a disk
     */
    export async function createFtpAccess(
        client: LiaraClient,
        appName: string,
        diskName: string
    ): Promise<FtpAccess> {
        validateAppName(appName);
        validateRequired(diskName, 'Disk name');
        
        return await client.post<FtpAccess>(
            `/v1/projects/${appName}/disks/${diskName}/ftp`
        );
    }
    
    /**
     * List FTP accesses for a disk
     */
    export async function listFtpAccesses(
        client: LiaraClient,
        appName: string,
        diskName: string,
        pagination?: PaginationOptions
    ): Promise<FtpAccess[]> {
        validateAppName(appName);
        validateRequired(diskName, 'Disk name');
        const params = paginationToParams(pagination);
        
        return await client.get<FtpAccess[]>(
            `/v1/projects/${appName}/disks/${diskName}/ftp`,
            params
        );
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool lists FTP accesses but doesn't mention if this is a read-only operation, whether it requires specific permissions, how pagination works with the multiple parameters, or what the output format looks like. This leaves significant gaps for an agent to understand the tool's behavior.

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 purpose, 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 complexity of 6 parameters (including pagination alternatives) and no annotations or output schema, the description is insufficient. It doesn't explain how to handle pagination choices (page/perPage vs limit/offset), what the returned data structure includes, or any error conditions, leaving the agent with incomplete context for proper usage.

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?

The schema description coverage is 100%, so all parameters are documented in the input schema. The description doesn't add any additional meaning beyond implying that 'appName' and 'diskName' are required to scope the listing, which is already clear from the schema. 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 action ('List') and resource ('FTP accesses for a disk'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'liara_list_disks' or 'liara_list_objects' beyond the specific resource type, missing explicit sibling distinction.

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. The description lacks context about prerequisites, such as needing an existing disk with FTP access configured, or comparisons to other listing tools in the sibling set.

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