Skip to main content
Glama

Suggest fix

suggest_fix
Read-onlyIdempotent

Convert PyTorch lint findings into exact or proposed diffs, and optionally save a patched copy without altering the source file.

Instructions

Turn lint findings on a .py into diffs (exact or proposal). Read-only; with --write, save_to also saves a patched copy, never the source.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "suggest_fix"
  }
}

Input Schema

NameRequiredDescriptionDefault
ruleNoOnly this rule id.
layerNoOnly this layer.
save_toNoWrite the patched file (exact fixes, --write).
severityNoMinimum. Default warn.
model_pathNoFile, zoo:<id>, hf:<org/name>
model_sourceNoOptional: answer about model text passed inline (a .neurarch.json document or PyTorch source).

Output Schema

NameRequiredDescriptionDefault
fixesYes
notFixableYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.22.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds the important nuance: a patched copy can be written via save_to while the source file is never modified. That resolves the apparent tension between 'writes a file' and 'read-only'. It stops short of saying whether the patched copy is overwritten or what happens if save_to is set without write mode enabled.

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?

Two compact sentences with the core action front-loaded and the safety caveat immediately after. The reference to a CLI-style '--write' flag inside a tool description is the only piece of clutter, since it is not a parameter the agent can set.

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?

An output schema exists, so return values need no explanation, and the read-only/write caveat is covered. However, the mention of '--write' — absent from the schema — leaves ambiguity about how to actually trigger the patched-copy write path, which is the one operationally risky detail an agent needs.

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 six parameters are already documented, and the description only adds the 'exact or proposal' distinction plus the 'never the source' guarantee for save_to. It does not explain which parameter or flag selects exact vs proposal output, nor how the --write flag referenced relates to the save_to parameter.

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?

States a specific verb and resource: turns lint findings on a .py file into diffs, in either exact or proposal form. That distinguishes it from the check_*/lint_model siblings, which surface findings rather than fixes, though the description never names those siblings explicitly.

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 phrase 'Turn lint findings ... into diffs' implies this is a downstream step after linting, which is useful context, but there is no explicit when-to-use/when-not statement and no named alternative for obtaining the findings first. An agent must infer that lint_model or check_edit is the prerequisite.

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