Skip to main content
Glama

faf_init

Create a starter .faf file by specifying project name, goal, and language. Generates a valid FAF YAML without overwriting existing files.

Instructions

Create a starter .faf file with project name, goal, and language. Generates a valid FAF YAML file with all required sections. Will not overwrite an existing file — use faf_discover first to check.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNomy-project
goalNo
languageNo
pathNoproject.faf

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual implementation of faf_init tool. It's an MCP tool decorated with @mcp.tool() that creates a starter .faf file with project name, goal, and language. Takes parameters: name (default 'my-project'), goal (default ''), language (default ''), path (default 'project.faf'). Checks if file exists to prevent overwrite, generates YAML content with all required sections, writes it to the specified path, and returns success info including absolute path.
    @mcp.tool()
    def faf_init(
        name: str = "my-project",
        goal: str = "",
        language: str = "",
        path: str = "project.faf",
    ) -> dict:
        """Create a starter .faf file with project name, goal, and language.
        Generates a valid FAF YAML file with all required sections.
        Will not overwrite an existing file — use faf_discover first to check."""
        if os.path.exists(path):
            return {"success": False, "error": f"File already exists: {path}"}
    
        content = f"""faf_version: '2.5.0'
    project:
      name: {name}
      goal: {goal or 'Describe your project goal'}
      main_language: {language or 'unknown'}
    stack:
      frontend: null
      backend: null
      database: null
      testing: null
    human_context:
      who: Developers
      what: {goal or 'What problem does this solve?'}
      why: Why does this project exist?
    ai_instructions:
      priority: Read project.faf first
      usage: Code-first, minimal explanations
    preferences:
      quality_bar: zero_errors
      commit_style: conventional
    state:
      phase: development
      version: 0.1.0
      status: active
    """
        Path(path).write_text(content)
        return {"success": True, "path": os.path.abspath(path), "message": f"Created {path} — edit to match your project"}
  • server.py:36-37 (registration)
    The tool registration mechanism. All tools in this file are registered via the @mcp.tool() decorator on line 39 for faf_read, but faf_init is specifically registered via @mcp.tool() on line 110, which is the decorator that registers it with the FastMCP server instance.
    # --- Tools ---
Behavior3/5

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

Discloses the non-overwrite behavior but does not describe what happens if the file already exists (e.g., error message, silent no-op). With no annotations, the description could be more thorough about behavioral outcomes.

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?

Three concise sentences, front-loaded with purpose, followed by output description and a key usage constraint. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 4 parameters, missing parameter 'path' and no description of the output schema (though it exists), the description feels incomplete. It covers the main idea but omits important details about file location and behavior on conflict.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, and while the description mentions 'project name, goal, and language', it does not describe the 'path' parameter or provide any details about defaults, formats, or constraints for any parameter.

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?

Clearly states it creates a starter .faf file with project name, goal, and language. Distinguishes itself from siblings like faf_discover (which checks for existing files) and faf_validate.

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?

Explicitly warns that it will not overwrite existing files and recommends using faf_discover first. This provides clear when-to-use and when-not-to-use guidance with an alternative 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

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/gemini-faf-mcp'

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