Skip to main content
Glama

auto_fix

Automatically fix coding errors using pattern-based or AI-generated fixes. Preview changes with suggest mode, or apply fixes directly to files and project-wide.

Instructions

Attempt to automatically fix a coding error detected by the diagnostic watcher.

Byte will try a pattern-based fix first (fast, no AI needed). If the error is too complex, Byte returns a structured AI fix request that can be sent to Claude for an intelligent fix.

Modes:

  • "suggest": Show the fix without applying it (default, safe)

  • "apply": Apply the fix directly to the file (use with care)

  • "apply_all": Fix all auto-fixable errors in the project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoFix mode: suggest (preview), apply (write to file), or apply_allsuggest
fileNoFile path to fix errors in (required for suggest/apply)
lineNoSpecific line number to fix (optional, fixes first error if omitted)
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It reveals the tool's two-step process (pattern-based first, then AI fix) and the effects of each mode, including warnings for 'apply' ('use with care') and 'apply_all' ('Fix all auto-fixable errors'). This adds useful context beyond just the action.

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 concise and well-structured. It opens with a clear purpose, then explains the two-step process, and finishes with a bullet list of modes. Every sentence adds value without redundancy.

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

Completeness3/5

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

The description adequately explains the tool's behavior for fixing errors but lacks details about the return value or output format (e.g., what is returned after a simple fix vs. a complex AI fix request). Since there is no output schema, the description should compensate, but it is somewhat incomplete regarding post-action results.

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 coverage is 100%, so the baseline is 3. The description adds no new meaning beyond what the schema already provides: it repeats the mode values, file requirement, and line optionality. No additional parameter semantics are introduced.

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 tool's purpose: 'Attempt to automatically fix a coding error detected by the diagnostic watcher.' It specifies the verb 'fix' and the resource 'coding error'. The description also distinguishes from sibling tools like get_diagnostics and watch_diagnostics by focusing on the fix action rather than just viewing or monitoring.

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 explains the two approaches (pattern-based or AI fix) and the three modes (suggest, apply, apply_all). However, it does not explicitly state when to use this tool versus alternatives like get_diagnostics or scan_project. It implies it is for errors detected by the diagnostic watcher but lacks clear when-not or exclusionary guidance.

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/My-Outcasts/codepet-mcp-server'

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