Skip to main content
Glama

Stat service file

stat_service_file
Read-onlyIdempotent

Describe a file or directory entry's type, size, mode, owner, mtime, version, and kind, optionally adding SHA-256 and following symlinks.

Instructions

Describe one entry: type, size, mode, owner, mtime, version and kind (text, image, binary, directory, other). A symlink is followed to its canonical target unless follow=false. hash=true adds the SHA-256 (files up to 4 GiB, 30 s budget; otherwise hashSkipped). 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>",
      "path": "<path>"
    },
    "name": "stat_service_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
hashNo
pathYesAbsolute path inside the server (UTF-8, at most 4096 bytes, no . or .. components)
followNo
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?

Far beyond the readOnly/idempotent annotations, it discloses the 202 slow-guest path, internal polling, the 30s/60s default wait budget, the 4 GiB / 30 s hash ceiling with hashSkipped, symlink resolution, permission grants (files:read, vm:files:read), availability gating (agent_update_required, node_update_required, feature_disabled) and the 423 2FA 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?

Every clause carries operational value and the core behavior is front-loaded, but the single dense paragraph chains permissions, availability and error semantics into one run-on block that is harder to scan than it needs to be.

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

Completeness5/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 still names the returned fields, explains the async 202 return shape, and covers auth, availability and error codes, so nothing an agent needs to call or interpret the result is missing.

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

Parameters5/5

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

Schema coverage is only 60% (hash, follow, waitSeconds undocumented in schema), and the description compensates fully: hash=true adds SHA-256 with size/time limits, follow=false stops symlink resolution, and waitSeconds governs how long the tool blocks before returning an operationId.

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?

The opening phrase 'Describe one entry: type, size, mode, owner, mtime, version and kind' defines a specific verb and resource and even enumerates the returned attributes, which immediately separates it from list_service_files and the read/download/write siblings.

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

Usage Guidelines4/5

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

It explicitly directs the agent to get_service_file_operation when a 202 returns an operationId after waitSeconds and warns 'never repeat the call', and it prevents workarounds around unavailable reasons. It doesn't contrast against nearby alternatives like read_service_file, but the single-entry scope is unambiguous.

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