Skip to main content
Glama

Repo Therapist 🛋️

プレッシャーの下でコードベースが自らを語る

このMCPサーバーは完全にCursorを使用して構築されています

Repo Therapistは、あらゆるリポジトリをクエリ可能で説明可能な知識へと変換するMCP(Model Context Protocol)サーバーです。Cursorを通じてコードベースについて質問し、構造化された洞察に満ちた回答を得ることができます。

何ができるのか

Cursorに対して以下のように質問できます:

  • 「なぜこのサービスはこのような構造になっているのか?」

  • 「これを削除すると何が壊れるのか?」

  • 「このリポジトリのどの部分が懸念されるか?」

Repo Therapistは舞台裏で以下の処理を行います:

  • リポジトリの構造とファイルを読み取る

  • Git履歴とコミットパターンを分析する

  • コードと変更頻度を関連付ける

  • 複雑性のホットスポットとリスクを特定する

Related MCP server: Code Understanding MCP Server

利用可能なツール

ツール

説明

analyze_repo(path)

リポジトリを分析する - 最初にこれを実行してください

get_snapshot(section?)

リポジトリの静的スナップショット(信頼できる情報源)を取得する

get_history(section?)

Git履歴分析(時間軸)を取得する

why_is_this_weird(file_path)

特定のファイルがなぜそのようになっているのかを説明する

ask_repo(question)

分析されたリポジトリについてあらゆる質問をする

repo_summary()

高レベルな概要を取得する

risk_report()

リスク評価レポートを生成する

信頼できる情報源:スナップショット

analyze_repoを実行すると、Repo Therapistは静的スナップショットを作成します。これはリポジトリに関する信頼できる情報源となります。このスナップショットには以下が含まれます:

{
  "files": [...],           // Every file with path, language, line count
  "languages": {...},       // Language breakdown with percentages
  "entryPoints": [...],     // Detected entry points with confidence levels
  "configs": {...},         // Parsed package.json, tsconfig, Dockerfile, CI configs
  "directories": [...]      // Directory structure with inferred purposes
}

なぜこれが重要なのか: LLMは推測ではなく、このスナップショットデータを引用しなければなりません。「このリポジトリではどの言語が使われているか?」と尋ねたとき、回答はLLMの思い込みではなく、スナップショットから得られます。

get_snapshotを使用して特定のセクションを取得します:

  • get_snapshot(section: "files") - メタデータを含む全ファイル

  • get_snapshot(section: "languages") - 言語統計

  • get_snapshot(section: "entryPoints") - 検出されたエントリーポイント

  • get_snapshot(section: "configs") - 解析された設定ファイル

  • get_snapshot(section: "directories") - ディレクトリ構造

  • get_snapshot() - すべての概要

Gitヒストリアン:時間軸

Gitヒストリアンはコミット履歴を分析し、コードがなぜそのようになっているのかを説明します。ここからが本番です。

{
  "fileChurn": { "auth.ts": { "totalCommits": 47, "churnScore": 85 } },
  "authors": { "auth.ts": ["alice", "bob", "charlie"] },
  "fragileFiles": [{ "path": "auth.ts", "reasons": ["high-churn", "many-authors"] }],
  "hotPaths": [...],
  "stableCore": [...]
}

これにより、以下の質問に答えられます:

  • 「なぜここが変なのか?」 → 「6ヶ月間で12回書き直されているからです。」

  • 「このファイルの所有者は誰か?」 → 「係争中 - 4人が修正していますが、30%以上修正した人はいません。」

  • 「何に注意すべきか?」 → 「これら5つのファイルは脆弱でバグが発生しやすいです。」

get_historyを使用して特定の側面を取得します:

  • get_history(section: "churn") - ファイルの変更頻度と変動性

  • get_history(section: "authors") - 貢献者統計

  • get_history(section: "fragile") - 問題を引き起こす可能性が高いファイル

  • get_history(section: "hotPaths") - ホットパスと安定したコアの比較

  • get_history(section: "timeline") - 主要なイベントとコミットパターン

  • get_history(section: "ownership") - 所有者の特定

  • get_history() - すべての概要

特定のファイル分析には why_is_this_weird を使用します:

Use why_is_this_weird on "src/auth/login.ts"

引用付きの詳細な説明が返されます:

# Why is "src/auth/login.ts" the way it is?

## Change History
- Total commits: 47
- Authors: 5 (alice, bob, charlie, dave, eve)
- Churn score: 85 ⚠️ HIGH

## 🔍 Why It's Unusual
**Heavily modified:** This file has been changed 47 times...
**Many hands:** 5 different people have modified this file...

セットアップ

1. 依存関係のインストール

cd repo-therapist
npm install

2. プロジェクトのビルド

npm run build

3. Cursorへの追加

Cursorの設定 → MCP → 新しいMCPサーバーの追加を開きます:

{
  "mcpServers": {
    "repo-therapist": {
      "command": "node",
      "args": ["/FULL/PATH/TO/repo-therapist/dist/index.js"]
    }
  }
}

重要: /FULL/PATH/TO/ を repo-therapist フォルダへの実際の絶対パスに置き換えてください。

例:

{
  "mcpServers": {
    "repo-therapist": {
      "command": "node",
      "args": ["/Users/saar/Projects/private/repo-therapist/dist/index.js"]
    }
  }
}

4. Cursorの再起動

MCP設定を追加した後、変更を反映させるためにCursorを再起動してください。

FAQ

repo-therapistを個別に実行する必要がありますか?

いいえ。 Cursorが自動的にMCPサーバーを開始・管理します。CursorのMCP設定に構成を追加すると、Cursorは以下の処理を行います:

  • 必要に応じて node dist/index.js プロセスを開始する

  • バックグラウンドで実行し続ける

  • stdio(標準入出力)を介して通信する

一度ビルド(npm run build)し、設定を追加してCursorを再起動するだけで完了です。

どこで質問すればよいですか?

通常のCursorチャット(Cmd+L またはチャットパネル)で行います。違いは質問の方法です:

  • MCPなし: 「このリポジトリは何をするもの?」 → Cursorは組み込みツールを使用します

  • Repo Therapistあり: 「/path/to/repo に対して analyze_repo を使用して」 → CursorはMCPツールを呼び出します

明示的にCursorに対してrepo-therapistツールを使うよう指示します。Cursorはそれらを活用可能な追加機能として認識します。

通常のCursorチャットとの違いは何ですか?

通常のCursorチャット

Repo Therapistあり

必要に応じてファイルを読み取る

リポジトリ構造全体を事前分析する

Git履歴を認識しない

コミットパターンとチャーンを分析する

読み取った内容に基づいて回答する

構造化された分析に基づいて回答する

リスク検知なし

複雑性のホットスポットを特定する

一般的なコード理解

ドメイン固有の洞察(「何が懸念されるか?」)

主な違い: Repo Therapistは事前に構造化された分析を行い、それを保存します。そのため、「どのファイルが最も頻繁に変更されるか?」や「リスクは何か?」といった質問に対し、Cursorが毎回計算するのではなく、事前計算されたデータから回答できます。

Cursorは賢いが受動的であるのに対し、Repo Therapistはコードベースに関する「ブリーフィングドキュメント」を提供し、それを参照できるようにするものだと考えてください。

使用方法

設定が完了したら、CursorチャットでRepo Therapistを使用できます:

ステップ 1: リポジトリの分析

まず、探索したいリポジトリを分析します:

Use analyze_repo to analyze /path/to/some/repo

ステップ 2: 質問する

これで質問が可能になります:

Use ask_repo to answer: "What does this repo do?"
Use ask_repo to answer: "Which parts of this repo scare you?"
Use ask_repo to answer: "What will break if I remove the auth module?"

ステップ 3: レポートを取得する

概要を取得:

Use repo_summary to show me an overview

リスク評価を取得:

Use risk_report to identify potential issues

質問例

  • 「このリポジトリは何をするもの?」

  • 「コードはどのように構造化されているか?」

  • 「どのような技術スタックが使われているか?」

  • 「依存関係を表示して」

  • 「最も大きなファイルはどれか?」

  • 「どのファイルが最も頻繁に変更されるか?」

  • 「貢献者は誰か?」

  • 「最近のコミットは?」

  • 「どの部分が懸念されるか?」

  • 「Xを変更すると何が壊れるか?」

開発

開発モードで実行

npm run dev

本番用にビルド

npm run build

テストの実行

npm test              # Run all tests
npm run test:watch    # Run tests in watch mode
npm run test:coverage # Run tests with coverage report

テストガイドライン

注: 新機能を実装する際は必ずユニットテストを追加してください。

テストは tests/ に配置され、Vitest を使用します。テスト構造はソースを反映しています:

tests/
├── fixtures/           # Test utilities and mock repos
│   └── setup.ts        # Helper functions for creating test repos
├── scanner/            # Scanner module tests
├── historian/          # Historian module tests
├── tools/              # Tool tests
└── cache.test.ts       # Cache tests

新機能を追加する場合:

  1. 適切な tests/ サブディレクトリにテストを作成する

  2. Git関連のテストには fixtures/setup.ts の createTestRepo() を使用する

  3. afterAll で cleanupTestRepo() を使用してテストリポジトリをクリーンアップする

  4. コミット前に npm test を実行してすべてのテストが通過することを確認する

プロジェクト構造

repo-therapist/
├── src/
│   ├── index.ts              # MCP server entry point
│   ├── cache.ts              # In-memory repo cache
│   ├── types.ts              # TypeScript interfaces
│   ├── scanner/              # Static snapshot engine (Step 2)
│   │   ├── index.ts          # Scanner exports
│   │   ├── types.ts          # Snapshot type definitions
│   │   └── scan-repo.ts      # Repository scanner
│   ├── historian/            # Git history analyzer (Step 3)
│   │   ├── index.ts          # Historian exports
│   │   ├── types.ts          # History type definitions
│   │   └── analyze-history.ts # Git history analysis
│   └── tools/
│       ├── analyze-repo.ts   # Repository analyzer (orchestrates all)
│       ├── get-snapshot.ts   # Snapshot retrieval (ground truth)
│       ├── get-history.ts    # History retrieval (time dimension)
│       ├── ask-repo.ts       # Question answering
│       ├── repo-summary.ts   # Summary generator
│       └── risk-report.ts    # Risk assessment
├── tests/                    # Unit tests
│   ├── fixtures/             # Test utilities
│   ├── scanner/              # Scanner tests
│   ├── historian/            # Historian tests
│   └── tools/                # Tool tests
├── package.json
├── tsconfig.json
├── vitest.config.ts          # Test configuration
└── README.md

技術スタック

  • TypeScript - 型安全なコードベース

  • @modelcontextprotocol/sdk - MCPサーバー実装

  • simple-git - Git履歴分析

  • ts-morph - TypeScript/JavaScript AST解析(予定)

  • glob - ファイルパターンマッチング

ロードマップ

  • [ ] ts-morphによるASTベースのコード解析

  • [ ] JSON/SQLiteへの分析結果の永続化

  • [ ] 依存関係グラフの可視化

  • [ ] セキュリティ脆弱性検知

  • [ ] テストカバレッジ分析

  • [ ] カスタム質問ハンドラー

ライセンス

MIT

Available Tools

7 tools
analyze_repoA

Analyze a repository to understand its structure, dependencies, and git history. Run this first before asking questions.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the repository to analyze

TDQS

A3.9/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 full burden. It describes what the tool does (analyze structure, dependencies, git history) but does not disclose side effects, permissions, or output format. Adequate but lacks depth on behavioral traits like mutability or performance impact.

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 sentences: first states purpose, second provides usage guidance. Extremely concise, front-loaded with essential information, no wasted 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?

Given no output schema and no annotations, the description lacks details on what the analysis returns (e.g., report structure, how to use results). It hints at follow-up use ('before asking questions') but does not fully equip an agent to handle output.

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?

The only parameter, 'path', is described in the schema as 'Absolute path to the repository to analyze'. The description does not add extra meaning beyond what the schema already provides. With 100% schema coverage, baseline 3 is appropriate.

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 analyzes a repository for structure, dependencies, and git history, and provides a usage directive ('Run this first before asking questions'), which distinctively positions it among siblings like ask_repo and get_history.

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

Usage Guidelines4/5

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

The description gives explicit usage guidance: run this before asking questions. It implies when to use but does not explicitly list alternatives or when not to use, though the sibling context partially compensates.

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

ask_repoC

Ask a question about an analyzed repository. Questions can be about structure, purpose, dependencies, patterns, or concerns.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoOptional: path to repo if different from last analyzed
questionYesThe question to ask about the repository (e.g., 'What does this repo do?', 'Why is the auth service structured this way?')

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the burden of behavioral disclosure. It does not state that the tool is read-only, whether it requires prior analysis, or any side effects. The description lacks behavioral details beyond the basic action.

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 that is concise and to the point. No unnecessary words or repetition.

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?

With no output schema, the description should explain what the agent can expect as a response (e.g., an answer text). It also does not mention that the repository must be analyzed first, though sibling tools imply context. The description is incomplete for effective use.

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 coverage is 100%, and the schema already contains examples for the 'question' parameter. The description adds marginal value by listing question types, but those are similar to schema examples. Baseline 3 is appropriate.

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 verb 'ask' and the resource 'repository', and provides examples of question categories (structure, purpose, etc.). However, it does not explicitly distinguish from sibling tools like 'repo_summary' or 'why_is_this_weird', which may also answer questions.

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, nor does it mention prerequisites (e.g., that the repository must have been analyzed first). It only states what the tool does.

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

get_historyB

Get git history analysis - the time dimension. Reveals WHY code is the way it is: file churn, ownership, fragile files, hot paths vs stable core.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoOptional: path to repo if different from last analyzed
sectionNoWhich aspect of history to retrieve: 'churn' (file change frequency), 'authors' (contributor stats), 'fragile' (problem files), 'hotPaths' (volatile vs stable), 'timeline' (events), 'ownership' (who owns what), 'all' (summary).

TDQS

B3.1/5.0
Behavior2/5

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

No annotations provided; description carries full burden. It mentions what the tool reveals (churn, authorship, etc.) but omits behavioral details: whether it modifies state, requires authentication, or handles large repos. As a likely read-only analysis, this gap limits agent understanding.

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?

Single, front-loaded sentence with purpose and examples. Efficient but could briefly list alternative uses or output format.

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?

Lacks usage guidelines, output schema, and behavioral details. With six sibling tools, agent needs more context to choose correctly. Missing information on return format or prerequisites.

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 has 100% coverage with clear descriptions for both parameters (path, section with enums). Description adds no further semantic value beyond what the schema provides; baseline of 3 is appropriate.

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?

Description clearly states the tool's verb ('Get'), resource ('git history analysis'), and specific insights ('file churn, ownership, fragile files, hot paths vs stable core'). It emphasizes the 'time dimension', distinguishing it from sibling tools like get_snapshot or repo_summary.

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 explicit guidance on when to use this tool vs alternatives (e.g., analyze_repo, risk_report). The description hints at 'time dimension' but lacks exclusions or context for tool selection.

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

get_snapshotA

Get the static snapshot (ground truth) of the repository. This is the authoritative source - LLMs must cite this data, not guess. Use section parameter to get specific data.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoOptional: path to repo if different from last analyzed
sectionNoWhich section of the snapshot to retrieve. 'all' returns a summary view.

TDQS

A4/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. It describes a read operation but does not disclose error handling, caching behavior, or response scope beyond inferring from section parameter.

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 sentences, front-loaded with purpose and authoritative emphasis. No wasted words.

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?

Given no output schema, the description conveys the tool's role as a source of truth. Could elaborate on return format, but sufficient for a simple retrieval tool with well-defined params.

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 covers 100% of parameters, baseline 3. The description adds 'Use section parameter' but does not provide additional meaning beyond the schema's enum or path description.

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 retrieves a static snapshot as the authoritative ground truth, distinguishing it from sibling tools that involve analysis or generation. It emphasizes this data should be cited, not guessed.

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

Usage Guidelines4/5

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

Provides clear guidance on when to use (for ground truth) and suggests using the section parameter. However, no explicit when-not-to-use or alternatives, though siblings like analyze_repo imply different use cases.

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

repo_summaryB

Get a high-level summary of the analyzed repository including tech stack, structure, and key components.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoOptional: path to repo if different from last analyzed

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description must fully disclose behavioral traits, but it only states the action. It does not mention that the tool requires a repository to have been analyzed, that it is read-only, or any constraints like 'last analyzed' implication.

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, front-loaded sentence with no unnecessary words. It efficiently conveys the tool's purpose.

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 has one optional parameter and no output schema, the description is minimally complete. However, it omits details about the output format and prerequisites (e.g., requiring prior analysis), which would be helpful for an agent.

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 100%, and the description does not add meaning beyond what is already in the schema for the 'path' parameter. The baseline of 3 is appropriate.

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 it gets a high-level summary including tech stack, structure, and key components, which is specific and informative. However, it does not explicitly differentiate from sibling tools like ask_repo or analyze_repo, but the distinct purpose is inferable.

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 on when to use this tool versus alternatives, nor any context about prerequisites (e.g., requiring a prior analysis). The description is purely declarative.

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

risk_reportC

Generate a risk assessment report identifying code smells, complexity hotspots, and areas that might cause problems.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoOptional: path to repo if different from last analyzed

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, and the description does not disclose whether the tool is read-only, requires permissions, or has side effects. It only states it generates a report, leaving behavioral traits unclear.

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, concise sentence that directly states the tool's purpose without extraneous information.

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 the complexity of a risk assessment report, the description lacks details on the report's structure, output format, or behavior. It does not compensate for the absence of an output schema.

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?

The single optional parameter 'path' is already fully described in the input schema. The tool description adds no additional meaning beyond the schema, achieving baseline for high 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 generates a risk assessment report focusing on code smells and complexity hotspots. However, it does not differentiate from sibling tools like analyze_repo or repo_summary, which may have overlapping purposes.

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 on when to use this tool vs alternatives such as analyze_repo, repo_summary, or why_is_this_weird. The description lacks context on appropriate use cases.

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

why_is_this_weirdA

Explain why a specific file is the way it is, based on git history. Answers questions like 'Why is this file so complex?' with data: 'Because it's been rewritten 12 times by 5 different people.'

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoOptional: path to repo if different from last analyzed
file_pathYesThe relative path to the file to analyze (e.g., 'src/auth/login.ts')

TDQS

A3.8/5.0
Behavior3/5

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

The description indicates the tool uses git history to answer questions, but with no annotations, it does not disclose whether the tool modifies data, requires special permissions, or the exact nature of its operations. It is adequate but lacks full transparency.

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, consisting of two sentences and an example. It is front-loaded with the primary purpose and efficiently conveys value without unnecessary words.

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?

Given no output schema and a moderate number of parameters, the description explains the tool's behavior well, including an example output. However, it does not address edge cases like files with no history or error conditions, leaving some gaps.

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?

The input schema has 100% description coverage for both parameters, so the schema itself provides parameter meaning. The description adds context about the analysis type (git history, complexity) but does not extend parameter semantics significantly beyond 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: 'Explain why a specific file is the way it is, based on git history.' It provides a concrete example question and answer, distinguishing it from sibling tools like get_history or analyze_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 for understanding file complexity via git history, but it does not explicitly state when to use this tool versus alternatives (e.g., get_history for raw history), nor does it provide any 'when not to use' guidance.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv1.0.0
    • First observedanalyze_repo
    • First observedask_repo
    • First observedget_history
    • First observedget_snapshot
    • First observedrepo_summary
    • First observedrisk_report
    • First observedwhy_is_this_weird

TDQS

A3.5/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: analyze_repo is for initial analysis, ask_repo for questions, get_history for git history, get_snapshot for authoritative data, repo_summary for high-level summary, risk_report for risk assessment, and why_is_this_weird for explaining file history. No overlap.

Naming Consistency3/5

Most tools follow a verb_noun pattern (analyze_repo, ask_repo, get_history, get_snapshot), but repo_summary and risk_report are noun_noun, and why_is_this_weird is a full sentence, creating inconsistency.

Tool Count5/5

Seven tools is well-scoped for a repository analysis server, providing essential functionality without being overwhelming or insufficient.

Completeness4/5

The tool set covers key aspects: analysis, Q&A, history, snapshot, summary, and risk assessment. Minor gaps like direct file search or comparison are missing but can be partially addressed by ask_repo.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers