Skip to main content
Glama
rawr-ai

Filesystem MCP Server

get_permissions

Check server permissions to determine allowed operations (create, edit, move, delete) and access mode (read-only or full) before performing filesystem actions.

Instructions

Returns the current permission state of the server, including which operations are allowed (create, edit, move, delete) and whether the server is in read-only mode or has full access. Use this to understand what operations are permitted before attempting them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the logic for the 'get_permissions' tool. It validates empty args and returns a detailed text summary of the server's current permission settings, read-only mode, symlink handling, and allowed directories.
    export function handleGetPermissions(
      args: unknown,
      permissions: Permissions,
      readonlyFlag: boolean,
      noFollowSymlinks: boolean,
      allowedDirectories: string[]
    ) {
      parseArgs(GetPermissionsArgsSchema, args, 'get_permissions');
    
      return {
        content: [{
          type: "text",
          text: `Current permission state:
    readOnly: ${readonlyFlag}
    followSymlinks: ${!noFollowSymlinks}
    fullAccess: ${permissions.fullAccess}
    
    Operations allowed:
    - create: ${permissions.create}
    - edit: ${permissions.edit}
    - move: ${permissions.move}
    - rename: ${permissions.rename}
    - delete: ${permissions.delete}
    
    Server was started with ${allowedDirectories.length} allowed ${allowedDirectories.length === 1 ? 'directory' : 'directories'}.
    Use 'list_allowed_directories' to see them.`
        }],
      };
    }
  • Primary schema definition for the 'get_permissions' tool inputs, which requires no parameters (empty object).
    export const GetPermissionsArgsSchema = Type.Object({});
    export type GetPermissionsArgs = Static<typeof GetPermissionsArgsSchema>;
  • index.ts:249-256 (registration)
    Registers the 'get_permissions' tool by mapping its name to a wrapper that calls the handler with server context (permissions, flags, directories). This is used in the server.addTool loop.
    get_permissions: (a: unknown) =>
      handleGetPermissions(
        a,
        permissions,
        readonlyFlag,
        noFollowSymlinks,
        allowedDirectories,
      ),
  • index.ts:313-313 (registration)
    Includes 'get_permissions' in the allTools list with its description, determining availability based on permission filters before registration.
    { name: "get_permissions", description: "Get server permissions" },
  • Central schema registry maps 'get_permissions' to its schema, imported from utility-operations.ts, for use in tool definitions.
    get_permissions: GetPermissionsArgsSchema,
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly describes what the tool returns (permission state, allowed operations, read-only/full access status) and its purpose as a pre-operation check. However, it doesn't mention potential limitations like whether permissions can change between calls or if there are 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 perfectly concise with two sentences that each serve distinct purposes: the first explains what the tool returns, and the second explains when to use it. There is no wasted language or redundancy.

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 zero-parameter tool with no annotations and no output schema, the description provides good contextual completeness by explaining what information is returned and when to use it. However, without an output schema, it could benefit from more detail about the exact structure of the permission state response.

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?

The tool has zero parameters with 100% schema description coverage, so the baseline would be 4. The description appropriately doesn't discuss parameters since none exist, which is correct for this tool configuration.

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 tool's purpose with specific verbs ('returns the current permission state') and resources ('server'), distinguishing it from sibling tools that focus on file operations, JSON/XML processing, or directory listings. It explicitly identifies what information is returned (allowed operations and read-only/full access status).

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?

The description provides explicit guidance on when to use this tool ('to understand what operations are permitted before attempting them'), creating a clear usage context distinct from all sibling tools. It effectively positions this as a prerequisite check tool rather than an operational tool.

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/rawr-ai/mcp-filesystem'

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