Skip to main content
Glama

liara_get_bucket_credentials

Retrieve S3-compatible credentials for accessing a specific bucket's object storage on the Liara cloud platform.

Instructions

Get S3-compatible credentials for a bucket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the bucket

Implementation Reference

  • The core handler function that implements the tool logic by validating the bucket name and fetching S3-compatible credentials from the Liara API.
    export async function getBucketCredentials(
        client: LiaraClient,
        name: string
    ): Promise<BucketCredentials> {
        validateRequired(name, 'Bucket name');
        return await client.get<BucketCredentials>(`/v1/buckets/${name}/credentials`);
    }
  • TypeScript interface defining the structure of the credentials object returned by the tool.
    export interface BucketCredentials {
        accessKey: string;
        secretKey: string;
        endpoint: string;
        bucket: string;
    }
  • TypeScript interface for Bucket details, used in related storage operations.
    export interface Bucket {
        _id: string;
        name: string;
        region: string;
        createdAt: string;
    }
  • Validation helper used in the handler to ensure bucket name is provided.
    export function validateRequired(value: any, fieldName: string): void {
        if (value === undefined || value === null || value === '') {
            throw new LiaraMcpError(`${fieldName} is required`);
        }
    }
  • Helper to unwrap API responses, though not directly used in this handler.
    export function unwrapApiResponse<T>(response: any, expectedArrayKeys?: string[]): T {
        if (!response) return response;
        
        // If it's already the expected type (array or primitive), return as-is
        if (Array.isArray(response)) {
            return response as T;
        }
        
        // Common wrapper keys that APIs use
        const arrayKeys = expectedArrayKeys || ['data', 'items', 'results', 'projects', 'databases', 'buckets', 'zones', 'records', 'backups', 'releases', 'domains', 'vms', 'plans'];
        
        // Try to unwrap from common wrapper keys
        for (const key of arrayKeys) {
            if (response[key] !== undefined) {
                return response[key] as T;
            }
        }
        
        // Return as-is if no wrapper found
        return response as T;
    }
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 implies a read operation ('Get'), but doesn't disclose behavioral traits such as authentication requirements, rate limits, whether credentials are temporary or permanent, or what format the credentials are returned in. 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, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it efficient and easy to parse.

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 no annotations and no output schema, the description is incomplete. It doesn't explain what the credentials are used for, their format (e.g., access key, secret key, endpoint), or any security implications. For a tool that handles sensitive credentials, this lack of context is a significant shortfall.

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 input schema has 100% description coverage, with the single parameter 'name' documented as 'The name of the bucket'. The description doesn't add any meaning beyond this, such as bucket naming conventions or constraints. Baseline 3 is appropriate since the schema does the heavy lifting.

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 ('Get') and resource ('S3-compatible credentials for a bucket'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'liara_get_bucket' or 'liara_get_object_download_url', which also involve bucket-related retrieval but for different resources.

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 specify if this is for accessing bucket contents programmatically or for administrative purposes, nor does it mention prerequisites like bucket existence or permissions.

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