Skip to main content
Glama

List service files

list_service_files
Read-onlyIdempotent

Lists files and directories in a VPSnet server path, with paging, sorting, filtering, and version tokens for safe file writes.

Instructions

List one directory page inside a running server (lstat: a symlink is described itself), directories first. Page with offset=nextOffset while nextOffset is non-null; above 100,000 entries the listing is truncated (total null). Each entry's version is the compare-and-swap token for write_service_file and upload_service_file. A slow guest answers 202 with an operation: this tool polls it itself and returns the final answer, or, after waitSeconds, the operationId to continue with get_service_file_operation (never repeat the call). Requires files:read on the API key as an explicit grant (a key whose permission list was left empty does not hold it), read or full access; the hosted connector needs vm:files:read. Availability: Firecracker servers need the updated guest agent (filesUnavailable reason agent_update_required; node_update_required while the host node is not updated yet) and Cloud VPS (KVM) servers need the VDS file-manager switch (reason feature_disabled while it is off); relay any unavailable reason verbatim and never work around it. A server whose 2FA lock is on answers 423.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "orderNo": "<orderNo>"
    },
    "name": "list_service_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoAbsolute directory path; default /
sortNo
limitNo
orderNo
filterNoCase-insensitive name substring
offsetNo
orderNoYesTenant-owned service order number, e.g. VP12345
waitSecondsNoHow long this tool waits for a slow guest's operation before returning its operationId (default 30, recursive delete and extract 60)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.3.17

TDQS

A4.7/5.0
Behavior5/5

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

Although annotations already declare readOnly/idempotent/non-destructive, the description adds substantial behavior the annotations cannot express: truncation above 100,000 entries with total=null, 202 slow-guest polling with an internal waitSeconds budget, required files:read as an explicit grant (empty permission list does not count), hosted connector scope vm:files:read, environment-specific unavailability reasons (agent_update_required, node_update_required, feature_disabled), and the 423 2FA-lock response.

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?

Core purpose and paging rule are front-loaded, and nearly every clause carries operational information. It is a single dense run-on paragraph, though, which makes the permission, availability, and error clauses harder to scan than a short bulleted structure would be.

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

Completeness4/5

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

With no output schema, the description usefully describes the return contract (nextOffset, total=null truncation, per-entry version token), plus auth, availability, and error cases. The only remaining hole is the undocumented sort/order/limit/filter parameters, which an agent may need to page efficiently.

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

Parameters4/5

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

Schema coverage is 50%, so the description must compensate, and it does for the highest-stakes parameters: offset is explained through the nextOffset paging loop and waitSeconds through the slow-guest polling behavior. It adds nothing for sort, order, limit, or filter, which are left entirely to the schema (and filter/sort/limit have no schema description), leaving a moderate gap.

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?

States a specific verb and resource plus scope: 'List one directory page inside a running server', and pins down semantics an agent couldn't guess (lstat on symlinks, directories first). It is clearly distinguishable from search_service_files and the other listing siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit paging instructions (offset=nextOffset while nextOffset is non-null) and an explicit dead-end to avoid ('never repeat the call'), routing the agent to get_service_file_operation with waitSeconds instead. It also names write_service_file/upload_service_file as the consumers of the returned version token, so the surrounding workflow is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools