Skip to main content
Glama

get_filesystem_info

Retrieve metadata for files or directories in a Vertex AI workspace, including size, type, timestamps, and permissions, without accessing file content.

Instructions

Retrieve detailed metadata about a file or directory within the workspace filesystem. Returns comprehensive information including size (bytes), creation time, last modified time, last accessed time, type (file/directory), and permissions (octal string). This tool is perfect for understanding file characteristics without reading the actual content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe path of the file or directory to get info for (relative to the workspace directory).

Implementation Reference

  • Main handler case for 'get_filesystem_info' tool: parses arguments, validates path, calls getFileStats helper, formats and sets resultText.
    case "get_filesystem_info": {
      const parsed = GetFileInfoArgsSchema.parse(args);
      const validPath = validateWorkspacePath(parsed.path);
      const info = await getFileStats(validPath);
      resultText = `Path: ${parsed.path}\nType: ${info.isDirectory ? 'Directory' : 'File'}\nSize: ${info.size} bytes\nCreated: ${info.created.toISOString()}\nModified: ${info.modified.toISOString()}\nAccessed: ${info.accessed.toISOString()}\nPermissions: ${info.permissions}`;
      break;
  • Helper function that retrieves comprehensive file/directory stats including size, timestamps, type, and permissions.
    async function getFileStats(filePath: string): Promise<FileInfo> {
      const stats = await fs.stat(filePath);
      return {
        size: stats.size,
        created: stats.birthtime,
        modified: stats.mtime,
        accessed: stats.atime,
        isDirectory: stats.isDirectory(),
        isFile: stats.isFile(),
        permissions: stats.mode.toString(8).slice(-3), // POSIX permissions
      };
    }
  • Zod schema defining the input parameters for the tool (path string).
    export const GetFileInfoArgsSchema = z.object({
      path: z.string().describe("The path of the file or directory to get info for (relative to the workspace directory)."),
    });
  • Import of the getFileInfoTool definition for inclusion in allTools and toolMap.
    import { getFileInfoTool } from "./get_file_info.js";
  • Addition of getFileInfoTool to the allTools array, enabling listing and lookup via toolMap.
    searchFilesTool,
    getFileInfoTool,
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the tool's read-only nature ('without reading the actual content') and lists specific metadata returned (size, times, type, permissions), which helps understand behavior. However, it doesn't mention error conditions, permissions needed, or rate limits.

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 efficiently structured in two sentences: the first states purpose and scope, the second lists returned metadata and usage context. Every sentence adds value with zero redundant information.

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?

For a single-parameter read operation with no output schema, the description provides good context: it explains what metadata is returned and the tool's purpose. However, without annotations or output schema, it could benefit from more detail on error handling or exact return format.

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 description coverage is 100%, so the schema already documents the 'path' parameter thoroughly. The description adds no additional parameter information beyond what's in the schema, maintaining the baseline score of 3 for adequate but not enhanced coverage.

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 description clearly states the verb 'retrieve' and resource 'detailed metadata about a file or directory', specifying it's within the workspace filesystem. It distinguishes from siblings like 'read_file_content' (which reads actual content) and 'get_directory_tree' (which shows structure rather than metadata).

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?

The description provides clear context: 'for understanding file characteristics without reading the actual content', which implicitly differentiates it from content-reading tools. However, it doesn't explicitly mention when NOT to use it or name specific alternatives among the siblings.

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

Related 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/shariqriazz/vertex-ai-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server