Skip to main content
Glama
transparentlyok

MCP Context Manager

MCP Context Manager

The smartest code search for Claude. Reduces token usage by 70-90% with BM25 ranking, fuzzy matching, and natural language queries.

npm version License: MIT

What is this?

An MCP (Model Context Protocol) server that gives Claude superhuman code navigation. Instead of reading entire files (thousands of tokens), Claude queries for exactly what it needs (tens of tokens).

The difference:

- Claude reads 3 files β†’ 5,400 tokens β†’ 5 seconds
+ Claude queries "auth middleware" β†’ 230 tokens β†’ 85ms

95% token savings + 10x faster = drastically lower API costs.

Related MCP server: CodeSense MCP

Features

  • 🎯 Natural Language Search - "authentication middleware" finds all auth code

  • πŸ” BM25 Ranking - Industry-standard relevance algorithm (like Elasticsearch)

  • ✨ Fuzzy Matching - Handles typos automatically ("athenticate" β†’ "authenticate")

  • 🧠 Smart Tokenization - Understands camelCase, snake_case, paths

  • πŸš€ Blazing Fast - <100ms searches on 10,000+ file repos

  • 🌐 Multi-Language - TypeScript, JavaScript, Python, Go, Rust, Java, C/C++, C#, Lua

  • πŸ’° Token Savings - 70-90% reduction in typical usage

Quick Start

Installation

npm install -g claude-mcp-context

Automatic Setup (Claude Code CLI):

The package automatically detects and configures Claude Code. After installation, run:

mcp-context-setup

This will:

  1. βœ… Build the server (if needed)

  2. βœ… Verify server functionality

  3. βœ… Register with Claude Code automatically

  4. βœ… Confirm registration

Manual Configuration (Claude Desktop or troubleshooting):

If automatic setup doesn't work or you're using Claude Desktop, add to your config file:

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "context-manager": {
      "command": "claude-mcp-context"
    }
  }
}

Claude Code (~/.claude/mcp.json):

{
  "mcpServers": {
    "context-manager": {
      "command": "claude-mcp-context"
    }
  }
}

Verify Installation:

claude mcp list  # Should show "context-manager"

Usage

Restart Claude and try:

"Index this repository"
"Find the authentication middleware"
"Show me all payment-related functions"
"What does the UserService class do?"

That's it! Claude will now use intelligent search instead of reading entire files.

How It Works

1. Index Your Repository (One Time)

You: "Index this repository"

MCP Context Manager parses all code and builds a searchable index (~1 second per 1000 files).

2. Natural Language Queries

You: "Find authentication middleware"

Returns:
πŸ“ authMiddleware (function) - Score: 892.3
   src/middleware/auth.ts:15

πŸ“ AuthService (class) - Score: 654.2
   src/services/AuthService.ts:8

3. Massive Token Savings

Instead of 5,400 tokens to read 3 files, you get exactly what you need in 230 tokens.

Search Intelligence

Multi-Word Queries

"payment validation" β†’ finds validatePayment(), PaymentValidator, checkPayment()
"user auth service" β†’ finds UserAuthService, authenticateUser(), etc.

Fuzzy Matching

"athenticate" β†’ suggests authenticate
"usrService" β†’ suggests userService

Query Expansion

"auth" β†’ searches: auth, authenticate, authentication, authorization
"db" β†’ searches: db, database, data
"config" β†’ searches: config, configuration, configure, settings

Searches inside function implementations, not just names:

"jwt token" β†’ finds code that uses JWT, even if function isn't named jwt*

Available Tools

Tool

What It Does

get_relevant_context

Natural language search with BM25 ranking

find_symbol

Locate specific function/class with fuzzy suggestions

get_function

Get complete function code

get_class

Get class definition (optionally filter methods)

search_code

Regex pattern search with relevance ranking

find_similar

Discover structurally similar code

get_file_summary

File overview without full content

get_repository_structure

Directory tree view

get_dependencies

Trace imports and dependencies

index_repository

Build/refresh code index

Claude automatically chooses the best tool based on your query.

Examples

Find Authentication Code

You: "Find all authentication-related code"

Claude uses: get_relevant_context("authentication")

Returns:
- authMiddleware() in middleware/auth.ts
- authenticate() in auth/handler.ts
- AuthService class in services/auth.ts
- validateToken() in utils/jwt.ts

Tokens: 340 (vs 4,200 reading all files) = 92% savings

Debug Payment Flow

You: "Show me the payment processing flow"

Claude uses: get_relevant_context("payment processing")

Returns:
- processPayment() function
- PaymentService class
- Related validation and error handling

Then: find_similar("processPayment")

Returns:
- processRefund() (87% similar)
- handlePayment() (72% similar)

Total tokens: 450 (vs 6,000+) = 93% savings

Understand New Codebase

You: "What are the main modules?"

Claude uses: get_repository_structure()

You: "Summarize the auth module"

Claude uses: get_file_summary("src/auth/handler.ts")

Returns structure without reading 200+ lines of code.

Tokens: 180 (vs 2,800) = 94% savings

Performance

Metric

Performance

Search Speed

<100ms average

Indexing Speed

~1s per 1000 files

Accuracy

95%+ on typical queries

Token Savings

70-90% average

Memory Usage

1-5MB index

Real Example: 3,500 file TypeScript monorepo

  • Initial index: 45 seconds

  • Re-index (cached): 2 seconds

  • Search "auth middleware": 78ms, 15 results

  • Token savings: 87% average

Why It's Better

vs. Reading Files Directly

  • βœ… 95% fewer tokens

  • βœ… 10x faster responses

  • βœ… Only relevant code returned

vs. Grep/Ripgrep

  • βœ… BM25 relevance ranking

  • βœ… Fuzzy matching for typos

  • βœ… Natural language queries

  • βœ… AI-optimized output

vs. GitHub Copilot

  • βœ… 70-90% token savings

  • βœ… Works locally (private)

  • βœ… Free and open source

Configuration

The server automatically:

  • Respects .gitignore patterns

  • Excludes node_modules, dist, build

  • Caches index for fast re-indexing

  • Supports 9 programming languages

No configuration needed!

Troubleshooting

MCP server not showing up?

  • Run mcp-context-setup to re-register

  • Check config file path is correct

  • Use absolute paths (not relative)

  • Restart Claude after config changes

  • Verify with: claude mcp list

No symbols found after indexing?

  • Verify file extensions are supported

  • Check files aren't in .gitignore

  • Try: clear_cache then re-index

Slow indexing?

  • Normal for 10,000+ file repos (30-60 seconds)

  • Subsequent indexes use cache (much faster)

Development

git clone https://github.com/transparentlyok/mcp-context-manager
cd mcp-context-manager
npm install
npm run build

# Development mode
npm run dev

# Watch mode
npm run watch

Contributing

Contributions welcome! Ideas:

  • Add more language support

  • Improve search algorithms

  • Add semantic search with embeddings

  • Create web UI

See issues for planned features.

Technical Details

Search Engine:

  • BM25 algorithm (K1=1.5, B=0.75)

  • Levenshtein distance for fuzzy matching

  • 10 parallel search strategies

  • Query expansion dictionary

Parsing:

  • Regex-based extraction (fast, lightweight)

  • Supports 9 languages

  • Extracts functions, classes, types, imports

Caching:

  • File hash-based validation

  • Stored in .mcp-cache/

  • Automatic invalidation on changes

License

MIT License - see LICENSE file.


Built with ❀️ for the AI development community

⭐ Star on GitHub if this saves you tokens!

Available Tools

12 tools
clear_cacheA

Clear the cached index for a repository. Useful if cache becomes corrupted or you want to force a fresh index.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoPath to repository root. Default: process.cwd()

TDQS

A3.7/5.0
Behavior3/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 explains the tool's purpose and when to use it, but doesn't disclose important behavioral traits like whether this operation requires specific permissions, whether it's destructive to data (beyond cache), what happens during execution (e.g., temporary unavailability), or any rate limits. The description adds value but leaves significant gaps.

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 perfectly concise with two sentences that each earn their place. The first states the core action, the second provides usage context. No wasted words, well-structured, and front-loaded with the primary 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's moderate complexity (cache clearing operation with one parameter) and no annotations or output schema, the description provides adequate but incomplete coverage. It explains what the tool does and when to use it, but lacks details about behavioral implications, error conditions, or what happens after execution. For a tool that likely affects system state, more context would be helpful.

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 the schema already fully documents the single 'path' parameter. The description doesn't add any parameter-specific information beyond what the schema provides (e.g., it doesn't explain path format requirements or cache location details). Baseline 3 is appropriate when the schema does all the parameter documentation 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 clearly states the action ('Clear') and target ('cached index for a repository'), providing a specific verb+resource combination. It distinguishes from siblings like 'index_repository' by focusing on cache removal rather than creation. However, it doesn't explicitly differentiate from all possible cache-related operations that might exist in other contexts.

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 provides clear context for when to use this tool ('if cache becomes corrupted or you want to force a fresh index'), giving practical scenarios. It doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools, though 'index_repository' is implied as a follow-up action.

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

find_similarB

Find code similar to a given symbol. Useful for discovering related implementations, similar patterns, or alternative approaches.

ParametersJSON Schema
NameRequiredDescriptionDefault
symbolNameYesThe name of the symbol to find similar code for
limitNoMaximum number of similar symbols to return. Default: 5

TDQS

B3.3/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 full burden of behavioral disclosure. It mentions the tool is 'useful for discovering' purposes, but it doesn't disclose key behavioral traits like whether it's read-only or destructive, authentication needs, rate limits, or how similarity is determined (e.g., based on code structure or semantics). This leaves significant gaps for an AI agent to understand the tool's 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 appropriately sized and front-loaded, consisting of two concise sentences. The first sentence states the purpose clearly, and the second adds useful context without redundancy. Every sentence earns its place, making it efficient and well-structured.

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 no annotations and no output schema, the description is somewhat complete but lacks details on behavioral traits and return values. It covers the purpose and usage context adequately for a simple tool, but for a code analysis tool with potential complexity, it should do more to explain how results are returned or what 'similar' means, making it minimally viable.

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, with clear descriptions for both parameters ('symbolName' and 'limit'). The description adds no additional meaning beyond what the schema provides, such as explaining what a 'symbol' entails or how 'similar' is defined. Since the schema does the heavy lifting, the baseline score 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 the tool's purpose: 'Find code similar to a given symbol.' It specifies the verb ('Find') and resource ('code similar to a given symbol'), making the function understandable. However, it doesn't explicitly differentiate from sibling tools like 'find_symbol' or 'search_code', which might have overlapping purposes, preventing a perfect score.

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

Usage Guidelines3/5

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

The description provides implied usage guidelines by stating it's 'Useful for discovering related implementations, similar patterns, or alternative approaches.' This gives context on when to use it, but it doesn't explicitly mention when not to use it or name alternatives among sibling tools, such as how it differs from 'find_symbol' or 'search_code'.

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

find_symbolA

⭐ PREFERRED FOR SYMBOLS: Use this INSTEAD OF Grep when looking for specific functions, classes, or variables. Fuzzy matching automatically handles typos ("athenticate" β†’ "authenticate"). Returns exact file path and line number. Much faster than Grep with better accuracy.

ParametersJSON Schema
NameRequiredDescriptionDefault
symbolYesThe symbol name to find (e.g., function name, class name, variable name)
typeNoThe type of symbol to find. Use "any" to search all types.

TDQS

A4.4/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 effectively describes key behaviors: fuzzy matching for typos, performance ('much faster'), accuracy ('better accuracy'), and output format ('returns exact file path and line number'). It doesn't mention error handling, rate limits, or authentication needs, but covers core operational traits well.

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 highly concise and front-loaded: the first sentence states the core purpose and key alternative, followed by supporting details. Every sentence earns its place by adding critical information (fuzzy matching, output, performance), with zero 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 the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is nearly complete. It covers purpose, usage, key behaviors, and output, but lacks details on error cases or response structure. With no output schema, it could better explain return values, but it's sufficient 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 description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds no specific parameter semantics beyond implying 'symbol' is for 'functions, classes, or variables' and 'type' filtering, which the schema's enum already covers. This meets the baseline for high schema coverage.

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 with specific verbs ('find', 'returns') and resources ('symbols', 'functions, classes, or variables'), explicitly distinguishing it from sibling tool 'Grep' (likely referring to 'search_code'). It specifies the exact output ('file path and line number') and key features ('fuzzy matching', 'faster', 'better accuracy').

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

Usage Guidelines5/5

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

The description provides explicit usage guidance: 'PREFERRED FOR SYMBOLS: Use this INSTEAD OF Grep when looking for specific functions, classes, or variables.' It clearly states when to use this tool (for symbols) and when not to (use Grep/search_code for other cases), naming the alternative tool directly.

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

get_classA

⭐ PREFERRED OVER Read: Get class definition without reading the entire file. Optionally filter specific methods. Saves 80%+ tokens vs reading full files. Use this when you need class structure or specific class methods.

ParametersJSON Schema
NameRequiredDescriptionDefault
classNameYesThe name of the class to retrieve
methodsNoOptional: specific method names to include. If omitted, returns all methods.
filePathNoOptional: specific file path if known

TDQS

A4.4/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 effectively describes key traits: it's a read operation ('Get'), offers optional filtering, and highlights efficiency gains ('Saves 80%+ tokens'). However, it doesn't mention potential limitations like error handling or performance constraints, leaving some gaps.

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 highly concise and front-loaded, with every sentence earning its place. It starts with a key benefit ('PREFERRED OVER Read'), explains the tool's function, quantifies efficiency, and ends with usage guidanceβ€”all in three efficient sentences with zero waste.

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 the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is largely complete. It covers purpose, usage, and benefits well. However, without an output schema, it doesn't explain return values (e.g., format of class definitions), which is a minor gap in context.

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 the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema by implying filtering capabilities ('Optionally filter specific methods') but doesn't provide additional syntax or format details. Baseline 3 is appropriate 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?

The description clearly states the tool's purpose with specific verbs ('Get class definition', 'filter specific methods') and resources ('class structure', 'class methods'). It distinguishes from siblings by explicitly mentioning 'PREFERRED OVER Read' and contrasting with reading entire files, making its scope unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool ('when you need class structure or specific class methods') and when not to use it (vs. reading full files). It names an alternative ('Read') and quantifies the benefit ('Saves 80%+ tokens'), giving clear context for selection among siblings.

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

get_dependenciesB

Find all dependencies (imports/requires) for a file or symbol. Useful for understanding what code needs.

ParametersJSON Schema
NameRequiredDescriptionDefault
filePathYesFile path to analyze dependencies for
symbolNoOptional: specific symbol to trace dependencies for

TDQS

B3.3/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 full burden of behavioral disclosure. It mentions the tool 'finds' dependencies, implying a read-only operation, but doesn't specify if it's cached, requires specific permissions, has rate limits, or what the output format looks like. For a tool with no annotations, this leaves significant gaps in understanding its 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 concise and front-loaded, with two sentences that efficiently convey the purpose and utility. Every word earns its place, avoiding redundancy or fluff, making it easy for an agent to parse quickly.

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 moderate complexity (2 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the basic purpose and usage hint but lacks details on behavioral traits, output format, or error handling. With no annotations to fill gaps, the description should do more to be fully 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?

The input schema has 100% description coverage, with clear documentation for 'filePath' and 'symbol.' The description adds minimal value beyond the schema, only implying that 'symbol' is optional and for tracing dependencies. Since the schema already covers parameters well, the baseline score of 3 is appropriate, as the description doesn't significantly enhance parameter understanding.

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 purpose: 'Find all dependencies (imports/requires) for a file or symbol.' It specifies the verb ('Find') and resource ('dependencies'), and distinguishes it from siblings like 'find_symbol' or 'get_file_summary' by focusing on dependency analysis. However, it doesn't explicitly differentiate from all siblings (e.g., 'get_repository_structure' might also involve dependencies), so it's not a perfect 5.

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

Usage Guidelines3/5

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

The description provides implied usage guidance with 'Useful for understanding what code needs,' suggesting it's for code analysis contexts. It doesn't explicitly state when to use this tool versus alternatives like 'find_similar' or 'search_code,' nor does it mention prerequisites or exclusions. The guidance is helpful but not comprehensive.

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

get_file_summaryA

⭐ PREFERRED FOR FILE OVERVIEW: Get file structure (exports, functions, classes, imports) without reading full content. Use this INSTEAD OF Read when you need to understand what's in a file without seeing implementation details. Saves 90% tokens.

ParametersJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to the file relative to repository root

TDQS

A4.4/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 effectively describes key behavioral traits: it's a read-only operation (implied by 'get'), it provides structured metadata rather than full content, and it offers efficiency benefits ('saves 90% tokens'). However, it doesn't mention potential limitations like file size constraints or supported file types.

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 and front-loaded, with every sentence earning its place. The first sentence establishes purpose and value, the second provides usage guidance, and the third quantifies efficiency benefits. There's zero wasted text.

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 the tool's moderate complexity (single parameter, no output schema, no annotations), the description provides excellent context about what the tool does and when to use it. It effectively compensates for the lack of annotations and output schema by clearly explaining the tool's behavior and value proposition. The only minor gap is not specifying what exactly 'file structure' includes beyond the listed elements.

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?

With 100% schema description coverage, the input schema already fully documents the single parameter. The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline score of 3 for adequate coverage 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?

The description clearly states the tool's purpose with specific verbs ('get file structure') and resources ('exports, functions, classes, imports'), and explicitly distinguishes it from sibling tools by naming 'Read' as an alternative. It provides concrete value ('without reading full content', 'saves 90% tokens').

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool ('PREFERRED FOR FILE OVERVIEW', 'when you need to understand what's in a file without seeing implementation details') and when not to use it ('INSTEAD OF Read'). It clearly positions this tool against a specific alternative in the context.

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

get_functionA

⭐ PREFERRED OVER Read: Get complete function code without reading the entire file. Saves 85% tokens compared to Read. Use when you need a specific function implementation instead of reading full files. Returns only the function definition with signature.

ParametersJSON Schema
NameRequiredDescriptionDefault
functionNameYesThe name of the function to retrieve
filePathNoOptional: specific file path if known

TDQS

A4.4/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 effectively describes key behaviors: the tool retrieves function code (read operation implied), emphasizes efficiency ('Saves 85% tokens'), and specifies the return format ('Returns only the function definition with signature'). However, it lacks details on error handling, performance limits, or authentication needs, leaving some behavioral aspects uncovered.

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 highly concise and well-structured: three sentences with zero waste. The first sentence states the purpose and key benefit, the second provides usage context, and the third clarifies the return value. Each sentence adds essential information, and the use of emojis and bold phrasing enhances readability without verbosity.

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 the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is largely complete. It covers purpose, usage guidelines, behavioral traits, and return format. However, without an output schema, it could benefit from more detail on response structure or error cases, and the lack of annotations means some operational context (e.g., idempotency) is missing.

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%, providing baseline documentation for both parameters. The description adds minimal parameter semantics beyond the schemaβ€”it implies 'functionName' is required for retrieval and 'filePath' is optional for targeting, but doesn't elaborate on format, constraints, or interaction effects. This meets the baseline for high schema coverage without significant added value.

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: 'Get complete function code without reading the entire file.' It specifies the verb ('Get'), resource ('function code'), and distinguishes it from sibling tools like 'Read' (implied) and 'get_file_summary' by focusing on specific function extraction. The mention of token savings further clarifies its specialized role.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance: '⭐ PREFERRED OVER Read' indicates a clear alternative, 'Use when you need a specific function implementation instead of reading full files' defines the optimal context, and 'Saves 85% tokens compared to Read' quantifies the benefit. This directly addresses when to use this tool versus alternatives like reading entire files.

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

get_relevant_contextB

Get code context relevant to a natural language query. Returns minimal, targeted code snippets.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language description of what you need context for
maxTokensNoMaximum tokens to return (approximate). Default: 4000

TDQS

B3.1/5.0
Behavior2/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 mentions returning 'minimal, targeted code snippets' but doesn't specify what 'relevant' means, how relevance is determined, whether it accesses cached data, or any performance characteristics like rate limits or permissions needed. This leaves significant gaps for a tool that presumably queries codebases.

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, efficient sentence that front-loads the core purpose. It avoids unnecessary words, though it could be slightly more structured by separating purpose from behavioral traits. Every part earns its place, but it's borderline minimal.

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 code context retrieval, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'relevant' entails, how snippets are selected or formatted, error conditions, or dependencies on other tools like 'index_repository.' For a tool with 2 parameters and likely non-trivial behavior, this is inadequate.

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 the schema already documents both parameters fully. The description adds no additional meaning beyond what the schema providesβ€”it doesn't clarify how 'query' should be formulated or what 'maxTokens' impacts in practice. Baseline 3 is appropriate as the schema does the heavy lifting.

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 purpose: 'Get code context relevant to a natural language query' with the specific action 'Returns minimal, targeted code snippets.' It distinguishes from siblings like 'search_code' by focusing on contextual relevance rather than broad searching, though it doesn't explicitly name alternatives.

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 natural language queries about code context, but provides no explicit guidance on when to use this tool versus siblings like 'find_similar' or 'search_code.' It lacks any mention of prerequisites, exclusions, or specific scenarios where this tool is preferred.

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

get_repository_structureA

⭐ PREFERRED OVER ls/tree: Get clean repository structure showing directories and file types. Use this INSTEAD OF running ls, tree, or Glob for understanding project layout. No file contents, just structure.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoOptional: specific subdirectory to analyze. Default: root
depthNoMaximum depth to traverse. Default: 3

TDQS

A4.4/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 effectively describes key behavioral traits: it's a read-only operation (implied by 'Get'), returns structure without file contents, and is optimized for 'clean' output. However, it doesn't mention potential limitations like error handling, performance characteristics, or output format details, leaving some gaps in behavioral understanding.

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 and well-structured in just two sentences. Every word earns its place: the first sentence states purpose and key differentiators, the second provides usage guidance and limitations. It's front-loaded with the most important information ('PREFERRED OVER ls/tree') and wastes no space on redundant information.

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 the tool's moderate complexity (2 parameters, no output schema, no annotations), the description provides good contextual coverage. It clearly explains what the tool does, when to use it, and what it doesn't do. However, without an output schema, the description doesn't specify what the structure output looks like (e.g., tree format, JSON, etc.), leaving some ambiguity about the return value.

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 the schema already documents both parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema descriptions. It mentions 'specific subdirectory to analyze' and 'depth' implicitly through context but provides no additional syntax, format, or usage details for parameters.

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: 'Get clean repository structure showing directories and file types.' It specifies the verb ('Get'), resource ('repository structure'), and scope ('directories and file types'), and explicitly distinguishes it from sibling tools by stating it's 'PREFERRED OVER ls/tree' and should be used 'INSTEAD OF running ls, tree, or Glob.'

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool versus alternatives: 'Use this INSTEAD OF running ls, tree, or Glob for understanding project layout.' It also clarifies the tool's limitations: 'No file contents, just structure,' which helps define appropriate use cases. This directly addresses when to choose this tool over other methods.

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

get_usage_statsA

View token usage statistics for this session. Shows how many tokens each MCP tool used vs what full file reads would have cost. Use this to verify token savings.

ParametersJSON Schema
NameRequiredDescriptionDefault
resetNoReset usage stats after displaying. Default: false

TDQS

A4/5.0
Behavior3/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 describes what the tool does (view usage stats with a comparison) and hints at a reset capability via the parameter, but doesn't cover other behavioral aspects like whether it requires specific permissions, how data is presented, or if it has rate limits. It adds some value but lacks comprehensive 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.

Conciseness5/5

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

The description is two sentences with zero waste: the first sentence states the purpose and scope, and the second provides usage guidance. It's front-loaded with the core functionality and efficiently conveys essential information without 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?

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is mostly complete. It explains the purpose and usage context well. However, without an output schema, it doesn't describe return values (e.g., format of statistics), which is a minor gap for a monitoring tool. It compensates somewhat by specifying the comparison aspect.

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 the schema already documents the single parameter ('reset') with its type and default. The description doesn't add any parameter-specific details beyond what's in the schema, such as explaining the implications of resetting or how it affects future usage tracking. Baseline 3 is appropriate when the schema handles parameter documentation.

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 specific verb ('View') and resource ('token usage statistics for this session'), with precise scope ('how many tokens each MCP tool used vs what full file reads would have cost'). It distinguishes from siblings by focusing on usage metrics rather than code analysis, repository operations, or caching.

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 provides clear context for when to use this tool ('to verify token savings'), which implies it's for monitoring and validation purposes. However, it doesn't explicitly state when not to use it or name alternatives among siblings, leaving some ambiguity about its exclusive role.

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

index_repositoryA

πŸ”§ REQUIRED FIRST STEP: Index or re-index the repository to enable all context-manager tools. Uses cached index if files haven't changed. ALWAYS call this when starting work on a repository or if files have changed significantly. Fast (<2s for most repos).

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoPath to repository root. Default: process.cwd()
forceReindexNoForce re-indexing even if cache is available. Default: false

TDQS

A4.4/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 effectively describes key traits: it's a required first step for enabling other tools, uses caching for efficiency, is fast (<2s for most repos), and can be forced to re-index. It doesn't cover error conditions or permissions, but for a tool with no annotations, this is strong coverage of operational 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 highly concise and front-loaded, with every sentence earning its place: it states the purpose, caching behavior, usage guidelines, and performance. No wasted words, and the emoji adds visual emphasis without distraction.

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 the tool's complexity (a prerequisite indexing operation with caching), no annotations, and no output schema, the description does well by covering purpose, usage, caching, and performance. It could mention error handling or output format, but for a tool with 100% schema coverage and clear behavioral context, it's largely 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 100%, so the schema already documents both parameters fully. The description doesn't add any parameter-specific details beyond what the schema provides (e.g., it doesn't explain 'path' or 'forceReindex' further). Baseline 3 is appropriate 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?

The description clearly states the specific action ('index or re-index'), the target resource ('the repository'), and the purpose ('to enable all context-manager tools'). It distinguishes this tool from siblings by emphasizing it as a required first step for repository work, unlike other tools that perform specific queries or analyses.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: 'when starting work on a repository or if files have changed significantly.' It also specifies when not to use it by noting it 'uses cached index if files haven't changed,' implying it's unnecessary without changes. While it doesn't name specific alternatives, it positions this as a prerequisite for other tools.

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

search_codeA

⭐ PREFERRED OVER Grep: Search for code patterns with regex support. Returns ranked results with minimal context. Better than Grep because it ranks by relevance and provides AI-optimized output. Use for pattern matching and text search.

ParametersJSON Schema
NameRequiredDescriptionDefault
patternYesText or regex pattern to search for
filePatternNoOptional: glob pattern to filter files (e.g., "**/*.ts")
maxResultsNoMaximum number of results to return. Default: 10

TDQS

A4.4/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 effectively describes key behaviors: it's a search operation (implied read-only), returns ranked results with minimal context, and supports regex. However, it doesn't mention potential limitations like performance, file size constraints, or authentication needs, leaving some gaps for a tool with no annotations.

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 highly concise and well-structured: three sentences with zero waste. The first sentence states purpose and key features, the second compares to Grep, and the third specifies use cases. Every sentence earns its place by adding distinct value.

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 annotations and no output schema, the description does a good job covering core functionality and usage context. However, it lacks details on return format (beyond 'ranked results with minimal context') and doesn't address potential errors or edge cases. For a search tool with 3 parameters, it's mostly complete but could benefit from more behavioral context.

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 the schema already documents all parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schemaβ€”it doesn't explain regex syntax, glob pattern details, or result ranking criteria. Baseline 3 is appropriate 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?

The description clearly states the tool's purpose with specific verbs ('search for code patterns with regex support') and resources ('code patterns'), and explicitly distinguishes it from the sibling tool 'Grep' by highlighting advantages like ranking by relevance and AI-optimized output. This makes it easy to understand what the tool does and how it differs from alternatives.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool versus alternatives: it states '⭐ PREFERRED OVER Grep' and explains why ('Better than Grep because it ranks by relevance and provides AI-optimized output'), and specifies use cases ('Use for pattern matching and text search'). This gives clear context for selection among sibling tools.

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

TDQS

A4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: clear_cache manages indexing, index_repository builds the index, find_symbol and search_code handle different types of searches, get_class/get_function/get_file_summary provide targeted code extraction, get_dependencies analyzes imports, get_repository_structure shows layout, get_relevant_context answers natural language queries, and get_usage_stats tracks metrics. The descriptions explicitly differentiate tools (e.g., 'PREFERRED OVER Read' vs. 'PREFERRED OVER Grep'), eliminating ambiguity.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with snake_case: clear_cache, find_similar, find_symbol, get_class, get_dependencies, get_file_summary, get_function, get_relevant_context, get_repository_structure, get_usage_stats, index_repository, and search_code. The naming is predictable and uniform throughout the set, making it easy for agents to understand and use.

Tool Count5/5

With 12 tools, the count is well-scoped for a context manager focused on code analysis and repository navigation. Each tool serves a specific, necessary function in the workflow (e.g., indexing, searching, extracting code, analyzing dependencies, tracking usage), and none appear redundant or excessive. This aligns with typical server scopes of 3-15 tools, providing comprehensive coverage without bloat.

Completeness5/5

The tool set offers complete coverage for the domain of code context management: it includes setup (index_repository, clear_cache), navigation (get_repository_structure), targeted code access (get_class, get_function, get_file_summary), search capabilities (find_symbol, search_code, find_similar), dependency analysis (get_dependencies), contextual queries (get_relevant_context), and monitoring (get_usage_stats). There are no obvious gaps; agents can perform a full lifecycle from indexing to detailed code analysis and optimization.

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

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables semantic code search across multiple repositories using natural language queries. Provides intelligent code discovery, symbol lookups, and cross-repo dependency analysis for AI coding agents.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides semantic code intelligence to help users search, navigate, and analyze entire codebases using plain English. It enables Claude to perform architectural overviews, bug detection, and refactor suggestions through local semantic search and keyword indexing.
    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
    B
    maintenance
    Indexes codebases and lets AI agents retrieve precise code snippets (functions, classes, routes) instead of reading entire files, reducing token usage and improving accuracy.
    478
    7
    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/transparentlyok/mcp-context-manager'

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