Skip to main content
Glama

faf_enhance

Optimize .faf files using AI to improve prompts for Claude, ChatGPT, Gemini, or universal models with configurable enhancement focus and consensus building.

Instructions

Enhance .faf with AI optimization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoTarget AI model: claude|chatgpt|gemini|universal (default: claude)
focusNoEnhancement focus: claude-optimal|human-context|ai-instructions|completeness
consensusNoBuild consensus from multiple AI models
dryRunNoPreview enhancement without applying changes

Implementation Reference

  • The handleFafEnhance function executes the tool logic, processing arguments and calling the engineAdapter to perform the enhancement.
    private async handleFafEnhance(args: any): Promise<CallToolResult> {
      const enhanceArgs: string[] = [];
    
      // Default to Claude optimization if no model specified
      const model = args?.model || 'claude';
      enhanceArgs.push('--model', model);
    
      if (args?.focus) {
        enhanceArgs.push('--focus', args.focus);
      }
      if (args?.consensus) {
        enhanceArgs.push('--consensus');
      }
      if (args?.dryRun) {
        enhanceArgs.push('--dry-run');
      }
    
      const result = await this.engineAdapter.callEngine('enhance', enhanceArgs);
    
      if (!result.success) {
        return {
          content: [{
            type: 'text',
            text: `🚀 Claude FAF Enhancement:\n\nFailed to enhance: ${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 Enhancement:\n\n${output}`
        }]
      };
    }
  • Definition of the faf_enhance tool schema, including parameters like model and focus.
      name: 'faf_enhance',
      description: 'Enhance .faf with AI optimization',
      inputSchema: {
        type: 'object',
        properties: {
          model: { type: 'string', description: 'Target AI model: claude|chatgpt|gemini|universal (default: claude)' },
          focus: { type: 'string', description: 'Enhancement focus: claude-optimal|human-context|ai-instructions|completeness' },
          consensus: { type: 'boolean', description: 'Build consensus from multiple AI models' },
          dryRun: { type: 'boolean', description: 'Preview enhancement without applying changes' }
        },
      }
    },
  • TypeScript interface definition for FafEnhance arguments.
    export interface FafEnhanceArgs {
      model?: string;
      focus?: string;
    }
  • Registration/routing for faf_enhance within the tool handler switch-case.
    case 'faf_enhance':
      return await this.handleFafEnhance(args);

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