Skip to main content
Glama

find_naming_violations

Check Java code for naming violations: PascalCase classes, camelCase methods/fields, UPPER_SNAKE_CASE constants. Scan single file or entire project.

Instructions

Check code against standard Java naming conventions.

USAGE: find_naming_violations(filePath="path/to/File.java") OUTPUT: List of naming convention violations

Conventions checked:

  • Classes/interfaces/enums: PascalCase

  • Methods: camelCase

  • Fields: camelCase

  • Constants (static final): UPPER_SNAKE_CASE

  • Parameters: camelCase

If filePath is omitted, scans all project files.

Requires load_project to be called first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathNoFile to check (omit to scan all files)
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes a read-only analysis that returns violations, and mentions the prerequisite. It could be improved by explicitly stating it does not modify code, but it is sufficiently transparent for a non-destructive scanning tool.

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: purpose, usage, output, conventions list, and note on prerequisite. Every sentence contributes useful information without redundancy.

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

Completeness5/5

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

Given there is no output schema, the description explains the output format (list of naming convention violations). It also covers conventions, prerequisite, and parameter usage, making it complete for an AI agent to invoke correctly.

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?

The input schema has 100% coverage with a description for filePath. The description adds value beyond the schema by showing usage syntax, explaining default behavior (scan all if omitted), and listing conventions checked. While the schema already describes the parameter, the description provides practical context.

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 checks code against standard Java naming conventions, with a specific verb ('Check code') and resource ('standard Java naming conventions'). It provides explicit details on the conventions checked, distinguishing it from sibling analysis tools that focus on other aspects like control flow or type analysis.

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

Usage Guidelines5/5

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

The description includes a usage example, explains that omitting filePath scans all files, and explicitly states the prerequisite 'Requires load_project to be called first.' This gives clear guidance on when and how to use the tool, and implies it should be used after loading the project.

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/pzalutski-pixel/javalens-mcp'

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