Skip to main content
Glama

Lint model

lint_model
Read-onlyIdempotent

Lints PyTorch model designs for rule violations, reports rule IDs, and suggests fix diffs for CI use.

Instructions

Find design-rule breaks (head-dim/GQA divisibility, norm order, dropout, missing residuals) with rule ids, as CI does. suggest_fix makes diffs. Offline.

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": "lint_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
severityNoMinimum. Default: all.
model_pathNoFile, zoo:<id>, hf:<org/name>
model_sourceNoOptional: answer about model text passed inline (a .neurarch.json document or PyTorch source).
response_formatNoDefault concise.

Output Schema

NameRequiredDescriptionDefault
cleanYes
countsYes
findingsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.22.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description's job is to add context — and it does: output carries rule ids, behavior matches CI, the operation is offline, and remediation is delegated to suggest_fix. There is mild tension between 'Offline' and openWorldHint=true, but given model_path accepts hf:<org/name>, that is most likely a conservative annotation rather than an outright contradiction.

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?

Three tight fragments, front-loaded with the verb and the check list, then the alternative and the offline note. The telegraphic style ('head-dim/GQA divisibility', 'Offline.') is efficient but slightly costs readability, so not a full 5.

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

Completeness4/5

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

With an output schema present the description needn't explain return values, and it covers scope, rule set, CI parity, offline behavior, and the fix-tool boundary. What it omits — severity semantics and the inline model_source mode — is covered by the schema, so an agent can call it correctly.

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% and both enums (severity, response_format) are documented inline, so the schema carries parameter meaning. The description adds nothing about severity thresholds, the model_source inline-text mode, or how model_path forms interact with the offline claim, leaving it at the baseline.

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 specific verb ('Find design-rule breaks') plus the enumerated rule families it checks (head-dim/GQA divisibility, norm order, dropout, missing residuals) and the output form (rule ids). It explicitly sets itself apart from suggest_fix, which 'makes diffs', so an agent can pick between the two without opening a schema.

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?

'as CI does' gives a concrete usage context (parity with CI linting) and 'suggest_fix makes diffs' routes remediation work to the alternative. What's missing is any when-not-to guidance or a pointer to the analysis siblings (check_design, trace_model), so the routing is clear but not exhaustive.

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