Skip to main content

Reference Documentation

Complete reference materials for MCP JetBrains Code Inspections.

Reference Topics

API Reference

Complete API documentation:

  • Tool specifications
  • Parameter schemas
  • Response formats
  • Error codes

Changelog

Version history and release notes:

  • Feature additions
  • Bug fixes
  • Breaking changes
  • Migration guides

Quick Reference

get_jetbrains_code_inspections Parameters

ParameterTypeRequiredDefaultDescription
pathstring-File or directory to analyze

Configuration Environment Variables

VariableTypeDefaultDescription
FORCE_INSPECT_PATHstring-Force specific IDE inspect tool path
FORCE_PROJECT_ROOTstring-Force project root directory
FORCE_PROFILE_PATHstring-Force inspection profile path
INSPECTION_TIMEOUTnumber120000Timeout in milliseconds
EXCLUDE_INSPECTIONSstring (csv)-Inspection codes to exclude
ONLY_INSPECTIONSstring (csv)-Only include these inspection codes
RESPONSE_FORMAT"markdown"/"json"markdownOutput format
DEBUG"true"/"false"falseEnable debug logging

Severity Mappings

JetBrainsMCP/LSPNumericDescription
ERRORError1Must fix
WARNINGWarning2Should fix
WEAK WARNINGInformation3Consider fixing
INFOHint4Suggestion

Environment Variables

# Timeout configuration (milliseconds)
INSPECTION_TIMEOUT=120000

# Force specific IDE path
FORCE_INSPECT_PATH="/path/to/inspect.sh"

# Force project root
FORCE_PROJECT_ROOT="/path/to/project"

# Force profile path
FORCE_PROFILE_PATH="/path/to/profile.xml"

# Filter inspections
EXCLUDE_INSPECTIONS="UnusedDeclaration,SpellCheckingInspection"
ONLY_INSPECTIONS="NullableProblems,UnusedVariable"

# Output format
RESPONSE_FORMAT="markdown"

# Debug mode
DEBUG="true"

File Path Format

/absolute/path/to/file.ext
C:\Windows\path\to\file.ext # Windows
/relative/path/to/file.ext # Relative paths also supported

Error Reference

Common Error Codes

CodeMessageSolution
IDE_NOT_FOUNDNo JetBrains IDE foundInstall IDE or set path
TIMEOUTOperation timed outIncrease timeout
INVALID_URIInvalid file URICheck URI format
NO_PROFILEProfile not foundCreate inspection profile

Exit Codes

  • 0 - Success
  • 1 - General error
  • 2 - IDE not found
  • 3 - Timeout
  • 124 - Command timeout

Configuration Files

MCP Configuration

Location: .mcp-diagnostics.json or mcp.json

Inspection Profiles

Location: .idea/inspectionProfiles/

IDE Settings

Location: .idea/ directory

Supported File Types

All file types supported by installed JetBrains IDEs:

  • Programming languages (Java, Python, JS, etc.)
  • Markup (HTML, XML, JSON, YAML)
  • Configuration files
  • Documentation (Markdown)

Version Compatibility

MCP ServerJetBrains IDENode.js
1.0.0+2023.1+20.0+

See Also