Skip to main content
Glama

Get file or directory details in a sandbox

get_file_info
Read-onlyIdempotent

Retrieve file or directory metadata in a sandbox—size, permission bits, type, and modification time—to inspect before reading or editing. Requires file.read.

Instructions

Get file or directory details in a sandbox. Size, permission bits, type and modification time. Needs file.read.

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": {
      "sandboxId": "<sandboxId>",
      "path": "<path>"
    },
    "name": "get_file_info"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
sandboxIdYesPublic Sandbox id returned by create/list/get sandbox calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered structurally. The description adds one genuinely useful piece beyond that — the required `file.read` scope — but says nothing about failure modes (missing path), symlink handling, or that the call is scoped to a single sandbox.

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?

Two sentences, front-loaded with purpose and immediately followed by the concrete fields returned; no filler, no restatement of the tool name. The permission requirement is placed last as a short actionable note.

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 enumerates the returned metadata fields and states the auth scope, which is most of what an agent needs. The remaining gaps — path format and behavior on nonexistent paths — are modest for a read-only inspection tool.

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?

Schema coverage is only 50%: sandboxId is documented in the schema, while `path` is a bare string. The phrase 'file or directory' does add meaning by telling the agent that a directory path is valid input, but the description never clarifies whether path is absolute or relative to the sandbox root, which is the main ambiguity an agent faces here.

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?

States a specific verb and resource ('Get file or directory details in a sandbox') and enumerates the returned metadata (size, permission bits, type, modification time), which implicitly separates it from read_file (contents) and set_file_permissions (mutation). It stops short of naming any sibling explicitly, but the field list makes the scope unambiguous.

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

Usage Guidelines3/5

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

The description gives a prerequisite ('Needs `file.read`') but no when-to-use versus when-not guidance — it never says to use this before read_file, or that it does not return file contents. Usage must be inferred from the listed metadata fields.

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