Skip to main content
Glama

faf_clear

Clear caches, temporary files, and reset FAF state to resolve issues and start fresh. Remove trust cache, todo lists, or backup files individually or clear everything at once.

Instructions

Clear caches, temporary files, and reset FAF state for a fresh start

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cacheNoClear trust cache only
todosNoClear todo lists only
backupsNoClear backup files only
allNoClear everything (default)

Implementation Reference

  • The `handleFafClear` method is the core implementation, which constructs command-line arguments based on user input and calls the engine adapter to perform the clear operation.
    private async handleFafClear(args: any): Promise<CallToolResult> {
      const clearArgs: string[] = [];
      
      if (args?.cache) {
        clearArgs.push('--cache');
      }
      if (args?.todos) {
        clearArgs.push('--todos');
      }
      if (args?.backups) {
        clearArgs.push('--backups');
      }
      if (args?.all || (!args?.cache && !args?.todos && !args?.backups)) {
        clearArgs.push('--all');
      }
    
      const result = await this.engineAdapter.callEngine('clear', clearArgs);
    
      if (!result.success) {
        return {
          content: [{
            type: 'text',
            text: `🧹 Claude FAF Clear:\n\nFailed to clear: ${result.error}`
          }],
          isError: true
        };
      }
    
      const output = typeof result.data === 'string'
        ? result.data
        : result.data?.output || JSON.stringify(result.data, null, 2);
    
      return {
        content: [{
          type: 'text',
          text: `🧹 Claude FAF Clear:\n\n${output}`
        }]
      };
    }
  • The `faf_clear` tool is registered within the tools configuration in `src/handlers/tools.ts`.
      name: 'faf_clear',
      description: 'Clear caches, temporary files, and reset FAF state for a fresh start',
      inputSchema: {
        type: 'object',
        properties: {
          cache: { type: 'boolean', description: 'Clear trust cache only' },
          todos: { type: 'boolean', description: 'Clear todo lists only' },
          backups: { type: 'boolean', description: 'Clear backup files only' },
          all: { type: 'boolean', description: 'Clear everything (default)' }
        },
      }
    },
  • `FafClearArgs` interface defines the expected arguments for the `faf_clear` tool.
    export interface FafClearArgs {
      cache?: boolean;
      force?: boolean;
      all?: boolean;
    }

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/Wolfe-Jam/grok-faf-mcp'

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