Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ nav:
- ':custom-terminal: CLI': code-reviews/cli
- ':custom-database: External Knowledge': code-reviews/external-knowledge
- ':custom-settings: Configuration': code-reviews/configuration
- 'Video Library': code-reviews/video-library.md
- ':custom-history: Changelog': code-reviews/changelogs.md
- ':custom-faq: FAQ': code-reviews/faq.md
- ':custom-alert: Troubleshooting': code-reviews/troubleshooting.md
- 'Reference': code-reviews/reference
- ':custom-file: Reference': code-reviews/reference.md
- 'AI Resources': ai-resources.md
- 'Changelog': code-reviews/changelogs.md
3 changes: 1 addition & 2 deletions code-reviews/.nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ nav:
- 'CLI': cli
- 'External Knowledge': external-knowledge
- 'Configuration': configuration
- 'Video Library': video-library.md
- 'FAQ': faq.md
- 'Troubleshooting': troubleshooting.md
- 'Reference': reference
- 'Reference': reference.md
Comment thread
0xlukem marked this conversation as resolved.
1 change: 0 additions & 1 deletion code-reviews/changelogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: kluster Code Reviews Changelog
description: A chronological record of kluster.ai Code Reviews product updates, including new features, bug fixes, and improvements across all releases.
categories: Changelog
footer_nav: true
---

# Product changelog
Expand Down
2 changes: 1 addition & 1 deletion code-reviews/configuration/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ The default configuration uses **Deep** for human-driven workflows and **Instant
## Next steps

- [Create custom rules](/code-reviews/configuration/rules/): Add project-specific development standards.
- [View MCP tools reference](/code-reviews/reference/mcp-tools/): Understand the technical API details.
- [View MCP tools reference](/code-reviews/reference/#mcp-tools): Understand the technical API details.
- [Installation guide](/code-reviews/get-started/installation/): Set up Code Reviews in your IDE.
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,4 @@ Even with clear prompts and detailed plans, AI execution can go wrong. Code Revi

The more complex the task, the more valuable this real-time verification becomes.

**Learn more**: Explore our [MCP tools reference](/code-reviews/reference/mcp-tools/) to understand all issue types and priority levels that Code Reviews monitors.
**Learn more**: Explore our [MCP tools reference](/code-reviews/reference/#mcp-tools) to understand all issue types and priority levels that Code Reviews monitors.
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ Admin endpoints require special security attention that AI often misses:

[Code Reviews](/code-reviews/review-modes/) acts as your security safety net, catching vulnerabilities that look functional but hide critical flaws. The more powerful the operation, the more critical this protection becomes.

**Learn more**: Explore our [MCP tools reference](/code-reviews/reference/mcp-tools/) to understand all vulnerability types that Code Reviews monitors.
**Learn more**: Explore our [MCP tools reference](/code-reviews/reference/#mcp-tools) to understand all vulnerability types that Code Reviews monitors.
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,5 @@ You can customize how on-demand reviews work in your [configuration options](/co

## Next steps

- **[MCP Tools Reference](/code-reviews/reference/mcp-tools/)**: Deep dive into all MCP tools and parameters.
- **[MCP Tools Reference](/code-reviews/reference/#mcp-tools)**: Deep dive into all MCP tools and parameters.
- **[Configuration Options](/code-reviews/configuration/options/)**: Customize Code Reviews behavior for your workflow.
162 changes: 162 additions & 0 deletions code-reviews/reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
---
title: MCP Tools Reference
description: Learn how kluster.ai Code MCP tools work, including parameters, response formats, issue categories, and settings for real-time code reviews.
categories: Reference
---

# MCP Tools Reference

This page provides the technical reference for the [kluster.ai](https://www.kluster.ai/){target=\_blank} Code MCP server, including available tools, request parameters, and the response format returned by code reviews. Use it as a quick lookup when working in Cursor, Claude Code, or any MCP-compatible client.

## Available tools

The Code MCP server provides review tools for checking code quality and security. These tools enable real-time code reviews directly within your IDE through MCP integration.

- **`kluster_code_review_auto`**: Automatically reviews code quality and detects bugs, including logic errors, security issues, and performance problems. Triggers automatically when code is generated or modified. Best for real-time reviews during active coding sessions, analyzing changes in context of the full conversation and related files.
- **`kluster_dependency_check`**: Validates the security and compliance of packages and dependencies. Triggers automatically before package installations or when package files are updated. Best for preventing vulnerable or non-compliant third-party libraries from entering your codebase before installation.
- **`kluster_code_review_manual`**: Manually reviews specific files when explicitly requested by the user (e.g., "review this file", "check for bugs"). Best for auditing existing code, reviewing specific modules, or getting fix recommendations for individual files.

This page documents the parameters and response formats you'll see when using these tools in Cursor, Claude Code, or any MCP-compatible client.

## Parameters

=== "Automatic Reviews and Dependency Check"

These tools analyze code changes and dependencies to detect bugs, security vulnerabilities, and other quality issues. Used for AI-generated code.

???+ interface "Parameters"

`code_diff` ++"string"++ <span class="required" markdown>++"required"++</span>

Unified diff format showing the actual changes (additions and subtractions) made to files. Use standard diff format with `--- filename` and `+++ filename` headers, followed by `@@ line numbers @@`, and `+` for additions, `-` for deletions. In MCP environments, this is often auto-extracted from IDE history.

---

`user_requests` ++"string"++ <span class="required" markdown>++"required"++</span>

A chronological sequence of all user messages and requests in this conversation thread, with the current request (that triggered this assistant turn) clearly marked. Format: Previous requests as numbered list, then current request marked with `>>> CURRENT REQUEST: [request text]`. In MCP environments, this is often auto-extracted from conversation history.

---

`modified_files_path` ++"string"++ <span class="required" markdown>++"required"++</span>

Full absolute paths of modified files separated by `;`.

---

`chat_id` ++"string"++ <span class="optional" markdown>++"optional"++</span>

Session identifier returned by previous tool calls. Used to maintain context across multiple review requests.

=== "On-demand Review Tool"

The on-demand review tool is triggered when explicitly requested. Used for both AI-generated code (when you ask your AI to review code) and human-written code (when you use the extension UI).

???+ interface "Parameters"

`user_requests` ++"string"++ <span class="required" markdown>++"required"++</span>

Chronological sequence of user messages with current request marked as `>>> CURRENT REQUEST:`. Unlike automatic reviews, this parameter is NOT auto-extracted in MCP environments and must be explicitly provided.

---

`modified_file_path` ++"string"++ <span class="required" markdown>++"required"++</span>

Full absolute path of the single file to review. This tool can only check one file per call.

---

`need_fixes` ++"boolean"++ <span class="required" markdown>++"required"++</span>

Set to `true` if user requested fixes, `false` if only requesting issue detection.

---

`chat_id` ++"string"++ <span class="optional" markdown>++"optional"++</span>

Session identifier returned by previous tool calls. Used to maintain context across multiple review requests.

## Response format

All kluster.ai code review tools return the same response structure. This section documents the fields you'll see in review responses.

### Response fields

- **`isCodeCorrect`**: Boolean indicating if the code has issues.
- **`explanation`**: Summary of all issues found.
- **`issues`**: Array of detected problems with:
- **`type`**: Issue category (intent, semantic, knowledge, performance, quality, logical, security).
- **`severity`**: Impact level (critical, high, medium, low).
- **`priority`**: Execution priority (P0-P5).
- **`description`**: Brief issue summary.
- **`explanation`**: Detailed issue explanation.
- **`actions`**: Recommended fixes.
- **`priority_instructions`**: Execution rules for addressing issues.
- **`agent_todo_list`**: Prioritized list of fixes to apply.
- **`chat_id`**: Session identifier for maintaining context across requests.

### Example response

```json
{
"isCodeCorrect": false,
"explanation": "Found 1 issue. 1 critical issue needs immediate attention.\n\nTODO:\n1. [CRITICAL] The implementation introduces a critical SQL injection vulnerability.",
"issues": [
{
"type": "intent",
"severity": "critical",
"priority": "P0",
"description": "The implementation introduces a critical SQL injection vulnerability, which is an unacceptable security risk.",
"explanation": "The code constructs an SQL query using string concatenation with user input, which is the classic pattern for SQL injection. A function designed for database interaction should use parameterized queries.",
"actions": "Use parameterized queries or prepared statements to safely handle user input. For example: db.query('SELECT * FROM users WHERE id = ?', [userId])"
}
],
"priority_instructions": "**PRIORITY EXECUTION RULES:**\n1. **INTENT Critical/High (P0-P1) get special priority**\n2. **All other issues sorted by severity** - Critical (P2) > High (P3) > Medium (P4) > Low (P5)\n3. **Never let lower priority issues override higher priority changes**",
"agent_todo_list": [
"**EXECUTE IN THIS EXACT ORDER:**",
"",
"**Priority P0 - INTENT CRITICAL (HIGHEST PRIORITY):**",
"P0.1: The implementation introduces a critical SQL injection vulnerability - Use parameterized queries or prepared statements."
],
"chat_id": "i8ct930591"
}
```

### Issue types

| Type | Description | Example |
|------|-------------|---------|
| `intent` | Code doesn't match user request | Asked for sorting, got filtering |
| `semantic` | Meaning and type errors | Wrong variable type used |
| `knowledge` | Best practice violations | Not following conventions |
| `performance` | Performance issues | Inefficient algorithms |
| `quality` | Code quality problems | Poor naming, complexity |
| `logical` | Control flow errors | Off-by-one errors |
| `security` | Security vulnerabilities | SQL injection risks |

### Severity levels

| Level | Meaning | Action |
|-------|---------|--------|
| `critical` | Security vulnerability or breaking issue | Fix immediately |
| `high` | Significant bug or security concern | Fix before production |
| `medium` | Quality issue or minor bug | Should fix |
| `low` | Style or minor improvement | Optional fix |

### Priority system

Code review assigns priority levels to detected issues, helping you focus on the most critical problems first. The system automatically prioritizes based on issue type and severity.

| Priority | Meaning |
|----------|---------|
| **P0-P1** | Intent issues (highest priority) - code doesn't match request |
| **P2** | Critical severity - must fix immediately |
| **P3** | High severity - should fix soon |
| **P4** | Medium severity - nice to fix |
| **P5** | Low severity - optional improvements |

## Next steps

- **[Configure settings](/code-reviews/configuration/options/)**: Customize review behavior for your needs.
- **[Installation](/code-reviews/get-started/installation/)**: Set up kluster.ai in your IDE.
- **[AI-generated code](/code-reviews/ide-reviews/ai-generated-code/automatic-reviews/)**: Learn how reviews work with AI assistants.
4 changes: 0 additions & 4 deletions code-reviews/reference/.nav.yml

This file was deleted.

85 changes: 0 additions & 85 deletions code-reviews/reference/mcp-tools.md

This file was deleted.

Loading
Loading