Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FAF_SHOW_ADVANCEDNoIf set to 'true', enables 34 advanced MCP tools in addition to the 21 core tools (totaling 55 tools).

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Two jobs: the project's context (project.faf) and its memory (.fafm). For questions about the project (stack, goal, commands), read project.faf first and answer from it. Context: faf_score shows what is missing; faf_trust checks it is well-formed; faf_init creates one; faf_sync writes the context files from it, one way: the ones that exist (CLAUDE.md, .cursorrules, .windsurfrules, .clinerules), or CLAUDE.md when there are none. Memory: refresh_faf re-reads project.faf and reports drift since the last load; refresh_fafm reloads named souls; refresh_blend does both. faf_get_orchestration_policy shows the policy without running faf_orchestrate_recommendation. rag_query needs an xAI Collection: XAI_API_KEY set (XAI_COLLECTION_ID picks the collection). Without the key, use the faf_ tools.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
faf_scoreA

Score a project's AI-readiness 0–100% against the fixed 33-slot context model — how much project DNA an agent has before it has to guess. Deterministic: the same .faf always scores the same. Returns the score, tier, and per-slot breakdown.

refresh_fafB

Re-ground on the live .faf — re-read + re-score the current project DNA, report drift vs your last-known score, and return the fresh context. The explicit re-grounding primitive for long sessions: drift → refresh → re-grounded. Built for Grok, by request.

refresh_fafmA

Reload the latest structured memory (.fafm) for one or more souls into the current session. Returns a stamped delta by default (added/updated facts since last refresh or a given timestamp). Use verbatim: true to receive the full current .fafm content instead. Reads your files and writes a refresh receipt (.fafm-refresh-receipts.json) to the project folder. Always returns a content hash + timestamp stamp. Complements recall, load_soul, and etch — does not replace them.

faf_orchestrate_recommendationA

Heavy orchestrator — given current substrate state, returns a structured recommendation about drift: which refresh to call (or no_action), why, how severe, and the underlying signals. ADVISORY ONLY — never auto-fires. Composes the full 1.5 substrate (drift detection · contradiction check · repeat-offender · take-a-hint · refresh history). Writes a recommendation receipt on every call (auditable trail, no silent decisions). Read-only WRT substrate state.

faf_get_orchestration_policyA

Introspect the effective orchestration policy WITHOUT running the orchestrator. Returns { tier, thresholds, source, overrides_applied } — what aggressiveness tier the next faf_orchestrate_recommendation call would use, and whether it came from defaults or a .faf:orchestration: override. No drift detection, no signals, no receipt — pure introspection. Read-only.

refresh_blendA

Baked-in two-intensity refresh (Cmd+R / Cmd+Shift+R analog). Fires BOTH refresh_faf + refresh_fafm in one call. mode: "blend" (default) = light .faf + delta .fafm — the everyday re-ground. mode: "nuke" = light .faf + verbatim .fafm — the hard reload for polluted session memory. Intensity matches drift rate per layer.

faf_initA

Create a project.faf — the IANA-registered context file (application/vnd.faf+yaml) that gives Grok persistent project DNA (stack, structure, intent) in one portable file, so an agent reads the whole project cold each session instead of re-discovering it. Writes project.faf to the target directory (created if missing) and refuses to overwrite an existing context file unless force is set. Run once at project start, or with force to regenerate, then call faf_score to check readiness. Returns a text confirmation with the written file path and the detected project type.

faf_trustA

Validate a project.faf with faf-cli — confirm the context file is well-formed and parses cleanly before an agent grounds on it, and report its always-33 score. The pre-flight trust check: never build on a broken context layer.

faf_syncA

Sync project.faf into your AI context files: the ones that exist (CLAUDE.md, .cursorrules, .windsurfrules, .clinerules), or CLAUDE.md when there are none (target: all writes every one). Non-destructive: puts a structured .faf block at the top and keeps your own text; a file faf cannot safely write (not UTF-8, a link out of the project) is left unchanged and named in the reply. One way: never writes project.faf.

rag_queryB

Ask a question with RAG-enhanced context from xAI Collections. Uses LAZY-RAG cache for 100,000x speedup on repeated queries.

rag_cache_statsA

Get LAZY-RAG cache statistics - hits, misses, hit rate, cache size

rag_cache_clearA

Clear the LAZY-RAG cache — drop all cached retrievals so the next rag_query rebuilds from source. Use when the underlying context has changed and you want fresh results instead of cached ones.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
Current FAF ContextCurrent project FAF context and metadata
FAF Status SummaryProject health and AI readiness status
FAF Working DirectoryFile system access for FAF operations

TDQS

B3.4/5.0

Scored across 12 tools

Disambiguation2/5

The refresh/score cluster has genuinely unclear boundaries: refresh_faf, refresh_fafm, and refresh_blend overlap, with refresh_blend literally composing the other two, and faf_orchestrate_recommendation exists mainly to advise which of them to call. Similarly, faf_score and faf_trust both report scores (0-100% vs always-33), and refresh_faf also re-scores, so an agent has several plausible entry points for the same outcome. The RAG tools are cleanly separated, but the core FAF family is muddy.

Naming Consistency2/5

Two competing paradigms coexist: noun-prefixed actions (faf_sync, faf_trust, faf_score, faf_init) and verb-first actions (refresh_faf, refresh_fafm, refresh_blend), plus an outlier like faf_get_orchestration_policy that breaks the faf_<verb> pattern. The rag_ namespace is consistent, but the overall set mixes verb placement and prefixes, making it hard to predict a tool name from its action.

Tool Count4/5

Twelve tools sit comfortably in the well-scoped 3-15 range for a context-management server, and the RAG trio plus the core FAF lifecycle each justify their existence. However, the refresh family (refresh_faf, refresh_fafm, refresh_blend, plus an orchestrator) could arguably be consolidated, so it is slightly over-provisioned rather than perfectly tight.

Completeness3/5

The surface covers create (faf_init), read/score (faf_score, refresh_faf), validate (faf_trust), sync (faf_sync), and RAG, but there is no direct edit/update or delete operation for project.faf. The .fafm memory lifecycle is also partial here — refresh_fafm explicitly defers to external recall/load_soul/etch tools that are not in this server, leaving gaps an agent must work around.

Maintenance

ActivityActive
ResponsivenessNo recent community issues