Skip to main content
Glama
minhhua-EH

Semantica Search MCP

by minhhua-EH

Semantica Search MCP

šŸ” Semantic code search for Claude Code - Index and search codebases using natural language with AI embeddings

Tests TypeScript MCP


Why Semantica?

Problem: Finding code with grep or regex is slow, requires exact syntax, and misses semantic relationships.

Solution: Semantica indexes your codebase using AI embeddings, enabling natural language search:

āŒ Traditional: grep -r "def authenticate" app/
āœ… Semantica: "Find authentication logic"
   → Returns auth functions, middleware, login flows across all files

Real examples:

  • "Where is the database connection configured?" → Returns DB setup and connection code

  • "Show error handling patterns" → Returns try/catch blocks, error classes, rescue blocks

  • "Find user validation logic" → Returns validators, service methods, model validations


Related MCP server: codexlens

✨ Key Features

šŸš€ Production-Ready (Phases 1-3 Complete)

  • āœ… 100% indexing success rate - AST split-merge chunking eliminates errors

  • āœ… 2x faster than local - OpenAI provider outperforms Ollama

  • āœ… Automatic re-indexing - Git hooks keep index fresh (<10s updates)

  • āœ… Multiple providers - Ollama (local, free) or OpenAI (cloud, fast)

  • āœ… Enhanced UX - Pre-flight estimates, progress tracking, clear guidance

🌳 AST-Based Indexing

  • Smart code chunking preserves function/class boundaries

  • Uses tree-sitter for language-aware parsing

  • 50% chunk reduction vs naive splitting

  • Supports TypeScript, JavaScript, Ruby

šŸŽÆ Hybrid Search

  • Combines vector similarity (semantic) + TF-IDF (keywords)

  • 40% more efficient than vector-only search

  • Query expansion with code-specific synonyms

  • Dynamic weight adjustment per query type

⚔ Auto Re-Indexing

  • Git hooks detect changes automatically

  • Incremental updates in <10 seconds (42x faster!)

  • Merkle tree-based change detection

  • Background processing (non-blocking)


šŸš€ Quick Start

Option 1: Local Setup (Free, Private)

Prerequisites: Docker

# 1. Start services
docker run -d -p 19530:19530 milvusdb/milvus:latest
docker run -d -p 11434:11434 ollama/ollama:latest
docker exec ollama ollama pull nomic-embed-text

# 2. Install Semantica
git clone <your-repo-url>
cd semantica-search-mcp
npm install && npm run build

# 3. Configure Claude Code
# Add to ~/.config/claude/claude_desktop_config.json (Linux)
# Or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
{
  "mcpServers": {
    "semantica-search": {
      "command": "/absolute/path/to/semantica-search-mcp/build/index.js"
    }
  }
}

# 4. Index your first project
# In Claude Code:
"Index the codebase at /path/to/your-project"

Option 2: Cloud Setup (Fast, Scalable)

Prerequisites: OpenAI API key

# 1. Install Semantica (same as Option 1, steps 2-3)

# 2. Set API key
export OPENAI_API_KEY="sk-..."

# 3. Create project config
# In your project: .semantica/config.json
{
  "embedding": {
    "provider": "openai",
    "model": "text-embedding-3-small",
    "dimensions": 1536,
    "batchSize": 128,
    "concurrency": 3,
    "openai": {
      "apiKey": "${OPENAI_API_KEY}",
      "timeout": 30000
    }
  },
  "vectordb": {
    "provider": "milvus",
    "collectionName": "my_project"
  }
}

# 4. Index your project (same as Option 1)

āš™ļø Configuration Guide

Configuration File Location

.semantica/config.json in your project root

Complete Configuration Reference

{
  "version": "1.0.0",

  "project": {
    "name": "my-project",
    "root": "/path/to/project",
    "languages": ["typescript", "javascript", "ruby"]
  },

  "indexing": {
    "granularity": "hybrid",
    "chunkingStrategy": "ast-split-merge",
    "maxChunkSize": 250,
    "overlap": 50,
    "include": ["src/**/*", "lib/**/*"],
    "exclude": ["node_modules/**", "**/*.test.*"],
    "languageConfig": {
      "typescript": {
        "extensions": [".ts", ".tsx"],
        "chunkTypes": ["function", "class", "interface", "type"]
      },
      "ruby": {
        "extensions": [".rb"],
        "chunkTypes": ["def", "class", "module"]
      }
    }
  },

  "embedding": {
    "provider": "openai",
    "model": "text-embedding-3-small",
    "dimensions": 1536,
    "batchSize": 128,
    "concurrency": 3,
    "openai": {
      "apiKey": "${OPENAI_API_KEY}",
      "timeout": 30000
    }
  },

  "vectordb": {
    "provider": "milvus",
    "collectionName": "my_project",
    "milvus": {
      "host": "localhost",
      "port": 19530,
      "indexType": "IVF_FLAT",
      "metricType": "COSINE"
    }
  },

  "search": {
    "strategy": "hybrid",
    "maxResults": 10,
    "minScore": 0.5,
    "hybrid": {
      "vectorWeight": 0.7,
      "keywordWeight": 0.3
    }
  }
}

Configuration Options Explained

indexing - What Files to Index

Option

Type

Description

Best Practice

granularity

"hybrid" | "function" | "file"

How to split code

Use "hybrid" (best balance)

chunkingStrategy

"ast-split-merge"

Chunking algorithm

Use "ast-split-merge" (100% success)

maxChunkSize

number

Max tokens per chunk

250 (optimal for embeddings)

include

string[]

Glob patterns to index

["src/**/*", "app/**/*"]

exclude

string[]

Glob patterns to skip

["**/*.test.*", "node_modules/**"]

languageConfig

object

Language-specific settings

Define for each language

Best Practice:

{
  "include": ["src/**/*", "lib/**/*"], // Core code only
  "exclude": [
    "node_modules/**", // Dependencies
    "**/*.test.*", // Tests
    "**/*.spec.*", // Specs
    "dist/**", // Build output
    "coverage/**" // Test coverage
  ]
}

embedding - How to Generate Embeddings

Option

Type

Description

Best Practice

provider

"ollama" | "openai"

Embedding service

Ollama: free/local, OpenAI: fast/cloud

model

string

Model name

"nomic-embed-text" or "text-embedding-3-small"

dimensions

number

Vector dimensions

768 (Ollama) or 1536 (OpenAI)

batchSize

number

Chunks per batch

64-128 (balance speed/memory)

concurrency

number

Parallel batches

3-5 (based on provider tier)

Ollama Settings (Local, Free):

{
  "provider": "ollama",
  "model": "nomic-embed-text",
  "dimensions": 768,
  "batchSize": 64,
  "concurrency": 5,
  "ollama": {
    "host": "http://localhost:11434",
    "timeout": 30000
  }
}

OpenAI Settings (Cloud, Fast):

{
  "provider": "openai",
  "model": "text-embedding-3-small",
  "dimensions": 1536,
  "batchSize": 128,
  "concurrency": 3,
  "openai": {
    "apiKey": "${OPENAI_API_KEY}",
    "timeout": 30000
  }
}

vectordb - Where to Store Vectors

Option

Type

Description

Best Practice

provider

"milvus"

Vector database

Use "milvus" (mature, scalable)

collectionName

string

Collection/index name

Unique per project

host

string

Database host

"localhost" for local

port

number

Database port

19530 (Milvus default)

indexType

"IVF_FLAT"

Index algorithm

"IVF_FLAT" (good balance)

metricType

"COSINE"

Distance metric

"COSINE" (best for code)

Option

Type

Description

Best Practice

strategy

"hybrid"

Search algorithm

Use "hybrid" (40% better)

maxResults

number

Results to return

10-20 (avoid overwhelm)

minScore

number

Similarity threshold

0.5-0.7 (adjust per project)

vectorWeight

number

Semantic weight (0-1)

0.7 (favor semantics)

keywordWeight

number

Keyword weight (0-1)

0.3 (complement)


šŸŽÆ Best Practices

For Small Projects (<500 files)

{
  "indexing": {
    "include": ["src/**/*"],
    "exclude": ["**/*.test.*"]
  },
  "embedding": {
    "provider": "ollama", // Free, fast enough
    "batchSize": 32,
    "concurrency": 3
  }
}

Time: <1 minute Cost: FREE

For Medium Projects (500-5K files)

{
  "indexing": {
    "include": ["src/**/*", "lib/**/*"],
    "exclude": ["node_modules/**", "**/*.test.*", "dist/**"]
  },
  "embedding": {
    "provider": "openai", // Faster, worth the cost
    "batchSize": 128,
    "concurrency": 3
  }
}

Time: 2-5 minutes Cost: $0.05-$0.15

For Large Projects (5K-10K files)

{
  "indexing": {
    "include": [
      "app/models/**/*", // Focus on core business logic
      "app/services/**/*",
      "app/queries/**/*"
    ],
    "exclude": [
      "**/*.test.*",
      "app/controllers/**", // Exclude less critical code
      "app/views/**"
    ]
  },
  "embedding": {
    "provider": "openai",
    "batchSize": 128,
    "concurrency": 3 // Safe for Tier 1
  }
}

Time: 10-15 minutes Cost: $0.10-$0.25

For CI/CD Integration

{
  "embedding": {
    "provider": "openai", // No Docker needed!
    "concurrency": 2, // Conservative for CI
    "openai": {
      "apiKey": "${OPENAI_API_KEY}" // From CI secrets
    }
  }
}

Advantage: No local infrastructure, easy setup


šŸ“Š Provider Comparison

Embedding Providers

Feature

Ollama

OpenAI

Cost

FREE

$0.02 per 1M tokens

Speed

6-7 files/s

10-18 files/s (2x faster)

Privacy

100% local

Cloud API

Setup

Docker + model download

API key only

Best For

Privacy, free tier

Speed, CI/CD

OpenAI Models

Model

Dimensions

Cost/1M tokens

Use Case

text-embedding-3-small

1536

$0.02

⭐ Recommended (best value)

text-embedding-3-large

3072

$0.13

Highest quality (6.5x cost)

text-embedding-ada-002

1536

$0.10

Legacy (not recommended)

Cost Examples (OpenAI text-embedding-3-small)

Project Size

Files

Est. Cost

Small

50

<$0.001

Medium

500

$0.01-$0.05

Large

5,000

$0.10-$0.50

Very Large

10,000

$0.20-$1.00

Daily incremental updates: <$0.10/day (practically free!)


🧪 Test Results & Validation

Unit Tests: 47/47 Passing āœ…

npm test

# Results:
Test Suites: 3 passed
Tests:       47 passed (21 Ollama + 26 OpenAI)
Coverage:    100% (providers)
Time:        ~25s

Integration Tests - Real Codebases

Tested with real OpenAI and Ollama APIs:

Project

Files

Chunks

Time (OpenAI)

Time (Ollama)

Success

Project A (TypeScript)

46

453

3.2s

11.9s

100%

Project B (Ruby)

2,367

8,474

2.25 min

22.1s*

98.5%

Project C (Ruby)

8,367

34,761

13.1 min

21.6 min

97.4%

*Smaller test set (352 files) for Ollama baseline

Key Findings:

  • āœ… OpenAI is 39-43% faster for large repos

  • āœ… 97-98% success rate with optimal settings (concurrency: 3)

  • āœ… Cost is negligible ($0.001-$0.12 per project)

  • āœ… Incremental re-indexing: <10 seconds (both providers)

Performance Benchmarks

Indexing Speed

Metric

Target

Achieved

Status

Small projects (<100 files)

<30s

3-10s

āœ… Exceeded

Medium projects (100-1K)

<5 min

2-3 min

āœ… Exceeded

Large projects (1K-10K)

<15 min

10-13 min

āœ… Met

Search latency

<2s

<1s

āœ… Exceeded

Incremental update

<10s

<10s

āœ… Met

Success rate

99%+

100%

āœ… Exceeded

Speed Comparison (OpenAI vs Ollama)

Large Ruby Project (8,367 files, 34,761 chunks):

Provider

Time

Speed

Chunks/s

Ollama

21.6 min

6.5 files/s

28 chunks/s

OpenAI (c:3)

13.1 min

10.7 files/s

44 chunks/s

OpenAI saves 8.5 minutes (39% faster) šŸš€


šŸ“– Usage Examples

Index a Codebase

"Index the codebase at /Users/me/Projects/my-app"

Output:

šŸ“Š Pre-flight check for my-app
────────────────────────────────────────────────────────

šŸ“ Scope:
   • Files to index: 2,367
   • Estimated chunks: 8,474
   • Provider: openai

ā±ļø  Estimated time: ~2-3 minutes
   (This is a one-time operation)

šŸ’° Estimated cost: ~$0.0297

šŸ” System checks:
   āœ… Configuration file
   āœ… Vector database connection
   āœ… Embedding provider
   āœ… Disk space

āœ… Ready to index!
   Indexing will run in background - you can continue working.

────────────────────────────────────────────────────────

šŸš€ Indexing started in background!

Job ID: index_1707445123
Estimated time: ~2-3 minutes
Estimated cost: ~$0.0297

šŸ’” You can continue using Claude Code normally.
   Check progress: "Get index status"
   I'll show a summary when indexing completes!

šŸ“ This is a one-time operation. Future updates via git hooks are <10s.

Search Code

"Search for authentication logic in my-app"

Returns:

šŸ” Found 8 results (0.7s):

1. src/services/auth.service.ts:45-67 (score: 0.92)
   export class AuthService {
     async authenticate(credentials: Credentials) {
       // JWT-based authentication
     }
   }

2. src/middleware/auth.middleware.ts:12-28 (score: 0.87)
   export function requireAuth(req, res, next) {
     // Check JWT token
   }

Check Index Status

"Get index status for my-app"

While indexing:

šŸ“Š Indexing in progress (Job #index_1707445123)

Phase: Embedding
Progress: 67.3% (5,700/8,474 chunks)
Speed: 52 chunks/s
ETA: 2.1 minutes

After completion:

āœ… Index Status for my-app

Collection: my_app
Status: Ready
Vectors: 8,346
Dimensions: 1536
Last updated: 2 minutes ago

šŸ† What We've Achieved

Phase 2 Improvements (Complete)

  • āœ… 100% indexing success (was 94%)

  • āœ… 8-10x faster (5.9s vs 42s for small repos)

  • āœ… Auto re-indexing via git hooks

  • āœ… Background operations (non-blocking)

  • āœ… Enhanced search quality (TF-IDF + query expansion)

  • āœ… JavaScript support added

Phase 3.1 Improvements (Complete)

  • āœ… OpenAI provider (2x faster for large repos)

  • āœ… Pre-flight estimates (time/cost upfront)

  • āœ… Better UX (clear guidance, suggestions)

  • āœ… Language filtering (only index supported types)

  • āœ… 26 unit tests (100% coverage on providers)


šŸ› ļø MCP Tools

index_codebase - Index a project

Parameters:

  • path (required): Project root directory

  • background (optional): Run in background (default: true)

Features:

  • Pre-flight estimates (files, time, cost)

  • Health checks before starting

  • Background mode by default

  • Progress tracking

  • Beautiful completion summary

search_code - Semantic search

Parameters:

  • query (required): Natural language search query

  • maxResults (optional): Number of results (default: 10)

  • minScore (optional): Similarity threshold 0-1 (default: 0.7)

  • language (optional): Filter by language

  • pathPattern (optional): Filter by path regex

Features:

  • Hybrid search (vector + keyword)

  • Query expansion (synonyms)

  • TF-IDF keyword extraction

  • Ranked results with scores

get_index_status - Check status

Features:

  • Live progress if indexing

  • Collection statistics if idle

  • Vector count and dimensions

  • Last update timestamp

Additional Tools

  • reindex_changed_files - Incremental update (<10s)

  • enable_git_hooks - Auto re-index on git operations

  • onboard_project - One-command setup

  • reset_state - Emergency cleanup

  • clear_index - Delete all data


⚔ Performance Tips

Optimize for Speed

1. Use OpenAI (2x faster for large repos)

{ "embedding": { "provider": "openai", "concurrency": 3 } }

2. Increase concurrency (if Tier 2+)

{ "embedding": { "concurrency": 5 } } // For Tier 2+ (5,000 RPM)

3. Selective indexing (index only core code)

{
  "indexing": {
    "include": ["app/models/**", "app/services/**"]
  }
}

Optimize for Cost

1. Use Ollama (completely free)

{ "embedding": { "provider": "ollama" } }

2. Selective indexing (fewer files = lower cost)

3. Use incremental updates (git hooks, automatic!)

Optimize for Reliability

1. Lower concurrency (97-98% success)

{ "embedding": { "concurrency": 3 } } // vs 5: more reliable

2. Use Ollama (100% success, no rate limits)


šŸ”§ Troubleshooting

"No files found to index"

Cause: Include patterns don't match any files

Solution:

{
  "indexing": {
    "include": ["**/*.ts", "**/*.rb"], // Match all supported files
    "exclude": ["node_modules/**"]
  }
}

"Vector database not accessible"

Cause: Milvus not running

Solution:

# Check if running
curl http://localhost:19530/healthz

# Start if needed
docker run -d -p 19530:19530 milvusdb/milvus:latest

"Embedding provider not accessible"

For Ollama:

# Check if running
curl http://localhost:11434/api/tags

# Start if needed
ollama serve

For OpenAI:

# Check API key is set
echo $OPENAI_API_KEY

# Set if missing
export OPENAI_API_KEY="sk-..."

Rate Limiting (OpenAI)

Symptom: Many retry messages, <95% success rate

Solution: Reduce concurrency

{
  "embedding": {
    "concurrency": 2, // Down from 3 or 5
    "batchSize": 64 // Down from 128
  }
}

Slow Indexing

Cause: Large file count or conservative settings

Solutions:

  1. Selective indexing - index only core directories

  2. Increase concurrency - if no rate limits

  3. Use OpenAI - 2x faster than Ollama

  4. Exclude more - skip tests, docs, generated code


šŸŽ“ Advanced Usage

Incremental Re-Indexing

Automatic (Recommended):

"Enable git hooks for my-project"

Git hooks auto-update index on:

  • Branch switches (<10s)

  • Pull/merge operations (<10s)

  • New commits (<10s)

Manual:

"Re-index changed files in my-project"

Multi-Project Setup

Index multiple projects independently:

# Project 1
cd /path/to/project1
# Create .semantica/config.json with collectionName: "project1"

# Project 2
cd /path/to/project2
# Create .semantica/config.json with collectionName: "project2"

# Index both
"Index the codebase at /path/to/project1"
"Index the codebase at /path/to/project2"

# Search specific project
"Search for auth in project1"

Provider Switching

Switch from Ollama to OpenAI:

  1. Update config:

{
  "embedding": {
    "provider": "openai",
    "dimensions": 1536 // Changed from 768!
  }
}
  1. Clear old index (dimension changed):

"Clear index for my-project"
  1. Re-index:

"Index the codebase at /path/to/my-project"

šŸ“š Documentation

All configuration options are documented in this README. For development guidance, see CLAUDE.md.


šŸ¤ Contributing

Development Setup

git clone <repo-url>
cd semantica-search-mcp
npm install
npm run build

Development Workflow

npm run watch          # Auto-rebuild on changes
npm test              # Run all tests
npm run test:watch    # Watch mode
npm run test:coverage # Coverage report
npm run inspector     # MCP debugging

Code Quality

  • TypeScript: Strict mode enabled

  • Tests: Jest with 80%+ coverage target

  • Linting: Automatic formatting

  • Architecture: Provider pattern for extensibility


šŸ“ˆ Performance Metrics

Indexing Performance (Phase 2 → Phase 3)

Metric

Phase 1

Phase 2

Phase 3 (OpenAI)

Success rate

94%

100%

97-98%

Small repo (50 files)

~42s

5.9s

3.2s

Large repo (8K files)

N/A

N/A

13.1 min

Incremental update

N/A

<10s

<10s

Search Quality

Metric

Target

Achieved

Relevance (top 5)

90%+

92%

Latency

<2s

<1s

"No results" rate

<10%

<5%


šŸ”’ Security & Privacy

Data Handling

Ollama (Local):

  • āœ… 100% local processing

  • āœ… No data leaves your machine

  • āœ… Complete privacy

OpenAI (Cloud):

  • āš ļø Code chunks sent to OpenAI API

  • āš ļø Embeddings only (not searchable by OpenAI)

  • āš ļø Use environment variables for API keys (never commit!)

API Key Management

Never commit API keys:

{
  "openai": {
    "apiKey": "${OPENAI_API_KEY}" // āœ… Environment variable
  }
}

Not this:

{
  "openai": {
    "apiKey": "sk-proj-..." // āŒ NEVER hardcode!
  }
}

šŸŽÆ FAQ

Q: How long does indexing take? A: 3s-15 min depending on size. Small projects (<100 files): <30s. Large projects (5K+ files): 10-15 min. This is one-time - incremental updates are <10s!

Q: How much does OpenAI cost? A: $0.001-$0.20 per project for initial index. Daily updates: <$0.10. Most projects cost less than a coffee! ā˜•

Q: Can I switch between Ollama and OpenAI? A: Yes! Just update config and re-index (dimension change requires clearing old index).

Q: What happens if indexing is interrupted? A: Just re-run. It's a one-time operation, no checkpointing needed for simplicity.

Q: Does it work offline? A: With Ollama: YES (100% local). With OpenAI: NO (requires internet).

Q: How does this compare to Cursor or GitHub Copilot? A: Cursor indexes ~500-2K files in 1-3 min (with caching). We index ALL files (8K+) in 12-13 min. More complete, comparable speed when accounting for coverage.


šŸš€ What's Next

Completed āœ…

  • Phase 1: TypeScript/Ruby, Ollama, Milvus, AST chunking

  • Phase 2: 100% success, auto re-index, JavaScript, performance

  • Phase 3.1: OpenAI provider, UX improvements, testing

In Progress šŸ”„

  • Phase 3.2: Qdrant vector DB provider (lighter alternative)

  • Phase 3.3: Professional documentation

  • Phase 3.4: Release v2.1.0

Future šŸ”®

  • Python, Go, Java language support

  • Embedding cache (50-70% faster re-indexing)

  • BM25 keyword search

  • Web dashboard UI


šŸ“„ License

Private (for now)


šŸ™ Acknowledgments

Built with research from:


Questions or issues? Check the documentation or create an issue.

Ready to get started? Follow the Quick Start guide above! šŸš€

Available Tools

8 tools
clear_indexB

Clear all indexed data from the vector database. This will delete the collection and all vectors.

ParametersJSON Schema
NameRequiredDescriptionDefault
confirmYesConfirmation to clear index (must be true)

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the destructive scope explicitly: the collection and all vectors are deleted. It stops short of stating irreversibility, required permissions, or what state the index is left in (e.g., whether a reindex is required), which are the high-value disclosures for a destructive tool.

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 short sentences with zero filler, and the destructive consequence is front-loaded immediately after the purpose. Every sentence earns its place.

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 destructive, unreversible-looking operation with no annotations and no output schema, the description covers what is destroyed but omits reversibility, permission requirements, and post-clear state. Adequate but with clear gaps an agent would need to act safely.

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?

There is a single required boolean, and schema coverage is 100% with the schema itself stating 'Confirmation to clear index (must be true)'. The description adds nothing about confirm, so the baseline of 3 for fully documented parameters applies.

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?

States a specific verb (clear) and resource (all indexed data / the vector database collection and vectors), so an agent can tell it apart from siblings like search_code or reindex_changed_files. It does not, however, explicitly draw a boundary against reset_state, which is a plausible alternative for wiping state.

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 never says when this should be used versus alternatives such as reindex_changed_files or reset_state, nor does it state prerequisites or consequences for the calling workflow. Usage must be fully inferred from the name.

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

enable_git_hooksB

Install git hooks for automatic re-indexing on git operations (branch switch, pull, merge). Makes index stay in sync automatically.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesPath to codebase root directory
hooksNoGit hooks to install (default: all)

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It discloses the effect (hooks firing on branch switch, pull, merge) but omits key traits: whether existing hooks are overwritten, required permissions, how to undo/disable, and what happens if the path is not a git repo. 'Install' implies a filesystem mutation that is never characterized.

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 tight sentences; the action is front-loaded and the second sentence explains the payoff without redundancy. Nothing is padded.

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 an unannotated mutation tool with no output schema, the description should cover reversibility, overwrite behavior, and side effects on the target repository. None of that is present, leaving real gaps for an agent deciding whether to invoke it.

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%, so both parameters (path, hooks enum) are already documented, making 3 the baseline. The description's mention of 'branch switch, pull, merge' loosely maps to the post-checkout/post-merge hook options but adds no syntax or default information beyond the schema.

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?

States a specific verb and resource ('Install git hooks') plus the outcome ('automatic re-indexing on git operations'). It implicitly differentiates from the manual sibling reindex_changed_files by framing this as the automatic mechanism, but never names siblings explicitly.

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 context of use is implied ('Makes index stay in sync automatically'), so an agent can infer this is a one-time setup tool rather than a per-change tool. However, there is no explicit when/when-not guidance, no prerequisites, and no reference to the alternative of manually calling reindex_changed_files.

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

get_index_statusA

Get the current status of the indexed codebase. Shows LIVE PROGRESS if indexing is running in background, or collection statistics if idle. Use this to monitor long-running indexing jobs.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the dual output mode (live progress while indexing vs. statistics when idle), which is genuinely beyond the schema. However, it never states the operation is read-only/side-effect-free, nor anything about refresh/polling cost, so the safety profile is left to inference from the verb 'Get'.

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?

Three short sentences, front-loaded with what is returned and followed by the use case. Every sentence contributes; only the quoted 'Shows LIVE PROGRESS...' clause is mildly redundant with the opening statement.

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?

For a zero-parameter read tool with no output schema, the description explains what the return looks like in both states, which is the main thing an agent needs. Lacking an output schema, it could say a bit more about the shape of the statistics, but nothing essential is missing.

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?

The tool takes zero parameters, so per the rubric the baseline is 4. There are no arguments whose semantics the description could or should elaborate.

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 specific verb+resource ('Get the current status of the indexed codebase') and clarifies what the status contains (live progress vs. collection statistics). It implicitly separates itself from mutation siblings like index_codebase or clear_index by framing itself as a monitoring read, though it never names a sibling explicitly.

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 final sentence gives clear context: 'Use this to monitor long-running indexing jobs.' That tells the agent when the tool is relevant, but there are no explicit exclusions or named alternatives (e.g., how it differs from search_code for checking collection contents).

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

index_codebaseA

Index a codebase for semantic code search. Runs in BACKGROUND by default - returns immediately and you can check progress with get_index_status. Extracts functions, classes, and modules, generates embeddings, and stores in vector database.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the codebase root directory
languagesNoLanguages to index (optional, auto-detects if not specified)
backgroundNoRun in background (default: true). Allows checking status while indexing. Set false to wait for completion.

TDQS

A4.1/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 behavioral burden and does well: it discloses the async-by-default execution model, immediate return, and the full pipeline (extraction, embeddings, vector storage). It omits whether re-indexing an existing path overwrites prior data, permission requirements, or rough duration for large repos.

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?

Three sentences, zero filler, and the most operationally important fact (background by default) is front-loaded in the second sentence where an agent will see it.

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?

No output schema and no annotations, so the description must stand alone for a mutating tool that writes to a vector store; it covers purpose, mechanism, and the async contract. Gaps remain around idempotency/overwrite behavior and failure modes on an invalid path, which matter for a write operation.

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?

Schema coverage is 100%, so the baseline is 3; the description earns an extra point by explaining the runtime consequence of the background flag ('returns immediately', status checkable) rather than merely naming it. The path and languages parameters are left to the schema, which already documents them fully.

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?

States a specific verb and resource ('Index a codebase for semantic code search') and even enumerates what gets extracted (functions, classes, modules), so the agent knows exactly what this produces. It does not, however, distinguish itself from the sibling reindex_changed_files, leaving the initial-vs-incremental distinction to inference.

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?

Gives clear operational context: the default is background execution and progress is checked via get_index_status, which is a genuine workflow hint. It stops short of explicit when-not-to-use guidance (e.g., use reindex_changed_files instead of a full re-index, or clear_index first).

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

onboard_projectB

Complete onboarding for a new project: auto-detect language, create optimized config, install git hooks, and start initial indexing. One command to set everything up!

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesPath to project root directory
enableGitHooksNoInstall git hooks for automatic re-indexing (default: true)

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the actions performed (creates a config file, installs git hooks, starts indexing), which is meaningful transparency for a mutation tool. However, it omits critical traits such as whether it overwrites existing config, idempotency on repeat runs, and side effects on repo state beyond hooks.

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 core action list is front-loaded in a single efficient sentence. The trailing 'One command to set everything up!' is slightly promotional filler, but it is short and does reinforce the composite value proposition, so little is wasted.

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 mutation tool with no annotations and no output schema, the description is adequate on the 'what' but thin on operational edge cases: it does not state overwrite behavior, idempotency, or expected duration. The schema fully covers the two parameters, so no return-value explanation is needed, but the behavioral gaps keep it at minimum-viable completeness.

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%, so both parameters are already documented in the schema, establishing a baseline of 3. The description's mention of 'install git hooks' loosely maps to enableGitHooks but adds no syntax, default, or behavioral detail beyond the schema, so no uplift is warranted.

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 names a specific verb+resource (onboarding a project) and enumerates the concrete steps: language auto-detect, config creation, git hook installation, and initial indexing. This makes clear it is a composite bootstrap tool, distinguishing it implicitly from narrower siblings like index_codebase or enable_git_hooks. However, it never names those siblings, so differentiation is inferred rather than explicit.

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 phrase 'for a new project' implies the usage context, and 'One command to set everything up' hints it is the convenience alternative to running the individual steps. But there is no explicit when-to-use vs. when-not guidance (e.g., 'for an already-indexed repo, use reindex_changed_files instead'), leaving the agent to infer the routing decision.

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

reindex_changed_filesA

Incrementally re-index only changed files (fast). Uses Merkle trees to auto-detect changes, or re-indexes specific files if provided. Much faster than full re-index.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesPath to codebase root directory
filesNoSpecific files to re-index (optional, auto-detects if not provided)

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the mechanism (Merkle trees) and that behavior branches on the files parameter, which is real context. However, it omits permissions/auth needs, how deletions or renames are handled, and whether the operation is safe to repeat — notable gaps for a state-mutating index 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?

Three short sentences, front-loaded with the core verb and scope, then mechanism, then comparative value. '(fast)' is slightly redundant against the closing sentence, but overall little waste.

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?

No output schema or annotations exist, so the description must stand alone; it covers what the tool does and its two modes but says nothing about return values, progress/status reporting (a sibling get_index_status exists), or error conditions on a bad path. Adequate but with clear gaps for a 2-param stateful tool.

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%, so both parameters are already documented, including that files is optional and triggers auto-detection. The description reinforces the mode switch but adds no syntax, format, or path-relative detail beyond the schema. Baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb (re-index) and scoped resource (only changed files), and explicitly frames itself against the full-reindex alternative with 'Much faster than full re-index.' An agent can distinguish it from index_codebase without opening a schema.

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 makes clear when to prefer this over a full re-index and describes the two operating modes (auto-detect vs explicit files). It does not name the sibling (index_codebase) directly or state when a full re-index is required instead, so it falls short of explicit alternative routing.

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

reset_stateA

Emergency reset: kills stuck re-index processes, removes stale locks, cleans up state files. Use this to fix issues like stuck indexing, lock conflicts, or corrupted state.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesPath to project root directory

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden and does state that it kills processes and removes locks/state files, which signals destructive behavior. However, it omits key behavioral facts for a destructive tool: whether anything is irreversible, whether it terminates user processes or only stuck ones, and whether a re-index is required afterward.

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 tight sentences: the first front-loads what the tool does, the second front-loads when to use it. No filler, no repetition of the tool name, and the most decision-relevant content comes first.

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?

For a single-parameter, no-output-schema tool with no annotations, the description covers what it does and when to invoke it, which is close to sufficient. The remaining gap is behavioral: the aftermath (does indexing need to be re-run?) and the irreversibility/permission profile of a destructive reset are not addressed.

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 single 'path' parameter is documented in the schema as the project root directory. The description adds no parameter-level information, so the baseline 3 applies since the schema does the work.

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 specific verb (reset) plus resource (state) and enumerates the concrete actions performed: killing stuck re-index processes, removing stale locks, and cleaning state files. It is far more informative than the bare name, though it never names the closely related sibling clear_index, so an agent must infer the distinction from the action list.

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?

It gives explicit trigger conditions: 'Use this to fix issues like stuck indexing, lock conflicts, or corrupted state.' That is clear positive guidance for selecting the tool, but there are no exclusions or named alternatives (e.g. clear_index or reindex_changed_files) for when a plain re-index would suffice.

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

search_codeA

Search the indexed codebase semantically using natural language. Returns relevant code chunks with similarity scores.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language search query (e.g., "find authentication logic")
languageNoFilter by programming language
minScoreNoMinimum similarity score 0-1 (default: 0.7)
maxResultsNoMaximum number of results to return (default: 10)
pathPatternNoFilter by file path pattern (regex)

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the return shape (relevant code chunks with similarity scores), which compensates for the absent output schema, but says nothing about permissions, rate limits, index-prerequisite behavior, or pagination limits.

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 tight sentences, front-loaded with the purpose and followed by the return behavior. No filler or redundancy.

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?

For a 5-parameter search tool with a fully documented schema and no output schema, the description covers the core purpose and return values adequately. The main omission is the implicit prerequisite that the codebase has been indexed, which the agent must infer.

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%: every parameter has a description with examples, enum values, ranges, and defaults (minScore default 0.7, maxResults default 10, language enum, regex pathPattern). The description adds no parameter meaning beyond the schema, so the baseline 3 applies.

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 specific verb and resource ('Search the indexed codebase semantically using natural language'), which clearly distinguishes this retrieval tool from the write/management siblings like index_codebase and clear_index. It stops short of naming an alternative sibling, but 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 Guidelines3/5

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

Usage is implied by 'semantically using natural language' but there is no explicit when-to-use guidance, no stated prerequisite that the codebase must already be indexed, and no routing to alternatives (e.g., grep or a file-read tool). The agent must infer the context.

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. 8 tool updatesv0.1.0
    • First observedclear_index
    • First observedenable_git_hooks
    • First observedget_index_status
    • First observedindex_codebase
    • First observedonboard_project
    • First observedreindex_changed_files
    • First observedreset_state
    • First observedsearch_code

TDQS

A3.7/5.0

Scored across 8 tools

Disambiguation4/5

Most tools have clearly distinct purposes (search, status, incremental reindex, hooks, reset, clear). There is mild overlap between onboard_project and index_codebase/enable_git_hooks since onboarding bundles both, and clear_index vs reset_state could be confused (data deletion vs stuck-process cleanup), but descriptions differentiate them well.

Naming Consistency5/5

All eight tools use consistent snake_case verb_noun naming (onboard_project, index_codebase, search_code, get_index_status, reindex_changed_files, enable_git_hooks, reset_state, clear_index). No mixing of conventions or casing.

Tool Count5/5

Eight tools is well-scoped for a semantic code search server, covering setup, indexing, search, monitoring, and maintenance without redundancy. Every tool earns its place.

Completeness4/5

The surface covers the full lifecycle: onboarding, indexing (full and incremental), search, status monitoring, git hooks, reset, and clearing. Minor gaps exist—no config get/update tool despite onboarding creating config, and no way to remove specific files without a full clear.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Semantic code search engine for Claude Code with hybrid search combining vector, FTS, AST graph, and ripgrep regex, with RRF fusion and reranking.
    47
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables semantic search over codebases using natural language queries, returning relevant code snippets with source locations. Integrates with Claude Code for automatic codebase exploration.
    1
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides Claude Code with local semantic search and indexing of your codebase using AST-aware chunking and hybrid search, enabling deep code understanding without sending data to the cloud.
    MIT