Llama-cpp Tools A developer is using llama-cpp's tool-calling feature to let large language models execute system commands such as reading files and editing code, comparing the approach to bash scripting but easier to maintain. The method involves saving instructions in a Markdown file and referencing it in a prompt, enabling the LLM to perform tasks like editing Rust programs or creating backups via sequential tool calls. Recently I have been experimenting with llama-cpp and its Tools , which are provided to the LLM to make system calls. For example there are "read file" or "get date time" tools. I realized that programs like OpenCode are essentially the same thing as llama-cpp with tools. With a prompt, I managed to have Gemma 4 and Qwen 3.6 edit a Rust program file. It is necessary to include in the prompt the project's location, and what you want to have it do. Instead of including all the exact details in a prompt, it is possible to save the instructions in a file like a Markdown file and specify the file's path in a prompt. The LLM will then read the file in a tool call and perform the necessary actions. For example, I create a Markdown file that has instructions on creating a backup file. An LLM using a series of tool calls in llama-cpp is similar to bash script with terminal commands , but using a prompt is easier for humans to maintain and read. To enable tool calls in llama-cpp , specify the "tools" argument with the value "all".