Skip to main content
Glama
rodhayl
by rodhayl

linter

Run code lints, validate syntax, or apply LLM-powered fixes to improve code quality and catch errors in your projects.

Instructions

Run lints, syntax validation, or LLM-assisted lint fixes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNoAction: run (check only), fix (LLM-powered fixes), validate (syntax check)
filesNoSpecific files to process
commandNoCustom lint command (for run action)
autoFixNoApply linter auto-fixes without LLM (for run action)
difficultyNoLLM fix difficulty level (for fix action)
dryRunNoPreview fixes without applying (for fix action)
maxFixesNoMaximum fixes to apply (for fix action)
contentNoContent to validate (for validate action, optional)
timeoutNoTimeout in milliseconds

Implementation Reference

  • The `runLinter` method in `ExecutionTools` class handles the execution of linting commands, supporting auto-detection and custom commands.
    async runLinter(options?: {
      command?: string;
      files?: string[];
      fix?: boolean;
      timeout?: number;
    }): Promise<ExecutionResult> {
      let command = options?.command;
    
      if (!command) {
        command = await this.detectLintCommand();
        if (!command) {
          return {
            success: false,
            exitCode: -1,
            stdout: '',
            stderr: 'Could not detect linter. Please provide a lint command.',
            duration: 0,
            command: '',
          };
        }
      }
    
      // Add fix flag if requested (ESLint style)
      if (options?.fix && command.includes('eslint')) {
        command = command.replace('eslint', 'eslint --fix');
      }
    
      // Append specific files if provided
      if (options?.files && options.files.length > 0) {
        command = `${command} ${options.files.join(' ')}`;
      }
    
      return this.executeCommand(
        command,
        this.workspaceRoot,
        options?.timeout ?? this.defaultTimeout
      );
    }
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. While it mentions 'fix' actions, it fails to disclose whether this modifies files destructively, creates backups, requires user confirmation, or produces side effects. It also omits expected return values or output behavior.

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 a single, efficient sentence with no redundant words. It immediately identifies the tool's three capabilities without filler, making it appropriately sized for quick parsing while front-loading the core functionality.

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

Completeness2/5

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

Despite 100% schema coverage, the description is insufficient for a 9-parameter tool with conditional parameter requirements and destructive 'fix' capabilities. With no annotations and no output schema, the description should disclose safety implications of file modifications and provide higher-level guidance on the action-specific workflows, which it does not.

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?

With 100% schema description coverage, the schema adequately documents all 9 parameters including action-specific constraints (e.g., 'for fix action'). The description lists the three operation modes (lints, validation, fixes) which map to the action enum, but adds no additional semantic context about parameter relationships or formats beyond the schema definitions.

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 provides clear verbs (run, validation, fixes) and identifies the resource (lints, syntax). It distinguishes the LLM-assisted capability, hinting at differentiation from standard formatters. However, it does not explicitly contrast with siblings like 'formatter', 'find_and_fix', or 'code_quality_analyzer' to help agents select the correct tool.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus siblings (formatter, find_and_fix, code_quality_analyzer) or when to prefer the 'run', 'fix', or 'validate' actions. There is no mention of prerequisites or conditions that would trigger selection of this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rodhayl/mcpLocalHelper'

If you have feedback or need assistance with the MCP directory API, please join our Discord server