Skip to main content
Glama

kernel/system-control

DestructiveIdempotent

Read or write Linux kernel parameters (sysctl) at runtime via /proc/sys to adjust network, memory, or other kernel settings without rebooting.

Instructions

Reads or writes a kernel parameter (sysctl) at runtime through /proc/sys. With value omitted it reads: key (dotted net.ipv4.ip_forward or slash form; a directory such as net.ipv4 prints its subtree) returns key = value lines, and read_all: true (only when key is empty) prints every parameter, thousands of lines, uncapped. Reading needs no grant. With value it WRITES: that needs privileged: true and a grant, is refused for keys outside the user's sysctl.write_keys globs in mcp-sudo.yaml, and the reply shows the value the kernel now holds. Writes last until reboot; nothing is persisted to /etc/sysctl.d. For OS and kernel version use system/os-release, for memory figures memory/usage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoKernel parameter name, dotted (net.ipv4.ip_forward) or slash form (net/ipv4/conf/eth0.100/rp_filter). A directory (e.g. net.ipv4) reads its whole subtree.
valueNoValue to write (single line). If omitted, the parameter is read. Writing needs privileged: true and a matching sysctl.write_keys grant
read_allNoOnly when key is empty: read every parameter (thousands of lines, uncapped)
privilegedNoRun as root - required for writes. Needs a grant for this tool in mcp-sudo.yaml

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.1
    • changedInput schema / properties / privileged / description
      Previous value: -"Run as root - required for writes"New value: +"Run as root - required for writes. Needs a grant for this tool in mcp-sudo.yaml"
    • changedInput schema / properties / read_all / description
      Previous value: -"If true, reads all available parameters. Ignored if key is set."New value: +"Only when key is empty: read every parameter (thousands of lines, uncapped)"
    • changedInput schema / properties / value / description
      Previous value: -"Value to set for the parameter. If omitted, reads the parameter."New value: +"Value to write (single line). If omitted, the parameter is read. Writing needs privileged: true and a matching sysctl.write_keys grant"
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint=true, readOnlyHint=false) by disclosing that reads need no grant, writes require privileged:true plus a sysctl.write_keys grant from mcp-sudo.yaml, are refused outside those globs, last only until reboot, and are never persisted to /etc/sysctl.d. This is exactly the mutation-risk context an agent needs.

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

Conciseness4/5

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

Dense but front-loaded: read semantics first, then write semantics, then persistence caveats, then sibling routing. Every clause carries information, though the single long paragraph could be broken up slightly for scanability.

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

Completeness5/5

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

For a complex dual-mode tool with no output schema, the description covers return format ('key = value' lines, subtree listing, uncapped read_all output), permission model, persistence, and alternatives. Nothing an agent needs to invoke it correctly is missing.

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 all four parameters including dotted/slash key forms and the read_all/key dependency. The description largely reinforces that content, adding only minor framing (reply shows resulting value), so baseline 3 applies.

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?

States a precise verb+resource: reads or writes a kernel parameter (sysctl) via /proc/sys, and immediately disambiguates read vs write mode by the presence of `value`. An agent can distinguish this from siblings like system/os-release or memory/usage without opening the schema.

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

Usage Guidelines5/5

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

Explicitly routes elsewhere for adjacent needs ('For OS and kernel version use system/os-release, for memory figures memory/usage') and states the condition governing read_all ('only when key is empty'). Reading vs writing selection is spelled out with prerequisites for each.

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