Skip to content

Llm With Tools

Invoke a local model with restricted work-buddy MCP tool access, so it can look things up (projects, tasks, journal, context) while answering. Tool access is limited to a named preset defined in work_buddy/llm/tool_presets.py (currently: 'readonly_safe', 'readonly_context'). No arbitrary tool list accepted at call time — presets are the security boundary. Requires 'profile' and 'tool_preset'.

MCP name: llm_with_tools

Category: llm

Parameters

Name Type Required Description
max_tokens int No Output budget. Default 4096 (tool-calling eats tokens).
persist_tool_results bool No When True, raw MCP tool outputs are saved to the artifact store and the artifact id is embedded in each tool_calls entry (output_artifact_id). Default False — responses contain only tool-call metadata, not raw output. Errors auto-escalate to persist regardless of this flag.
previous_response_id str No Continue a prior LM Studio stateful-chat turn
profile str Yes Named local profile (e.g., 'local_general') — must be LM Studio-backed
required_capabilities list[str] No Optional list of capability names the model MUST be able to call (e.g. ['update-journal', 'journal_write']). Pre-flight checked against the preset; if any are missing, the call fails fast with an explicit error. Use this to catch goal-preset mismatches — e.g. running a workflow from a read-only preset that doesn't include the workflow's name.
store bool No Let LM Studio retain this turn server-side (default False)
system str Yes System prompt (becomes 'instructions' on the native chat request)
temperature float No Sampling temperature (default 0.0)
tool_preset str Yes Named whitelist of allowed work-buddy tools. Currently: 'readonly_safe', 'readonly_context'. Presets are code, not config — defined in work_buddy/llm/tool_presets.py.
user str Yes User query (becomes 'input')