TrueNAS Labs - MCP Server

Any specifics you can share on what you had to fix? It’s not clear to me if this was on the MCP tool descriptions side, or just instructions to your LLM on how you wanted to define its behavior.

FWIW, if you have 100% defined actions that you want taken exactly the same each and every time, then absolutely scripts make sense. Making an LLM write a script once that gets run identically every time is always better for that kind of workflow. No different than asking a human to take the exact same 25 UI steps in a process, no deviations and no mistakes. You are better off scripting that process entirely.

Heaven forbid that I should ever have to use such technology myself. I still use vi and am a firm believer in compartmentalisation. :sweat_smile:

The system (or rather, the network segment) on which I was allowed to work had an MCP server that simply provided metrics from the logging system and configuration parameters, along with the associated tools for monitoring and reporting. The problem was that there were no predefined functions or detailed workflows for specific inputs or jobs. The controlling machine was thus able to devise various ‘solutions’ and, using the range of tools available, sometimes came up with quite creative approaches. The main task (reporting) was handled relatively well, but implicit tasks were rather so-so. (e.g.: log rotation; sometimes compressed archives, sometimes uncompressed; varying naming conventions for archive files; files were occasionally deleted; on a few occasions, the logs were moved to a different directory.)

I therefore had the available toolset’s granularity effectively reduced and simply created scripts for tasks that needed to be carried out at predictable, regular intervals or that had to be performed in exactly the same way to ensure compliance with guidelines. These scripts were, in turn, integrated as tools into predefined workflows.

Hence my question: Are ‘best practices’ for TrueNAS (as found in the documentation, for example) defined as predefined workflows?

Hey, you can have my vi when you pry it from my cold dead fingers :wink: But that said, the new tech is also very cool and serves a purpose, just like most things in computing.

In your examples, the script absolutely was the right way to go. You had a set of pre-defined deterministic actions that you wanted taken at specific times. Again, picture a human operator in that seat, you wouldn’t ask somebody to manually grab files, rename, move organize stuff like that in a loop would you? Or if you did, you’d be automating it at some point to avoid the human error right? An LLM is no different here.

As for specific best-practices, they will vary widely based on the workflow. In my case, I use the MCP + LLM to do things that I wouldn’t script normally. I.E. I have it running periodic health checks on my system, how are things looking? Anything weird that need my attention? If you notice I’m using more space, tell me what the largest consumer is. Do my apps have updates? Based on the amount and specific app updates, give me an update strategy and order to execute, with my final sign-off to get done. Or I use it for ad-hoc one-shot operations that would normally require logging into the UI. I.E. go make that dataset, setup a new share, start or stop that replication job. Things that I don’t do often enough, or the same way enough to justify scripting.

Using it in that manner makes sense, where you are leveraging the reasoning ability of the LLM to help you gather facts and make better operational decisions. Especially where the system state or the inputs is messy and not going to always be deterministic.

Good real world example: I had an app update not too long back, can’t recall which, probably Immich. But an update was available and the LLM read the app description / notes in advance, warned me that one of the settings I was using was deprecated and automatically suggested a plan to remediate before updating. That kind of thing is quite handy, since my process before would have been to click “update”, watch it fail, and then go back and read the notes and logs to see why. All while being annoyed at myself for not checking in the first place.