Skip to main content
Glama

Python 3.11+ License MIT PRs Welcome

reforge-mcp

An MCP server that connects Claude Code to your codebase and systematically cleans it up — scanning, planning, and applying fixes with full rollback safety.


CI

What it does

Vibe-coded repos accumulate fast: functions nobody calls, copy-pasted logic in three files, one 900-line god module that does everything, circular imports that break at runtime. Spotting this manually takes hours; fixing it safely takes longer. reforge-mcp exposes your codebase to Claude Code as a set of structured tools so it can analyse, prioritise, and apply fixes autonomously — one atomic commit at a time.

The 7 MCP tools

Tool

What it does

scan_repo

AST-parses your repo (Python, JS, TS, Go) and returns dead code, duplicates, god files, circular deps, and monorepo subprojects

get_chunk

Reads an exact line-range slice from any file — lets Claude fetch only what it needs without blowing its context window

write_fix

Applies a unified diff atomically, runs optional tests, and auto-rolls back on failure

git_commit

Stages and commits specific files; enforces a per-session budget and confirmation checkpoints

read_memory

Reads a value from reforge-state.json — persists architecture hypotheses, pending fixes, and embeddings across sessions

write_memory

Writes any value atomically to reforge-state.json

get_health_score

Computes a 0–100 health score from scan metrics and appends a timestamped entry to the project's health history

Also included

  • Health score trending — every get_health_score call appends to health_history so you can chart improvement over time

  • Persistent memoryreforge-state.json survives across Claude Code sessions; stores architecture hypotheses, fix logs, pending work

  • Monorepo supportscan_repo detects Python, JavaScript, TypeScript, and Go subprojects from their marker files and returns the correct test_command per subproject

  • Changelog generationREFORGE_CHANGES.md is written on demand with score deltas, applied fixes, and pending items


Related MCP server: codex-dobby-mcp

Installation

Prerequisites: Python 3.11+, Claude Code CLI, Git

pip install reforge-mcp

From source

# 1. Clone the repo
git clone https://github.com/codewithaiyan/reforge-mcp.git
cd reforge-mcp

# 2. Create and activate a virtual environment
python3 -m venv venv
source venv/bin/activate          # Windows: venv\Scripts\activate

# 3. Install in editable mode
pip install -e .
# Find the absolute path to the server entry point
which reforge-mcp                 # e.g. /home/you/.local/bin/reforge-mcp

Add to claude_desktop_config.json (usually ~/.config/claude/claude_desktop_config.json on Linux, ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "reforge-mcp": {
      "command": "/home/you/reforge-mcp/venv/bin/reforge-mcp",
      "args": [],
      "env": {}
    }
  }
}

Replace the path with the output of which reforge-mcp from step 4.

# 5. Set your Anthropic API key (if not already set)
export ANTHROPIC_API_KEY=sk-ant-...

Restart Claude Code. The seven tools will appear under the MCP panel.


Usage

Example session with Claude Code

You: Use reforge-mcp to scan my repo at /home/me/myproject and fix the top issues.

Claude: I'll start with a full scan.

[calls scan_repo("/home/me/myproject")]

The scan found:
- 14 dead functions across 6 files
- 3 duplicate implementations of `calculate_discount`
- 1 god file: src/api/handlers.py (847 lines, 23 exports)
- 2 circular dependencies: auth → middleware → auth

Health score: 47/100

Let me fetch the duplicate implementations to confirm they're identical.

[calls get_chunk("src/billing/utils.py", start_line=12, end_line=28)]
[calls get_chunk("src/cart/helpers.py", start_line=5, end_line=21)]

Confirmed — identical bodies. I'll consolidate them into src/shared/pricing.py and
remove both originals.

[calls write_fix("src/shared/pricing.py", diff_str="...")]
[calls write_fix("src/billing/utils.py", diff_str="...")]
[calls write_fix("src/cart/helpers.py", diff_str="...")]
[calls git_commit("/home/me/myproject", files=[...], message="refactor: consolidate duplicate calculate_discount")]

Committed: a3f91c2. Running next fix...

Sample scan_repo output

{
  "summary": {
    "total_files": 42,
    "total_functions": 187,
    "total_lines": 8304,
    "languages_detected": ["python"]
  },
  "dead_code": [
    { "symbol": "parse_legacy_csv", "file": "src/importers/csv.py", "line": 44 },
    { "symbol": "_old_validate",    "file": "src/models/user.py",   "line": 112 }
  ],
  "duplicates": [
    {
      "hash": "a3f2...91bc",
      "locations": [
        { "file": "src/billing/utils.py",  "line": 12, "name": "calculate_discount" },
        { "file": "src/cart/helpers.py",   "line":  5, "name": "calculate_discount" },
        { "file": "src/orders/pricing.py", "line": 78, "name": "apply_discount" }
      ]
    }
  ],
  "god_files": [
    { "file": "src/api/handlers.py", "lines": 847, "exports": 23 }
  ],
  "dep_graph": {
    "nodes": ["src/auth/__init__.py", "src/middleware/auth.py"],
    "edges": [{ "from": "src/auth/__init__.py", "to": "src/middleware/auth.py" }],
    "circular": [
      ["src/auth/__init__.py", "src/middleware/auth.py", "src/auth/__init__.py"]
    ]
  },
  "subprojects": [
    { "root": "services/worker", "language": "go",         "test_command": "go test ./..." },
    { "root": "frontend",        "language": "javascript", "test_command": "npm test" }
  ]
}

Sample REFORGE_CHANGES.md

# Reforge Changes

*Generated: 2025-05-02T14:33:00+00:00*

**Health score:** 73.5 (+26.5 from previous scan)

## Fixes Applied

- refactor: consolidate duplicate calculate_discount
- fix: remove dead parse_legacy_csv from src/importers/csv.py
- refactor: split handlers.py into auth_handlers.py and order_handlers.py

## Pending Fixes

- resolve circular dep: src/auth/__init__.py ↔ src/middleware/auth.py
- remove _old_validate from src/models/user.py

How it works

Reforge works in three phases:

1. Scan

scan_repo walks the repository with parse_directory, feeding each source file to the appropriate tree-sitter adapter (Python, JavaScript/TypeScript, or Go). Tree-sitter builds a full AST — unlike regex, it understands nested scope, decorators, arrow functions, and generics. The adapters extract functions, classes, and imports into typed dataclasses.

From the parse results, three analyses run in sequence:

  • Dead code — symbols defined but never referenced anywhere in the repo

  • Duplicates — functions whose normalised bodies share the same SHA-256 hash

  • God files — files exceeding 500 lines or 10 exported symbols

A dependency graph is built from resolved imports and checked for cycles with DFS. Monorepo subprojects are discovered by scanning subdirectories for marker files (pyproject.toml, package.json, go.mod, tsconfig.json).

2. Plan

Claude Code receives the structured scan report and uses get_chunk to read specific line ranges before deciding what to fix and in what order. The architecture hypothesis, pending fix queue, and health history are all persisted in reforge-state.json via read_memory / write_memory so the plan survives a session restart.

3. Fix

write_fix applies a unified diff atomically:

  1. Creates a .bak backup of the target file

  2. Best-effort git stash before touching the working tree

  3. Parses the diff into hunks and applies them with line-offset tracking

  4. Runs the optional test command (validated against the allowlist)

  5. On any failure — diff parse error, test exit ≠ 0 — restores from .bak and returns rolled_back: true

git_commit stages only the listed files and creates an atomic commit via GitPython. It reads session_budget and confirm_every from reforge.toml and enforces them: once the session budget is exceeded commits are blocked; at every confirm_every checkpoint the tool returns needs_confirmation: true and waits for confirmed: true before proceeding.


Security

Boundary

Mechanism

Path traversal

Every file path is validated against repo_root before any read or write — paths that escape the repo root are rejected with SecurityError

Binary / lock files

should_skip_file() blocks binary files, package-lock.json, .yarn.lock, and files over 10 MB before any processing

Test command injection

write_fix validates test_command against an explicit allowlist (pytest, python3 -m pytest, npm test, go test ./..., etc.) before executing

Atomic state writes

reforge-state.json is always written via .tmprename — a crash mid-write leaves an orphaned .tmp, not a corrupt file; startup_tasks() cleans these on boot

Pre-fix stash

write_fix attempts git stash before touching the working tree; on rollback the stash is discarded, leaving the repo clean

No network calls

The server makes zero outbound network requests; all analysis is local


Contributing

# Clone and install
git clone https://github.com/your-org/reforge-mcp.git
cd reforge-mcp
python3 -m venv venv && source venv/bin/activate
pip install -e .
pip install pytest pytest-cov

# Run the full test suite
pytest

# Run with coverage
pytest --cov=src --cov-report=term-missing

Project structure

reforge-mcp/
├── src/reforge_mcp/
│   ├── server.py              # FastMCP server — registers all 7 tools
│   ├── tools/
│   │   ├── scan.py            # scan_repo, get_health_score, monorepo detection
│   │   ├── chunk.py           # get_chunk — line-range file reads
│   │   ├── fix.py             # write_fix — diff apply + rollback
│   │   └── git.py             # git_commit — atomic commits with budget enforcement
│   ├── scanner/
│   │   ├── parser.py          # tree-sitter adapters (Python, JS/TS, Go) + QueryCursor wiring
│   │   ├── dead_code.py       # unused symbol detection
│   │   ├── duplicates.py      # body-hash duplicate detection
│   │   └── adapters/          # per-language project-detection stubs
│   └── utils/
│       ├── state.py           # reforge-state.json load/save, gitignore, changelog
│       ├── security.py        # path validation, file guard, command allowlist
│       └── diff.py            # unified diff parser and applier
├── tests/
│   ├── test_scanner.py
│   ├── test_chunk.py
│   ├── test_fix.py
│   ├── test_git.py
│   ├── test_memory.py
│   └── test_monorepo.py
├── pyproject.toml
└── reforge.toml               # optional per-repo config

reforge.toml reference

[fix]
session_budget = 20      # max commits per Claude session before hard stop
confirm_every  = 5       # pause for confirmation every N commits

[scan]
ignore_dirs = ["generated", "vendor"]

License

MIT — see LICENSE.

Available Tools

10 tools
generate_changelog_toolC

Write REFORGE_CHANGES.md from current session state.

ParametersJSON Schema
NameRequiredDescriptionDefault
repo_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations, the description carries full responsibility for disclosing side effects. It states that it writes a file, but does not mention whether it overwrites existing files, requires permissions, or any other behavioral details. This is a significant gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, front-loaded with the key action, and contains no redundant words. However, it is under-specified, which slightly reduces the score from a perfect 5.

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

Completeness2/5

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

The tool is simple, but with no annotations and no output schema shown, the description must provide more context. It doesn't mention return values, error conditions, or when to use it. The description is too sparse to be considered complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description provides no explanation of the 'repo_path' parameter. The agent is left to infer that it should be a path to the repository, but this is not stated, and the description fails to compensate for the schema's lack of semantic detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Write REFORGE_CHANGES.md') and the source ('from current session state'), which distinguishes it from sibling tools like git_commit_tool or write_fix_tool. However, it doesn't specify what content the changelog contains or what 'session state' means, leaving some ambiguity about the tool's exact purpose.

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

Usage Guidelines2/5

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

No guidance is provided about when to use this tool versus alternatives or any prerequisites (e.g., session state must exist). The description gives no context for user decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_chunk_toolB

Retrieve a line-range slice from a file.

ParametersJSON Schema
NameRequiredDescriptionDefault
end_lineNo
file_pathYes
repo_rootNo
start_lineNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the burden of revealing behavioral traits. 'Retrieve' signals a read-only operation, but the description omits other relevant behaviors such as handling of null end_line or line numbering conventions. It adds minimal context beyond the tool's name.

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 one short, front-loaded sentence: 'Retrieve a line-range slice from a file.' Every word contributes, and there is no redundant phrasing or filler.

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

Completeness2/5

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

Given four parameters, no annotations, and no schema descriptions, the description is too sparse. It does not explain defaults (start_line=1, end_line=null), line indexing, or how repo_root and file_path interact. The output schema may cover return values, but input behavior remains under-specified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. 'Line-range slice' loosely implies start_line and end_line, but it does not explicitly explain file_path, repo_root, or defaults. The description adds only partial meaning for two of the four parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Retrieve a line-range slice from a file' clearly identifies the tool's action (retrieve), resource (line-range slice), and target (file). It distinguishes from siblings like read_memory_tool (memory) and scan_repo_tool (repo-wide scanning), though it could be more explicit about repository vs. local files.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention any prerequisites, exclusions, or suggested scenarios, leaving the agent to infer usage without support.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_health_score_toolA

Compute a 0-100 health score from scan metrics and append to health_history.

Scoring deductions: duplicate ratio (-30 max), dead code ratio (-30 max), god files (-20 max), circular deps (-20 max).

ParametersJSON Schema
NameRequiredDescriptionDefault
repo_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior4/5

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

Discloses its side effect (append to health_history) and details the scoring deductions. No annotations exist, so this is useful. However, it does not mention what exactly is returned or any authorization requirements.

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?

Two concise sentences, front-loaded with the primary action and followed by scoring details. No unnecessary words.

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

Completeness3/5

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

The tool lacks usage context: it does not specify prerequisites (e.g., scan_repo_tool must be run first) or when to choose this versus score_risk_tool. The output schema exists, so return values are covered there, but the input parameter is unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The only parameter repo_path is not described in either the schema or the description. The description says 'from scan metrics' but gives no guidance on what value repo_path should take.

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 states a specific verb ('Compute') and resource ('health score') plus a clear side effect ('append to health_history'). It distinguishes from siblings by specifying the scoring formula and the append behavior.

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?

No explicit when-to-use or alternatives are mentioned. The phrase 'from scan metrics' implies it should follow scan_repo_tool, but this is not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

git_commit_toolB

Create an atomic git commit; enforces session budget and confirmation checkpoints.

ParametersJSON Schema
NameRequiredDescriptionDefault
filesNo
branchNo
messageNo
confirmedNo
repo_pathYes
create_branchNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the burden of disclosure. It does mention two behavioral traits: atomicity and enforcement of session budget/confirmation checkpoints. However, the meaning of 'confirmation checkpoints' is vague—it does not explain that the 'confirmed' parameter must be set to true, nor does it describe side effects, failure modes, or authorization requirements. Some credit is given for partially disclosing behavior beyond the name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, concise and front-loaded with the core purpose. However, the second part about session budget and confirmation checkpoints is cryptic and could be more clearly structured. It earns points for brevity but loses a little for including unclear jargon.

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

Completeness2/5

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

For a tool with 6 parameters and one required field, the description is incomplete. It does not mention the parameters, the confirmation flow, what the output contains, or any preconditions. Even though an output schema exists (which covers return values), the operational context is missing. The atomicity and budget enforcement are included but not elaborated, leaving the agent to guess at the actual workflow.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, and the description provides no explanation of any parameters. The phrase 'confirmation checkpoints' could relate to 'confirmed' but is too ambiguous to count as semantic clarification. None of the six parameters (files, branch, message, confirmed, repo_path, create_branch) are described, so the agent has no help understanding what each does.

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 function with a specific verb and resource: 'Create an atomic git commit.' It distinguishes itself from the sibling tools (which are for scanning, memory, risk scoring, etc.) by naming the exact git operation. The mention of atomicity adds precision.

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

Usage Guidelines2/5

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

No guidance is provided about when to use this tool versus alternatives, nor any prerequisites. While the tool's name indicates it is for git commits, the description does not clarify the workflow (e.g., must have staged changes, should be used after write_fix_tool, or how the confirmation checkpoint works). The 'enforces session budget and confirmation checkpoints' hint is behavioral, not usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

infer_architecture_toolA

Infer the architectural pattern of a repository.

Runs scan_repo, detects pattern (REST API, CLI tool, library, web frontend), identifies entry points and logical modules, stores the result in reforge-state.json under architecture_hypothesis, and returns the inference.

ParametersJSON Schema
NameRequiredDescriptionDefault
repo_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It transparently describes the multi-step process (runs scan_repo, detects patterns, identifies entry points/modules), the side effect of storing results in reforge-state.json under architecture_hypothesis, and the return of the inference. This goes beyond a simple one-liner and gives the agent useful behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise at two sentences, with the purpose front-loaded. The second sentence is a dense list of steps, but it remains readable. Every sentence contributes to understanding the tool's behavior, though the structure could be improved with bullets or clearer separation of steps.

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 the main behavior, side effect, and return value. Since an output schema exists, the return format is likely documented elsewhere. It could mention prerequisites or error cases, but for an analysis tool with one parameter and a clear process, it is fairly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It indirectly clarifies the single parameter repo_path by referencing 'a repository,' but it does not explicitly define the parameter format or constraints. The meaning is inferable from context, but the description adds minimal explicit value beyond the schema's bare field name.

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: 'Infer the architectural pattern of a repository.' It specifies the resource (repository) and the action (infer), and distinguishes itself from siblings like scan_repo_tool by describing a higher-level analysis that builds on scan_repo.

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 implies usage by mentioning it runs scan_repo and returns an architectural inference, but it does not explicitly state when to use this tool versus alternatives or provide exclusions. The context suggests it is for deeper architectural analysis, but no explicit 'when' or 'when not' guidance is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_memory_toolB

Read a value from reforge-state.json.

Returns {key, value, found}.

ParametersJSON Schema
NameRequiredDescriptionDefault
keyYes
repo_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses the return shape ({key, value, found}) which hints at behavior for missing keys. However, it does not explicitly state whether the tool is non-mutating, what happens if the file does not exist, or any error behavior. The verb 'read' implies safety, but the description could add more context.

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 extremely concise: two sentences, the first states the action, the second states the return format. Every word earns its place, with no filler or repetition. It is front-loaded and easy to parse.

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

Completeness3/5

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

For a simple two-parameter read tool, the description gives the core purpose and return shape. However, it omits parameter definitions and behavior on edge cases (e.g., missing file, missing key). Given there is no annotation coverage and no schema descriptions, the description is only moderately complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain the parameters. It does not. It only mentions reading from 'reforge-state.json', which implies 'key' is the identifier, but 'repo_path' is never explained. The description does not compensate for the missing schema descriptions, leaving both parameters ambiguous.

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 a specific verb and resource: 'Read a value from reforge-state.json.' This distinguishes it from sibling tools like write_memory_tool (write), scan_repo_tool (scan), and get_chunk_tool (get chunk). The purpose is unambiguous.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention any exclusion criteria, prerequisites, or situations where another tool would be more appropriate. For example, it does not clarify that write_memory_tool should be used to store values, or that this only reads persisted data.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_repo_toolC

Scan a repository and return a structured analysis report.

ParametersJSON Schema
NameRequiredDescriptionDefault
languagesNo
max_depthNo
root_pathYes
include_testsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.3/5.0
Behavior2/5

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

With no annotations provided, the description must carry the full behavioral disclosure burden. It only implies a read-only operation ('Scan') but does not specify whether it modifies anything, what analysis it performs, or any limitations like repo size or performance impact. This is insufficient for a tool with no safety hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise, but it omits critical context needed for correct tool use. It is under-specified rather than appropriately concise; a short description that says almost nothing is not effective. The sentence does not earn its place because it does not inform the user adequately.

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

Completeness1/5

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

This tool has four parameters, no annotations, and overlapping sibling tools, yet the description provides no context for parameter usage, analysis scope, or relationship to other tools. Even with an output schema, the agent cannot confidently select or invoke this tool correctly. The description is grossly inadequate for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description adds no information about the four parameters (root_path, languages, max_depth, include_tests). The agent has no guidance on how to fill these fields or what values are expected. The description fails to compensate for the schema's lack of descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('Scan') and resource ('a repository') with an expected output ('structured analysis report'). However, it does not distinguish this from sibling tools like infer_architecture_tool or score_risk_tool, which also analyze repositories. The core purpose is clear but lacks differentiation.

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool versus the sibling tools. Sibling tools such as infer_architecture_tool, score_risk_tool, and get_health_score_tool likely overlap in scope, but the description provides no exclusions or alternatives. Users are left to guess the appropriate context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

score_risk_toolA

Score the risk of changing a symbol (0 = safe, 100 = very risky).

Factors: inbound references, test coverage, file size, circular deps. Returns score, per-factor breakdown, and a recommendation string.

ParametersJSON Schema
NameRequiredDescriptionDefault
fileYes
symbolYes
dep_graphYes
scan_resultYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
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 states the output (score, per-factor breakdown, recommendation) and lists the key factors considered, giving insight into how the risk is assessed. However, it does not mention potential side effects (though a scoring tool is inherently read-only) or any limitations, leaving some room for improvement.

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: the first sentence clearly states the action and scale, the second lists factors and outputs. Every sentence earns its place with no redundant content. It is appropriately sized and front-loaded with the main purpose.

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 is mostly complete for a scoring tool: it covers purpose, scale, inputs (via factors), and outputs. There is an output schema (though not shown) and nested object inputs, but the description does not detail edge cases, data format requirements, or error conditions. Given the tool's moderate complexity, the description provides adequate but not exhaustive context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for the lack of parameter documentation. It mentions factors like 'inbound references, test coverage, file size, circular deps,' which indirectly relate to the inputs, but it does not explain the structure or format of dep_graph and scan_result, nor the exact meaning of symbol and file beyond their names. This is insufficient compensation for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Score the risk of changing a symbol' with a defined scale (0-100). It identifies the specific resource (symbol) and the action (scoring risk), making the purpose evident. However, it does not explicitly differentiate from sibling tools like get_health_score_tool, so it lacks explicit sibling distinction.

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 implies use when assessing the risk of modifying a symbol, but it provides no explicit guidance on when to use this tool versus alternatives, nor any exclusion criteria. The factors listed (inbound references, test coverage, etc.) imply the intended context, but there is no 'when not to use' or reference to sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

write_fix_toolB

Apply a unified diff to a file; run optional tests and auto-rollback on failure.

ParametersJSON Schema
NameRequiredDescriptionDefault
diff_strYes
file_pathYes
repo_rootNo
test_commandNo
allowed_test_commandsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the burden of disclosing behavioral traits. It discloses 'auto-rollback on failure' and 'optional tests', which are important side effects. However, it does not clarify what constitutes failure, whether changes are applied atomically, or what happens to the working tree on success.

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 a single sentence with two clauses, using no unnecessary words. It efficiently conveys the core operation and key safety feature. This is an example of high-value conciseness.

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

Completeness2/5

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

Despite having an output schema, the description is too sparse for a complex write operation. It lacks parameter semantics, prerequisites, and detailed behavior around test execution and rollback. An agent would struggle to use this tool correctly without additional information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description must compensate. It does not explain any of the five parameters (file_path, diff_str, repo_root, test_command, allowed_test_commands). The agent is left without any guidance on how to construct valid inputs.

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 action: 'Apply a unified diff to a file' with a specific resource and verb. It also mentions optional tests and auto-rollback, which distinguishes it from sibling tools like git_commit_tool or scan_repo_tool.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, scenarios where a different tool would be more appropriate, or any exclusions. The only implicit context is that it modifies a file, but no explicit usage guidance is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

write_memory_toolA

Write a value to reforge-state.json atomically.

Returns {success, key, previous_value}. ttl_seconds is accepted but not enforced (stored as metadata only).

ParametersJSON Schema
NameRequiredDescriptionDefault
keyYes
valueYes
repo_pathYes
ttl_secondsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discloses key behaviors: atomic write, the return shape, and that ttl_seconds is stored but not enforced. This goes beyond a simple 'writes a value' statement and provides useful operational detail, though it omits error handling and file existence behavior.

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 two sentences, directly front-loaded with the primary action. Every sentence adds value: the first states the operation and atomicity, the second explains the return value and ttl_seconds caveat. There is no wasted verbosity.

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

Completeness3/5

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

Given the tool's simplicity and the presence of an output schema, the description covers the core behavior (write, atomic, return) but lacks context on parameter semantics and usage scenarios. It is adequate but has gaps in explaining repo_path and when to choose this tool over siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain parameters. It only clarifies ttl_seconds (accepted but not enforced). The meanings of key, value, and repo_path are not explicitly described, although 'value' is somewhat inferable from 'Write a value'. This leaves room for ambiguity, especially for repo_path.

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 writes a value to a specific file atomically, with a distinct verb and resource. It differentiates itself from siblings like read_memory_tool by focusing on writing. The inclusion of the return object further clarifies the operation.

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 implies usage (writing to reforge-state.json) but does not explicitly state when to use this tool over alternatives like read_memory_tool. There is no exclusionary guidance, so it earns a mid-range score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.3/5.0
Disambiguation4/5

Tools are mostly distinct: read/write memory, apply diff, commit, and risk scoring have clear boundaries. Scanning-related tools (scan_repo, infer_architecture, get_health_score) overlap in inputs/outputs but serve different purposes, which descriptions clarify.

Naming Consistency5/5

All tool names follow a uniform verb_noun_tool pattern (e.g., scan_repo_tool, write_fix_tool, read_memory_tool). The suffix is consistent and the verb-object structure is predictable, making it easy to guess tool behavior.

Tool Count5/5

The server has 10 tools, which is well within the ideal 3-15 range. Each tool addresses a distinct need in the repository analysis and modification workflow, and none feel redundant or superfluous.

Completeness4/5

The tool set covers the core lifecycle: scanning, analysis (architecture, risk, health), editing (diff apply), committing, memory persistence, and changelog generation. Minor gaps exist, such as no explicit file listing or branch management, but these can be worked around using existing tools like get_chunk.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    An MCP server that connects Gemini 2.5 Pro to Claude Code, enabling users to generate detailed implementation plans based on their codebase and receive feedback on code changes.
    5
    14
  • A
    license
    A
    quality
    C
    maintenance
    A local MCP server that lets Claude delegate scoped work to Codex with structured results and guardrails, supporting planning, code review, build, reverse engineering, and long-running background tasks.
    11
    MIT

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/Codewithaiyan/reforge-mcp'

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