Skip to main content
Glama
crunchtools

io.github.crunchtools/systemd

by crunchtools

Unit File Write Tool

unit_file_write_tool

Write or replace a systemd unit file, backing up existing files and automatically running daemon-reload. Ensures service configuration changes take effect.

Instructions

Write a new unit file for setting up a service. Backs up any file it overwrites.

Requires the host's unit directory (default /etc/systemd/system) to be bind-mounted into the container. Runs daemon-reload after writing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startNoStart the unit after writing
enableNoEnable the unit after writing
contentYesFull contents of the unit file
unit_nameYesBare unit file name (e.g. "myapp.service")

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It discloses that the tool overwrites files with a backup and runs daemon-reload after writing, which are critical side effects. It does not describe error cases or permission requirements, but the disclosed behaviors are the most important for safe invocation.

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

Conciseness5/5

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

The description is compact and well-structured: it states the core action first, then the safety behavior, then the operational prerequisite and post-write action. Every sentence adds necessary information without padding.

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

Completeness4/5

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

The description covers the main operational context: what the tool does, overwrite/backup behavior, the bind-mount requirement, and daemon-reload side effect. Since an output schema exists, return-value documentation is not required here. It is complete enough for an agent to invoke the tool correctly, though it could mention behavior when the unit already exists.

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 provides 100% parameter coverage with clear descriptions for all four parameters. The tool description adds no additional parameter-level meaning, so the baseline score of 3 is appropriate.

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 names a specific verb ('Write') and resource ('unit file') and states its purpose ('setting up a service'). It also signals overwrite behavior with backup, which helps distinguish it from read-only unit tools and unit_file_remove_tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context: it is the tool for writing unit files as part of service setup, and it states an important environmental prerequisite (bind-mounted unit directory). It does not explicitly name alternatives or when-not-to-use cases, but the context is sufficient for an agent to select it appropriately.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.