Skip to main content
Glama
crunchtools

io.github.crunchtools/systemd

by crunchtools

unit_file_write_tool

Write or update a systemd unit file to set up a service, backing up existing files and reloading systemd after writing.

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

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden. It transparently states two significant side effects: it backs up any overwritten file and runs daemon-reload after writing. It also discloses an environmental requirement. This is strong transparency for a write tool.

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 two concise sentences with no filler. Each sentence earns its place: the first states the action and a key side effect, the second covers the prerequisite and post-write behavior. Information is front-loaded and easy to parse.

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?

Given the tool's moderate complexity and the presence of an output schema, the description covers the essential operational context: what it does, the bind-mount prerequisite, backup behavior, and daemon-reload side effect. It does not detail failure modes or permissions, but it provides enough for an agent to select and invoke the tool appropriately.

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?

Schema description coverage is 100%, so the schema already documents unit_name, content, start, and enable. The description does not add new meaning beyond the schema, but it does frame content as the full unit file contents and implies these parameters are for service setup. This meets the baseline but adds little extra.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: 'Write a new unit file for setting up a service.' It clearly indicates the tool's role and even hints that it may overwrite existing files (via backup). It does not explicitly contrast with sibling tools like unit_file_remove_tool, but the function is unambiguous from name and text.

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

Usage Guidelines3/5

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

The description provides a clear prerequisite—host unit directory must be bind-mounted—and notes that daemon-reload is run afterwards. However, it does not explicitly state when to choose this tool over siblings such as unit_file_remove_tool or unit_start_tool, leaving usage boundaries mostly implied by the name.

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