Skip to main content
Glama

configure_llm

Configure project LLM settings via local per-developer config, test connectivity with an API call, and get data security warnings for external endpoints.

Instructions

Configure LLM settings for the current project.

Writes to <project>/.fw-context/local.toml ONLY (gitignored, per-developer). Does NOT modify the global config or the shared project config.toml. After writing, tests the configuration by making a simple API call (skipped when LLM is disabled).

IMPORTANT: When chat_api_base points to an external host, source code snippets in chat prompts will be sent to that endpoint. Ensure this complies with your organization's data security policies. Consider using local Ollama or an internal API proxy first.

Args: project_root: Project root directory. Auto-detected if omitted. chat_api_base: Chat API URL (see description for format details). chat_api_key: Bearer token for cloud/proxy APIs. chat_api_format: Override auto-detection: "auto", "ollama", "openai". model: Chat model name. embed_model: Embedding model name (Ollama only). auto_pull: Whether to auto-pull models on 404. stream: Stream chat responses via SSE. True avoids reverse-proxy idle timeouts.

Returns: dict: {status ("ok"|"error"), chat_api (dict — configured, endpoint, format, model), model (str), auto_pull (bool), stream (bool), test_latency_s (float, on success), test_response (str, on success), compliance_warning (str, when chat_api_base is external), message (str)}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoChat model name. None = keep current.
streamNoStream chat responses via SSE (both OpenAI-compatible and Ollama-native). True = send stream:true, consume SSE chunks — avoids reverse-proxy idle timeouts (nginx 60s, Cloudflare 100s). None = keep current setting.
auto_pullNoAuto-pull models on 404 (Ollama only). False for intranet.
embed_modelNoEmbedding model name (Ollama only). None = keep current.
chat_api_keyNoAPI key for cloud/proxy APIs. None for local/no-auth.
project_rootNoProject root. Auto-detected if omitted.
chat_api_baseNoChat API URL. None = use local Ollama for chat. Auto-detects format: :11434 or /api/generate -> Ollama, /v1 or bare host -> OpenAI-compatible. Examples: 'https://api.deepseek.com/v1' (DeepSeek), 'http://localhost:4000' (LiteLLM), 'http://localhost:8080/v1' (llama.cpp). WARNING: external URLs send source code to that host.
chat_api_formatNoFormat override: 'auto' (default), 'ollama', or 'openai'.auto
Behavior5/5

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

With no annotations, the description fully carries the behavioral disclosure burden. It discloses writes to a specific gitignored file, explains the API call test after writing, and explicitly warns about source code leaving the machine when 'chat_api_base' is external. This is exceptionally transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is longer than average, but is well-structured with a lead sentence, an IMPORTANT security note, and labeled Args/Returns sections. Every sentence adds meaningful context (file scope, test behavior, compliance warning), so the length is justified for a complex tool with no output schema.

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

Completeness5/5

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

This tool has 8 parameters, no output schema, and no annotations, yet the description covers side effects (writes file, tests API call), exclusions (does not modify global config), security implications, and a detailed return dictionary. It is complete enough for an agent to safely invoke and interpret results.

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

Parameters3/5

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

The input schema already covers all 8 parameters with detailed descriptions (100% coverage), including examples and default behavior. The description's Args section largely restates the schema, adding minimal new semantics beyond an organized summary. It earns a baseline 3 because the schema does the heavy lifting.

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?

The description opens with 'Configure LLM settings for the current project' using a specific verb and resource, and immediately clarifies scope by naming the exact file written ('<project>/.fw-context/local.toml'). It distinguishes itself from siblings by emphasizing it only touches per-developer config, not global or shared files.

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?

It provides clear context on when to use (per-project local settings) and what it does not touch (global/shared config). It also gives a practical alternative: 'Consider using local Ollama or an internal API proxy first' when facing external endpoint security concerns, which serves as a when-not-to-use caution.

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/turbyho/fw-context-mcp'

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