llama-mcp-bridge
v1.7.0Hardware-aware local LLM MCP bridge for llama.cpp (7 GGUF models, 9 presets).
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_bridge_status Get Bridge Status
Return live JSON server health, hardware profile, and active preset catalogue. When to use: Discover available presets before calling ask_preset/ask_batch, check warm models, or diagnose OOM/timeout issues. When NOT to use: Not needed as a pre-flight check before routine queries (inference tools start the server automatically when offline). Behavior: Performs an uncached HTTP probe of llama-server (falling back to standby/offline) without spawning or loading models.
ask_preset Ask Preset
Run a single prompt (with optional workspace files, images, JSON schema, or SSE streaming) against any configured [preset]. When to use: Any single-prompt inference task—file-grounded analysis (file_paths + overflow_strategy), vision queries (image_path/image_paths), structured JSON (json_schema), or custom [preset] calls. When NOT to use: Running 2+ independent prompts against the same preset in parallel (use ask_batch), or preloading/unloading without inference (use warmup_model / unload_model). Behavior: Ranks file_paths by BM25 relevance against prompt, budgets context via POST /tokeniz…
| Parameter | Type | Description |
|---|---|---|
preset * | string | Target [preset] section name from models.ini. |
prompt * | string | User prompt to send to the preset. |
audio_path | Optional single audio file path for audio-capable presets. | |
audio_paths | Optional list of audio file paths for audio-capable presets. | |
file_paths | Optional files, directories, or globs to attach. | |
file_slices | Optional 'path:line' or 'path:start-end' slices prepended ahead of file_paths. | |
gitignore_paths | Extra .gitignore file paths. | |
ignore | Additional glob patterns to ignore. | |
image_path | Optional single image path for vision presets. | |
image_paths | Optional list of image paths for vision presets. | |
include | Glob patterns overriding .gitignore and ignore. | |
json_schema | Optional JSON Schema dict for structured output. | |
max_tokens | integer | Maximum tokens to generate. |
output_path | Optional workspace-bounded output file path (used for TTS audio or saving text output). | |
overflow_strategy | string | Context overflow handling: truncate (default), chunk, or error. |
render_paths | Optional .pdf/.svg/.mmd paths rendered ephemerally to PNGs for vision presets. | |
search_query | Optional keyword query to locate matching code/doc slices via adaptive_window expansion. | |
show_thinking | Optional override to preserve <think> reasoning in output (forced False when json_schema is set). | |
stream | boolean | Accumulate SSE stream chunks if true. |
system_prompt | Optional system prompt override (defaults to models.ini or built-in persona). | |
timeout_s | Per-call HTTP timeout override in seconds. | |
use_embeddings | boolean | Optional flag to fuse /v1/embeddings semantic ranks with BM25 via RRF. |
use_gitignore | boolean | Respect .gitignore rules when expanding directories. |
ask_batch Ask Batch
Execute N independent prompts concurrently against a single models.ini preset, bounded by its parallel slot count. When to use: Fanning out 2+ independent prompts (classifications, per-item extractions, parallel checks) to the same preset in one round-trip. When NOT to use: Single prompts or queries requiring file_paths or images (use ask_preset). Behavior: Preserves the exact input order of prompts (results[i] maps to prompts[i]) and returns individual item failures inline as Error: entries without aborting sibling prompts. Optional audio_paths and output_paths align positionally 1-to-1 by i…
| Parameter | Type | Description |
|---|---|---|
preset * | string | Target [preset] section name from models.ini. |
prompts * | array | List of prompts to execute in parallel. |
audio_paths | Optional per-item audio file path(s) matching prompts. | |
file_slices | Optional per-item 'path:line' / 'path:start-end' slice lists matching prompts. | |
json_schema | string | Optional JSON Schema string for structured output. |
output_paths | Optional per-item workspace-bounded output file paths matching prompts. | |
show_thinking | Optional override to preserve <think> reasoning in output (forced False when json_schema is set). | |
system_prompt | Optional shared system prompt override. | |
timeout_s | Per-call HTTP timeout override in seconds. |
warmup_model Warmup Model
Preload a preset into VRAM/RAM via POST /models/load and acquire or extend an in-memory idle lease (idle_timeout_seconds). When to use: Before latency-sensitive interactive turns or multi-step loops where cold-load latency should be paid upfront. When NOT to use: One-off queries or stingy residency setups where models unload immediately. Behavior: Enforces models_max; skips reload and extends the active lease if already warm, evicts the oldest unleased idle model when full, or returns {"ok": false, "error": ...} if all slots hold unexpired leases.
| Parameter | Type | Description |
|---|---|---|
preset * | string | Preset name from models.ini to warm up. |
idle_timeout_seconds | Optional in-memory idle lease override in seconds for this session. |
unload_model Unload Model
Cancel any active idle lease on a preset and evict it from VRAM/RAM via POST /models/unload. When to use: Reclaiming GPU memory immediately for external workloads or before loading a larger model under tight models_max. When NOT to use: Routine post-query cleanup (idle models unload automatically after sleep_idle_seconds). Behavior: Idempotent; cancels the lease immediately and evicts the model slot via POST /models/unload once active generation completes or aborts (succeeding cleanly in standby/stopped states).
| Parameter | Type | Description |
|---|---|---|
preset * | string | Target [preset] section name from models.ini to evict from VRAM/RAM (e.g. 'digest', 'coder', 'vision'). |