Skip to main content
Glama

lint_script

Pre-scan an entire shell script for destructive commands before saving or running it. Returns line-numbered warnings for risky operations like rm -rf /, curl | sudo bash, and disk writes.

Instructions

Safety-scan a WHOLE shell script (multi-line text) BEFORE writing or running it. Runs the same offline danger engine as check_command_safety over every logical line (comments/shebangs stripped, backslash-continuations joined) and returns each destructive or risky command with its line number: rm -rf /, curl | sudo bash, dd/mkfs/shred to a device, chmod -R 777 /, git push --force, CI ${{ }}-injection sinks, and more. Ideal for an AI agent to pre-scan a script it just generated before saving or executing it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesThe full shell-script text to scan (may contain many lines).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.27.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the offline danger engine, comment/shebang stripping, backslash-continuation joining, and line-numbered results, and frames the operation as non-destructive (pre-write/pre-run scan). This is substantial behavioral context.

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?

The description is front-loaded with the core action and purpose, followed by processing details and a use-case sentence. It is efficient, though 'BEFORE writing or running' and 'before saving or executing' are slightly redundant.

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 one-parameter tool with no output schema, the description covers what input to provide, how it is processed, what is returned (dangerous commands with line numbers), and when to use it. It also connects to the related check_command_safety engine, leaving no critical gap for correct invocation.

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 schema already describes the single 'script' parameter as 'The full shell-script text to scan (may contain many lines)' at 100% coverage, so the baseline is 3. The description reinforces that the input is multi-line and processed by logical lines, but does not add fundamentally new parameter-level semantics.

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 clearly states the verb ('safety-scan') and resource ('a WHOLE shell script'), and specifies the output: destructive or risky commands with line numbers. It also distinguishes itself from sibling check_command_safety by emphasizing whole-script, multi-line scanning rather than single commands.

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?

It explicitly says to use this 'BEFORE writing or running' a script and positions it as a pre-scan for AI agents. It implies a contrast with check_command_safety ('same offline danger engine ... over every logical line') but does not explicitly say when to choose one sibling over the other.

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

Deploy Server

Other Tools