Skip to main content
Glama

Style Guardian

mcp_m7_style_guardian

Learns your project's code style patterns, then validates, checks, and auto-fixes code to enforce those conventions.

Instructions

M7 v3.0 Style Guardian - Learn and enforce code style patterns.

Actions:

analyze

Analyze a project/directory to learn style patterns.

  • path: Directory path to analyze (required)

validate

Validate code against learned style profile.

  • code: Code to validate (required)

  • file: File path for context

check

Quick check for errors only (blocking issues).

  • code: Code to check (required)

  • file: File path

fix

Auto-fix code where possible.

  • code: Code to fix (required)

  • file: File path

learn

Record a user correction for learning.

  • original: Original (wrong) code (required)

  • corrected: Corrected code (required)

  • file: Source file

  • context: Additional context

profile

Get current style profile.

stats

Get learning statistics.

export

Export all corrections as JSON.

import

Import corrections from JSON.

  • corrections: JSON string of corrections (required)

clear

Clear all learned data.

Input Schema

NameRequiredDescriptionDefault
codeNoCode to validate
fileNoFile path for context
pathNoPath to analyze (file or directory)
actionYes
formatNoOutput formattext
contextNoAdditional context
originalNoOriginal (wrong) code
correctedNoCorrected code
correctionsNoJSON string of corrections to import

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.18.1

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose useful behavior: analyze learns patterns, validate uses the learned profile, check returns only blocking issues, fix mutates code. But it does not warn that 'clear' irreversibly destroys all learned data, say where corrections are persisted, or explain whether 'fix' writes to the file path given.

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?

Front-loaded with a domain one-liner followed by a scannable action-per-heading structure, which suits a ten-action dispatcher. It is slightly verbose in places and omits nothing wasteful, though the header repetition could be tighter.

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?

For a ten-action, nine-parameter tool with no annotations and no output schema, the description should describe what each action returns (profile shape, stats contents, validate result fields). It covers inputs well but leaves output semantics entirely unspecified, and never explains the 'format' parameter's effect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 89%, so the baseline is 3, but the description adds real value by mapping parameters to actions and marking which are required per action (path for analyze, code for validate/check/fix, original+corrected for learn, corrections for import). The 'format' parameter is the only one left undocumented.

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 one-liner states a specific verb pair and resource ('Learn and enforce code style patterns'), and the action list disambiguates each mode (analyze, validate, check, fix, learn, profile, stats, export, import, clear). It does not differentiate itself from overlapping siblings such as mcp_m7_validate, mcp_m7_get_patterns, or mcp_m7_check_errors, which is why it falls short of a 5.

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?

Each action has a short gloss, and 'check' is distinguished from 'validate' as looking for blocking issues only, which implies a usage split. However, there is no explicit guidance on when to pick this tool over the many sibling validate/pattern tools, and no statement of preconditions (e.g., that validate requires a prior analyze/learn).

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