Skip to content

Commit 2c42255

Browse files
committed
docs: comprehensive documentation update for prompts and resources
- Added complete MCP features guide with prompts and resources documentation - Updated API reference with detailed prompts/resources sections - Added integration examples and best practices - Updated changelog with new features - Created new documentation page for MCP features guide
1 parent 247cd01 commit 2c42255

File tree

3 files changed

+635
-3
lines changed

3 files changed

+635
-3
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
- **MCP Prompts Support**: Added 3 pre-configured prompts for common inspection tasks
12+
- `analyze-project`: Analyze entire projects with optional profile selection
13+
- `check-file`: Quick single file inspection
14+
- `fix-issues`: Get fix suggestions filtered by severity
15+
- **MCP Resources Support**: Added 3 server resources for runtime information
16+
- `inspection://profiles`: Available inspection profiles list
17+
- `inspection://config`: Current server configuration
18+
- `inspection://ides`: Detected JetBrains IDEs on the system
19+
- **Enhanced MCP Capabilities**: Server now advertises prompts and resources capabilities
20+
- **Comprehensive Test Suite**: New test script for validating all MCP features
21+
- **Documentation Updates**: Complete API reference for prompts and resources
22+
23+
### Fixed
24+
- **Build Dependencies**: Updated @modelcontextprotocol/sdk to v1.17.4 for full feature support
25+
- **Type Definitions**: Fixed TypeScript type errors in IDEDetector and RequestHandlers
26+
1027
## [1.0.0] - 2025-01-09
1128

1229
### 🎉 Initial Release

docs/usage/api-reference.md

Lines changed: 163 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,28 @@ description: Complete API documentation for the MCP tool
66

77
# API Reference
88

9-
Complete documentation for the `get_jetbrains_code_inspections` MCP tool.
9+
Complete documentation for the MCP JetBrains Code Inspections server, including tools, prompts, and resources.
1010

11-
## Tool Overview
11+
## MCP Features Overview
12+
13+
The server provides three types of MCP features:
14+
15+
### 🔧 Tools
16+
- **get_jetbrains_code_inspections**: Run code inspections on files/directories
17+
18+
### 💬 Prompts
19+
- **analyze-project**: Analyze a project for code quality issues
20+
- **check-file**: Check a specific file for issues
21+
- **fix-issues**: Get suggestions to fix detected issues
22+
23+
### 📚 Resources
24+
- **inspection://profiles**: List of available inspection profiles
25+
- **inspection://config**: Current MCP server configuration
26+
- **inspection://ides**: List of detected JetBrains IDEs
27+
28+
---
29+
30+
## Tools API
1231

1332
### Tool Name
1433

@@ -258,9 +277,150 @@ type SeverityLevel = 'error' | 'warning' | 'info';
258277
- **`warning`**: Issues that should be addressed (unused code, potential bugs)
259278
- **`info`**: Informational messages, suggestions, and minor issues
260279

280+
## Prompts API
281+
282+
### Available Prompts
283+
284+
#### analyze-project
285+
286+
Analyze an entire project for code quality issues.
287+
288+
**Arguments:**
289+
- `projectPath` (required): Path to the project to analyze
290+
- `profile` (optional): Inspection profile to use
291+
292+
**Example:**
293+
```javascript
294+
// Get prompt
295+
const prompt = await getPrompt({
296+
name: 'analyze-project',
297+
arguments: {
298+
projectPath: '/path/to/project',
299+
profile: 'Default'
300+
}
301+
});
302+
```
303+
304+
#### check-file
305+
306+
Check a specific file for code quality issues.
307+
308+
**Arguments:**
309+
- `filePath` (required): Path to the file to check
310+
311+
**Example:**
312+
```javascript
313+
const prompt = await getPrompt({
314+
name: 'check-file',
315+
arguments: {
316+
filePath: 'src/components/Button.tsx'
317+
}
318+
});
319+
```
320+
321+
#### fix-issues
322+
323+
Get suggestions to fix detected issues in a project.
324+
325+
**Arguments:**
326+
- `projectPath` (required): Path to the project
327+
- `severity` (optional): Minimum severity level (ERROR, WARNING, INFO)
328+
329+
**Example:**
330+
```javascript
331+
const prompt = await getPrompt({
332+
name: 'fix-issues',
333+
arguments: {
334+
projectPath: '/path/to/project',
335+
severity: 'ERROR'
336+
}
337+
});
338+
```
339+
340+
---
341+
342+
## Resources API
343+
344+
### Available Resources
345+
346+
#### inspection://profiles
347+
348+
Returns the list of available inspection profiles.
349+
350+
**Response:**
351+
```json
352+
{
353+
"profiles": [
354+
"Default",
355+
"Project Default",
356+
"Strict",
357+
"Essential"
358+
],
359+
"description": "Available inspection profiles for code analysis"
360+
}
361+
```
362+
363+
#### inspection://config
364+
365+
Returns the current MCP server configuration.
366+
367+
**Response:**
368+
```json
369+
{
370+
"name": "mcp-jetbrains-code-inspections",
371+
"version": "1.0.0",
372+
"defaultTimeout": 120000,
373+
"responseFormat": "markdown",
374+
"excludedInspections": ["SpellCheckingInspection"],
375+
"debug": false
376+
}
377+
```
378+
379+
#### inspection://ides
380+
381+
Returns the list of detected JetBrains IDEs on the system.
382+
383+
**Response:**
384+
```json
385+
{
386+
"detected": [
387+
{
388+
"name": "WebStorm",
389+
"type": "webstorm",
390+
"version": "2024.1",
391+
"inspectPath": "/Applications/WebStorm.app/Contents/bin/inspect.sh"
392+
},
393+
{
394+
"name": "IntelliJ IDEA",
395+
"type": "idea",
396+
"version": "2024.1",
397+
"inspectPath": "/Applications/IntelliJ IDEA.app/Contents/bin/inspect.sh"
398+
}
399+
],
400+
"count": 2
401+
}
402+
```
403+
404+
### Using Resources
405+
406+
```javascript
407+
// List all available resources
408+
const resources = await listResources();
409+
410+
// Read a specific resource
411+
const profilesData = await readResource({
412+
uri: 'inspection://profiles'
413+
});
414+
415+
const profiles = JSON.parse(profilesData.contents[0].text);
416+
console.log('Available profiles:', profiles.profiles);
417+
```
418+
419+
---
420+
261421
## Usage Examples
262422

263-
### Basic Usage
423+
### Basic Tool Usage
264424

265425
```javascript
266426
// Analyze a single file

0 commit comments

Comments
 (0)