Skip to main content
Glama
Kirachon

Context Engine MCP Server

by Kirachon

Review Changes

review_changes
Read-onlyIdempotent

Analyze code diffs with AI to detect bugs, security flaws, performance issues, and style problems. Provides prioritized findings with fix suggestions.

Instructions

Review code changes from a diff using AI-powered analysis.

This tool performs a structured code review on a unified diff, identifying issues across correctness, security, performance, maintainability, style, and documentation.

Key Features:

  • Structured output with findings, priority levels (P0-P3), and confidence scores

  • Changed lines filter: focuses on modified code (can be toggled)

  • Confidence scoring: each finding has a 0-1 confidence score

  • Actionable suggestions: includes fix suggestions where applicable

Priority Levels:

  • P0 (Critical): Must fix before merge - bugs, security vulnerabilities

  • P1 (High): Should fix before merge - likely bugs, significant issues

  • P2 (Medium): Consider fixing - code smells, minor issues

  • P3 (Low): Nice to have - style issues, minor improvements

Categories:

  • correctness: Bugs, logic errors, edge cases

  • security: Vulnerabilities, injection risks, auth issues

  • performance: Inefficiencies, memory leaks, N+1 queries

  • maintainability: Code clarity, modularity, complexity

  • style: Formatting, naming conventions

  • documentation: Comments, docstrings, API docs

Output Schema: Returns JSON with: findings[], overall_correctness, overall_explanation, overall_confidence_score, changes_summary, and metadata.

Usage Examples:

  1. Basic review: Provide diff content

  2. Focused review: Set categories="security,correctness"

  3. Strict review: Set confidence_threshold=0.8

  4. Include context lines: Set changed_lines_only=false

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diffYesThe unified diff content to review (from git diff, etc.)
base_refNoOptional base branch or commit reference for context
categoriesNoComma-separated categories to focus on. Options: correctness, security, performance, maintainability, style, documentation
max_findingsNoMaximum number of findings to return. Default: 20
file_contextsNoOptional JSON object mapping file paths to file contents for additional context
llm_timeout_msNoOptional AI timeout override in milliseconds for this review call (1000-1800000).
exclude_patternsNoComma-separated glob patterns for files to exclude (e.g., "*.test.ts,*.spec.js")
changed_lines_onlyNoOnly report issues on changed lines. Default: true
custom_instructionsNoCustom instructions for the reviewer (e.g., "Focus on React best practices")
confidence_thresholdNoMinimum confidence score (0-1) to include findings. Default: 0.7
Behavior5/5

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

The description adds substantial behavioral context beyond annotations: it explains the structured output with findings, priority levels (P0-P3), confidence scores, categories, and features like changed_lines_only. No contradiction with annotations (readOnlyHint=true, idempotentHint=true).

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 well-structured with headers, bullet points, and examples. Every section serves a purpose: purpose, key features, priority levels, categories, output schema reference, and usage examples. No unnecessary content, clear and scannable.

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

Completeness4/5

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

The description covers usage, parameters, and output comprehensively for a complex tool with 10 parameters. It mentions output schema in text (though context indicates no formal output schema). Minor gaps: no mention of prerequisites (e.g., needing git diff) or rate limits, but overall it's thorough.

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?

With 100% schema description coverage, the description could rest on the schema. However, it adds significant meaning by explaining categories, priority levels, and default values (e.g., confidence_threshold=0.7) that go beyond the schema. It enriches understanding but some parameters (base_ref, file_contexts) rely mainly on the schema.

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's purpose: 'Review code changes from a diff using AI-powered analysis.' It specifies the verb (review), resource (code changes/diff), and provides structured details on output, categories, and priority levels. This differentiates it from sibling tools like review_diff and review_auto.

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?

The description provides usage examples and context on when to use the tool (e.g., basic review, focused review). However, it does not explicitly state when not to use this tool or compare it to alternatives like review_diff or reactive_review_pr, leaving the agent without guidance on choosing among sibling tools.

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/Kirachon/context-engine'

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