Skip to main content
Glama

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,

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