Skip to main content
Glama
TwT23333
by TwT23333

Moatless MCP Server

Python 3.10+ MCP License

一个基于模型上下文协议 (MCP) 的高级代码分析和编辑服务器,支持基于向量嵌入的语义搜索功能。该服务器为 AI 助手提供了通过标准化接口执行复杂代码操作的能力。

核心架构:模型上下文协议 (MCP)

本服务器是一个MCP服务器的实现。MCP是一个开放协议,旨在成为语言模型(LLM)与外部工具和数据源之间的标准中间件。它允许像IDE或聊天应用这样的客户端(MCP客户端)安全、动态地与服务器提供的能力(如文件系统访问、代码分析)进行交互。

架构流程

当一个MCP客户端(如Claude Desktop或cline)连接到本服务器时,其交互遵循以下流程:

+------------------+     1. Request (e.g., call_tool)     +-----------------------+
|   MCP Client     | -----------------------------------> |     MCP Server        |
| (IDE, cline etc.)|                                      |     (This Project)    |
+------------------+     6. Response (JSON-RPC)           +-----------+-----------+
        ^          <-----------------------------------          | 2. Dispatch
        |                                                        |
        |                                                        v
        |                                              +-----------------------+
        |                                              |     Tool Registry     |
        |                                              +-----------+-----------+
        |                                                        | 3. Execute Tool
        |                                                        |
        |                                                        v
        |                                              +-----------------------+
        |                                              |      Specific Tool    |
        |                                              | (e.g., ReadFileTool)  |
        |                                              +-----------+-----------+
        |                                                        | 4. Access Data
        |                                                        |
        |   +----------------------------------------------------+
        |   |
        v   v
+-----------------------+     5. Return Data/Result      +-----------------------+
|     Workspace         | <----------------------------- |    Workspace Adapter  |
| (File System, .git)   |                                | (Manages Project State) |
+-----------------------+                                +-----------------------+
  1. 请求(Request): 客户端向服务器发送一个JSON-RPC请求,例如tool_run,要求执行一个名为read_file的工具。

  2. 分发(Dispatch): server.py中的MCP服务器核心接收请求,并将其分派给ToolRegistry。

  3. 执行(Execute): ToolRegistry找到名为read_file的已注册工具实例,并调用其execute方法。

  4. 数据访问(Access Data): 工具通过WorkspaceAdapter请求访问项目文件。

  5. 返回结果(Return Data): WorkspaceAdapter从文件系统读取数据并返回给工具。工具将结果包装成ToolResult对象。

  6. 响应(Response): 服务器核心将ToolResult格式化为JSON-RPC响应,并将其发送回客户端。

组件详解

  • Server Core (server.py):

    • 职责: 作为服务器的主入口,监听和响应MCP客户端的连接。

    • 实现: 使用mcp.server库来处理底层的JSON-RPC通信。它定义了list_tools和call_tool等协议处理器,并将具体的逻辑委托给ToolRegistry。

  • Tool Registry (tools/registry.py):

    • 职责: 负责工具的生命周期管理。它在启动时实例化所有可用的工具,并将它们存储在一个字典中以便快速访问。

    • 实现: ToolRegistry类包含一个_register_default_tools方法,用于集中注册所有工具。当execute_tool被调用时,它会查找并执行相应的工具。

  • Workspace Adapter (adapters/workspace.py):

    • 职责: 作为文件系统和项目状态的抽象层。所有对项目文件的��、写、搜索操作都必须通过这个适配器进行。

    • 实现: WorkspaceAdapter类提供了对文件、Git仓库和Moatless语义索引的访问接口,同时强制执行安全策略(如文件类型和路径限制)。

  • Tools (tools/*.py):

    • 职责: 实现具体的业务逻辑单元。每个工具都是一个独立的类,负责一项特定的任务,如读写文件、代码搜索或运行测试。

    • 实现: 所有工具都继承自MCPTool基类(tools/base.py),并实现execute方法。它们通过构造函数接收WorkspaceAdapter的实例来与项目数据交互。

  • Vector System & Tree-sitter (vector/, treesitter/):

    • 职责: 提供高级代码理解能力。Vector System负责将代码转换为向量并进行语义搜索。Tree-sitter用于精确解析代码的语法结构(AST)。

    • 实现: 这些模块被高级工具(如SemanticSearchTool和FindClassTool)所使用,以提供比简单文本匹配更强大的功能。

Related MCP server: CodeAlive MCP

关键技术特性

1. 语义搜索实现

  • 向量嵌入: 使用 Jina AI 1024 维嵌入 (推荐) 或 OpenAI 嵌入 (已弃用)。

  • 按需构建: 向量索引仅在需要时通过 build_vector_index 工具构建,避免不必要的启动延迟。

  • 代码分割: 基于 Moatless 库的智能代码块分割。

  • 相似性搜索: 使用 FAISS 向量数据库实现高效搜索。

2. 灵活的安全模型

  • 白名单策略: 默认允许访问多种常见代码、配置和文档文件类型。

  • 智能路径过滤: 仅禁止核心依赖和缓存目录 (node_modules, .venv, __pycache__ 等)。

  • 可配置性: 可以通过Config类轻松调整安全设置。

3. 模块化和可扩展的工具系统

  • 工具基类: MCPTool提供了一个清晰的接口,用于创建新的自定义工具。

  • 集中注册: ToolRegistry使得添加和管理新工具变得简单。

使用示例

基础文件操作

{
  "tool": "read_file",
  "arguments": {
    "file_path": "src/moatless_mcp/server.py",
    "start_line": 1,
    "end_line": 10
  }
}

语义搜索

{
  "tool": "semantic_search",
  "arguments": {
    "query": "user authentication and login validation",
    "max_results": 5
  }
}

代码结构分析

{
  "tool": "find_class",
  "arguments": {
    "class_name": "ToolRegistry",
    "file_pattern": "**/registry.py"
  }
}

部署与开发

关于如何运行此服务器、进行部署以及如何开发和添加新工具的详细说明,请参阅 README_deploy.md。

相关文档

Available Tools

15 tools
build_vector_indexB

Build a vector index for semantic code search using tree-sitter and Jina embeddings

ParametersJSON Schema
NameRequiredDescriptionDefault
api_keyNoJina AI API key for embeddings (can also be set via JINA_API_KEY env var)
file_patternsNoOptional list of glob patterns to filter files (e.g., ['**/*.py', '**/*.js'])
force_rebuildNoForce rebuild even if index already exists
modelNoJina embedding model to usejina-embeddings-v3

TDQS

B3.4/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 technologies (tree-sitter, Jina embeddings) but doesn't describe key behaviors: whether this is a long-running or resource-intensive operation, what happens on failure, if it creates persistent files, or what the output looks like. For a tool that likely involves file processing and API calls, this is a significant gap.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core purpose ('Build a vector index for semantic code search') and adds technical context ('using tree-sitter and Jina embeddings') without unnecessary details. Every word earns its place, making it highly concise and well-structured.

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 building a vector index (involving file processing, embeddings, and potential API calls), no annotations, and no output schema, the description is insufficient. It lacks information on behavioral traits, output format, error handling, or dependencies. For a 4-parameter tool with no structured safety or output info, it should provide more context to be 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 all parameters thoroughly. The description doesn't add any parameter-specific details beyond what's in the schema (e.g., it doesn't explain how 'file_patterns' interact with the workspace or default behaviors). With high schema coverage, the baseline is 3, and the description doesn't compensate with extra insights.

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 ('Build'), the resource ('a vector index'), and the purpose ('for semantic code search'), while distinguishing it from siblings like 'semantic_search' (which likely queries an existing index) and 'clear_vector_index' (which removes an index). It also mentions the specific technologies used ('tree-sitter and Jina embeddings'), which adds precision.

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

Usage Guidelines3/5

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

The description implies usage for creating a search index, but it doesn't explicitly state when to use this tool versus alternatives like 'semantic_search' (for querying) or 'clear_vector_index' (for removal). It also doesn't mention prerequisites (e.g., needing files in the workspace) or exclusions. The context is clear but lacks explicit guidance on tool selection.

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

clear_vector_indexB

Clear the vector index and delete all index files

ParametersJSON Schema
NameRequiredDescriptionDefault
confirmNoConfirm that you want to delete the vector index

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool 'delete[s] all index files', which implies destructive behavior, but doesn't specify whether this is irreversible, what permissions are required, whether it affects search functionality, or what happens after deletion (e.g., empty state vs. error). The description is minimal and lacks important operational 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 a single, efficient sentence with zero wasted words. It's front-loaded with the core action and target, making it immediately understandable. Every word earns its place in conveying the essential operation.

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

Completeness2/5

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

For a destructive tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what 'clear' means operationally, what happens to dependent functionality (like semantic_search), whether the tool returns confirmation or status, or what recovery options exist. The high-risk nature of this operation demands more contextual guidance.

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 'confirm' parameter. The description adds no additional parameter information beyond what's in the schema. This meets the baseline of 3 when schema coverage is complete, though the description doesn't enhance parameter understanding.

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 ('clear', 'delete') and target resource ('vector index', 'all index files'), distinguishing it from sibling tools like 'build_vector_index' or 'vector_index_status'. It precisely communicates a destructive operation on the vector index system.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'build_vector_index' for rebuilding or 'vector_index_status' for checking status. It mentions no prerequisites, warnings about data loss, or scenarios where this operation is appropriate versus other maintenance approaches.

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

find_classC

Find class definitions by name

ParametersJSON Schema
NameRequiredDescriptionDefault
class_nameYesName of the class to find
file_patternNoOptional file pattern to limit search

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states what the tool does ('find class definitions'), but doesn't describe how it behaves—e.g., whether it searches recursively, returns partial matches, handles errors, or has performance constraints. This leaves critical behavioral traits unspecified.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero waste. It's front-loaded and directly states the tool's purpose without unnecessary elaboration, 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.

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., file paths, code snippets, or structured data), error conditions, or search scope. For a tool with 2 parameters and no structured behavioral hints, more context is needed 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%, with clear parameter descriptions in the schema itself. The tool description adds no additional meaning beyond the schema, such as explaining how 'class_name' matching works or what 'file_pattern' syntax is accepted. Baseline 3 is appropriate since 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: 'Find class definitions by name'. It specifies the verb ('find') and resource ('class definitions'), making the intent unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'find_function' or 'semantic_search', which prevents 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 Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'find_function' for functions, 'grep' for general text search, or 'semantic_search' for content-based queries. Without this context, an agent might struggle to choose appropriately.

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

find_filesC

Find files by name pattern using glob syntax.

ParametersJSON Schema
NameRequiredDescriptionDefault
max_resultsNoMaximum number of results to return
patternYesGlob pattern to match file names (e.g., '*.py', '*test*', 'src/**/*.java')

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'finds' files, implying a read-only operation, but doesn't mention potential side effects, performance implications, or output format. For a tool with no annotation coverage, this is inadequate, as it omits key behavioral details like whether it searches recursively or respects file permissions.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It is appropriately sized and front-loaded, with every part contributing to clarity, earning a top score for conciseness.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., file paths, metadata), how results are ordered, or any limitations (e.g., search depth). For a tool with no structured output information, the description should provide more context to be fully 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?

The description adds minimal value beyond the input schema, which has 100% coverage. It mentions 'glob syntax' and provides examples like '*.py', but the schema already describes 'pattern' with similar examples. Since schema coverage is high, the baseline is 3, and the description doesn't significantly enhance parameter understanding beyond what's in 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?

The description clearly states the tool's purpose: 'Find files by name pattern using glob syntax.' It specifies the verb ('Find'), resource ('files'), and method ('by name pattern using glob syntax'), which is specific and actionable. However, it doesn't explicitly differentiate from sibling tools like 'list_files' or 'grep', which limits the score to 4 instead of 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_files' (which might list all files without filtering) or 'grep' (which searches within file contents), nor does it specify prerequisites or exclusions. This lack of contextual usage information results in a low score.

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

find_functionC

Find function definitions by name

ParametersJSON Schema
NameRequiredDescriptionDefault
file_patternNoOptional file pattern to limit search
function_nameYesName of the function to find

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without behavioral details. It doesn't disclose whether this is a read-only operation, if it searches across files or a workspace, performance considerations, or output format. For a tool with no annotations, this is inadequate as it misses key operational 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 a single, clear sentence with zero waste—'Find function definitions by name' is front-loaded and efficiently conveys the core purpose without unnecessary words. It earns its place by being direct and to the point.

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 no annotations, no output schema, and a simple input schema, the description is incomplete. It doesn't explain what a 'function definition' includes (e.g., signatures, bodies), the search scope (e.g., current directory, all files), or return values. For a tool in a code-focused server with many siblings, more context is needed to guide 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 ('function_name' as required and 'file_pattern' as optional). The description adds no additional meaning beyond implying the tool uses 'function_name' to find definitions, which aligns with the schema. 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.

Purpose3/5

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

The description 'Find function definitions by name' clearly states the action (find) and target (function definitions), but it's vague about scope and doesn't distinguish from siblings like 'find_class' or 'grep'. It specifies 'by name' which helps, but lacks detail on what constitutes a 'function definition' or where it searches.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'find_class' for classes, 'grep' for text search, or 'semantic_search' for broader code queries. The description implies it's for functions by name, but doesn't specify contexts or exclusions, leaving the agent to guess based on tool names alone.

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

grepC

Search for text patterns in files using regular expressions.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_patternNoFile glob pattern to limit search (default: *)*
max_resultsNoMaximum number of results to return
patternYesRegular expression pattern to search for

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the use of regular expressions but doesn't specify behavioral traits such as search scope (e.g., recursive directory traversal), performance implications (e.g., large file handling), error handling (e.g., invalid regex patterns), or output format (e.g., line-by-line results with context). This leaves significant gaps for an agent to understand how the tool behaves in practice.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core functionality ('Search for text patterns in files') and adds necessary detail ('using regular expressions'). There's no wasted verbiage, repetition, or unnecessary elaboration—every word earns its place.

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

Completeness2/5

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

Given the complexity of a regex search tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns (e.g., matched lines, file names, line numbers), how errors are handled, or any constraints (e.g., encoding issues, large result sets). For a tool with 3 parameters and significant behavioral nuances, this leaves the agent under-informed.

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%, with clear documentation for all three parameters ('pattern', 'file_pattern', 'max_results'). The description adds minimal value beyond the schema, only implying that 'pattern' is a regular expression (which is already stated in the schema's description). It doesn't provide additional context like regex flavor examples or practical usage tips for the parameters.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('Search') and resource ('text patterns in files'), and mentions the method ('using regular expressions'). It distinguishes itself from siblings like 'find_files' (which likely searches for files, not content) and 'semantic_search' (which likely uses semantic matching rather than regex). However, it doesn't explicitly contrast with 'string_replace' (which might also use regex for replacement operations).

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer 'grep' over 'semantic_search' for pattern matching, or over 'find_files' for file content searches. There's no context about prerequisites, limitations, or typical use cases beyond the basic functionality stated.

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

list_filesB

List files and directories in the workspace with filtering options.

ParametersJSON Schema
NameRequiredDescriptionDefault
directoryNoDirectory path to list (relative to workspace root, default: root)
max_resultsNoMaximum number of files to return
recursiveNoWhether to list files recursively

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but only states basic functionality. It doesn't disclose important behavioral aspects like whether this is a read-only operation (implied but not stated), potential performance considerations for large directories, pagination behavior (though max_results is in schema), or what happens with non-existent directories. The description adds minimal context beyond the basic operation.

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

Conciseness5/5

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

The description is a single, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a straightforward listing tool and front-loads the essential information.

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 read-only listing tool with 3 well-documented parameters and no output schema, the description provides adequate but minimal context. It covers the basic purpose but lacks details about return format, error conditions, or performance considerations that would be helpful given the absence of annotations and output schema.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already fully documents all three parameters. The description mentions 'filtering options' which aligns with the parameters but doesn't add any meaningful semantic context beyond what's in the schema. 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.

Purpose4/5

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

The description clearly states the verb 'List' and the resources 'files and directories in the workspace', making the purpose immediately understandable. It distinguishes from siblings like 'find_files' by focusing on directory listing rather than pattern-based searching. However, it doesn't explicitly contrast with 'workspace_info' which might also provide file information.

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 browsing workspace contents with filtering, but doesn't explicitly state when to use this versus alternatives like 'find_files' for pattern matching or 'workspace_info' for workspace metadata. No guidance is provided about when NOT to use this tool or about prerequisites.

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

read_fileA

Read file contents with optional line range. Supports text files up to 10MB.

ParametersJSON Schema
NameRequiredDescriptionDefault
end_lineNoEnd line number (1-based, optional)
file_pathYesPath to the file to read (relative to workspace root)
start_lineNoStart line number (1-based, optional)

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 adds useful context about the 10MB size limit and text file support, which are not in the schema. However, it does not cover other behavioral aspects like error handling, permissions needed, or what happens with non-text files, leaving gaps for a read operation.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core action ('Read file contents') and includes only essential additional details (optional line range and 10MB/text file support). Every part earns its place with no wasted words.

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

Completeness3/5

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

Given the tool's moderate complexity (read operation with optional parameters) and no annotations or output schema, the description is partially complete. It covers key constraints (size and file type) but lacks details on return values, error cases, or performance implications, which would be helpful for an agent to use it correctly.

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 (file_path, start_line, end_line) with their descriptions. The description adds no additional parameter semantics beyond what the schema provides, such as format details or examples, meeting the baseline score when schema coverage is high.

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 ('Read file contents') and resource ('file'), distinguishing it from siblings like 'list_files' (which lists metadata) and 'write_file' (which modifies content). It also specifies the optional line range capability, making the purpose explicit and differentiated.

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 reading text files up to 10MB with optional line ranges, but does not explicitly state when to use this tool versus alternatives like 'view_code' or 'grep'. It provides some context (file type and size limit) but lacks explicit guidance on exclusions or named alternatives.

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

run_testsB

Run tests using detected testing frameworks (pytest, jest, maven, etc.)

ParametersJSON Schema
NameRequiredDescriptionDefault
argsNoAdditional arguments to pass to the test runner
detect_onlyNoOnly detect available frameworks without running tests
frameworkNoTesting framework to use (auto-detected if not specified)
test_pathNoSpecific test file or directory to run

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 full burden for behavioral disclosure. It mentions framework detection and test execution but doesn't describe what happens during execution (e.g., output format, error handling, side effects), whether it requires specific project structure, or how it interacts with the workspace. 'Run tests' implies execution but lacks behavioral details.

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

Conciseness5/5

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

The description is a single, efficient sentence that communicates the core purpose with zero waste. It's appropriately sized for a tool with good schema documentation and gets straight to the point without unnecessary elaboration.

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 4-parameter execution tool with no annotations and no output schema, the description provides minimal but adequate context about what the tool does. It covers the 'what' but lacks details about execution behavior, results format, or integration with the workspace environment. The schema handles parameter documentation well, but behavioral aspects are underspecified.

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 fully documents all 4 parameters. The description doesn't add any parameter-specific information beyond what's in the schema descriptions. The baseline score of 3 reflects adequate but not enhanced parameter understanding when 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 as 'Run tests using detected testing frameworks' with specific examples (pytest, jest, maven). It uses a clear verb+resource pattern but doesn't explicitly differentiate from sibling tools like 'find_class' or 'view_code' which are inspection tools rather than execution tools.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. While it mentions detection of frameworks, it doesn't specify prerequisites, appropriate contexts, or when not to use it. The sibling tools include various code inspection and manipulation tools, but no testing alternatives are mentioned.

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

string_replaceC

Replace occurrences of a string in a file with validation.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the file to modify
new_strYesString to replace with
occurrenceNoWhich occurrence to replace (1-based, 0 for all occurrences)
old_strYesString to find and replace

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'with validation' which suggests error checking or constraints, but doesn't explain what validation entails (e.g., file existence checks, permission requirements, backup creation, or what happens on failure). For a mutation tool that modifies files, this is a significant gap in safety and operational 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 a single, efficient sentence that communicates the core functionality without unnecessary words. It's appropriately sized and front-loaded with the essential action. Every word earns its place.

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

Completeness2/5

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

For a file mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'validation' means, what happens on success/failure, whether files are backed up, or what permissions are required. The context signals show 4 parameters and no output schema, yet the description provides minimal operational guidance.

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 fully documents all 4 parameters. The description adds no parameter-specific information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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: 'Replace occurrences of a string in a file with validation.' It specifies the verb ('replace'), resource ('string in a file'), and includes an important qualifier ('with validation'). However, it doesn't explicitly differentiate from sibling tools like 'write_file' or 'grep' that might have overlapping functionality.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'write_file' (general file writing), 'grep' (searching), and 'read_file' (reading), there's no indication of when this specific string replacement tool is preferred. The mention of 'validation' hints at a use case but doesn't define boundaries.

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

vector_index_statusB

Check the status of the vector index for semantic search

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

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. While 'check' implies a read-only operation, it doesn't specify what 'status' includes (e.g., health, size, last update), whether it requires permissions, or what happens on failure. This leaves significant gaps for a tool with zero annotation coverage.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without any fluff. It's appropriately sized and front-loaded, with every word earning its place.

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 lack of annotations and output schema, the description is insufficiently complete. It doesn't explain what 'status' entails, what format the response uses, or any behavioral nuances. For a tool with no structured data support, this leaves too much ambiguity for effective use.

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 has zero parameters, and schema description coverage is 100%, so there's no need for parameter explanation in the description. The baseline for zero parameters is 4, as the description appropriately avoids unnecessary parameter details.

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 with a specific verb ('check') and resource ('vector index for semantic search'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'semantic_search' or 'build_vector_index', which would require a 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to check status versus building or clearing the index, nor does it explain how this differs from 'semantic_search' or other search-related tools in the sibling list.

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

view_codeC

View specific code sections with context

ParametersJSON Schema
NameRequiredDescriptionDefault
end_lineNoEnding line number (1-indexed)
file_pathYesPath to the file to view
span_idsNoList of span IDs to view (class names, function names, etc.)
start_lineNoStarting line number (1-indexed)

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'with context' but doesn't specify what that entails (e.g., line numbers, surrounding code, or metadata). It fails to address key aspects like read-only nature, error handling, or output format, which are crucial for a tool with multiple parameters and no output schema.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part ('View specific code sections with context') earns its place by conveying the essential action and scope, making it highly concise and well-structured.

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 tool's complexity (4 parameters, no output schema, and no annotations), the description is incomplete. It doesn't explain the return values, error conditions, or how 'context' is provided, leaving significant gaps for an AI agent to understand the tool's behavior and output fully.

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 implying that parameters like 'span_ids' or line numbers help view 'specific code sections with context', but it doesn't clarify interactions between parameters (e.g., how 'span_ids' relates to line ranges). 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 'View specific code sections with context' clearly states the tool's purpose with a specific verb ('view') and resource ('code sections'), making it understandable. However, it doesn't explicitly differentiate from sibling tools like 'read_file' or 'find_class', which might offer overlapping functionality, so it doesn't reach the highest score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as 'read_file' (for full files) or 'find_class' (for specific classes). It lacks explicit context, exclusions, or named alternatives, leaving the agent to infer usage from the tool name and parameters alone.

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

workspace_infoB

Get information about the current workspace (path, git status, etc.)

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/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 states the tool retrieves information (implying read-only), but doesn't clarify permissions needed, whether it's safe to invoke frequently, what 'etc.' includes, or how the information is structured. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 ('Get information about the current workspace') and adds clarifying examples ('path, git status, etc.') without redundancy. It could be slightly more structured by explicitly listing all information types, but it's appropriately sized for a simple tool.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on return values (no output schema) and behavioral context (no annotations). For a tool that likely returns structured workspace metadata, more completeness on output format would be helpful.

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 has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description appropriately doesn't waste space on parameter details, earning a baseline score of 4 for not introducing unnecessary complexity.

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 with a specific verb ('Get') and resource ('information about the current workspace'), including examples of what information is retrieved ('path, git status, etc.'). It distinguishes from siblings like 'list_files' or 'view_code' by focusing on workspace metadata rather than file operations. However, it doesn't explicitly differentiate from all siblings (e.g., 'vector_index_status' also provides workspace-related status).

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate contexts, or when other tools might be more suitable (e.g., using 'list_files' for file listings or 'vector_index_status' for vector database status). The agent must infer usage from the purpose alone.

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

write_fileB

Write content to a file. Creates parent directories if needed.

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYesContent to write to the file
file_pathYesPath to the file to write (relative to workspace root)

TDQS

B3.2/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 that parent directories are created if needed, which is useful context, but it fails to disclose critical traits such as whether the operation overwrites existing files, requires specific permissions, handles errors (e.g., invalid paths), or has side effects. For a mutation tool with zero annotation coverage, this is a significant gap.

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, consisting of only two sentences that directly state the tool's action and a key behavioral trait. Every word earns its place, with no redundant or vague language, making it efficient and easy to parse.

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 that this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information on behavioral aspects like overwriting behavior, error handling, or return values, which are crucial for safe and effective use. The description does not compensate for the absence of structured data, leaving significant gaps in understanding.

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 schema description coverage is 100%, meaning the input schema already fully documents both parameters ('content' and 'file_path'). The description does not add any additional meaning beyond what the schema provides, such as format details or constraints. However, since the schema coverage is high, the baseline score of 3 is appropriate as the description does not need to compensate.

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 ('Write content to a file') and resource ('a file'), distinguishing it from sibling tools like 'read_file' (which reads) and 'list_files' (which lists). It also mentions the additional behavior of creating parent directories, which further clarifies its purpose beyond basic file writing.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. For example, it does not mention when to use 'write_file' over 'string_replace' (which modifies file content) or 'find_files' (which searches files), nor does it specify prerequisites like file permissions or workspace context. This lack of comparative context leaves usage unclear.

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. 15 tool updatesv1.0.0
    • First observedbuild_vector_index
    • First observedclear_vector_index
    • First observedfind_class
    • First observedfind_files
    • First observedfind_function
    • First observedgrep
    • First observedlist_files
    • First observedread_file
    • First observedrun_tests
    • First observedsemantic_search
    • First observedstring_replace
    • First observedvector_index_status
    • First observedview_code
    • First observedworkspace_info
    • First observedwrite_file

TDQS

A3.5/5.0

Scored across 15 tools

Disambiguation4/5

Most tools have distinct purposes, but there is some overlap between find_class/find_function and view_code, and between grep and semantic_search, which could cause minor confusion. The descriptions help clarify the differences, but an agent might occasionally misselect between these related tools.

Naming Consistency5/5

All tool names follow a consistent snake_case pattern with clear verb_noun structure (e.g., build_vector_index, find_class, run_tests). There are no deviations in naming conventions, making the set predictable and easy to understand.

Tool Count5/5

With 15 tools, the count is well-scoped for a code analysis and workspace management server. Each tool appears to serve a specific, useful function without redundancy, fitting within the typical 3-15 range for a coherent toolset.

Completeness5/5

The toolset provides comprehensive coverage for code navigation, search, file operations, and workspace management. It includes CRUD-like operations (read_file, write_file, string_replace), search tools (grep, semantic_search), and utilities (workspace_info, run_tests), with no obvious gaps for the domain.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    A Model Context Protocol server that enhances AI agents by providing deep semantic understanding of codebases, enabling more intelligent interactions through advanced code search and contextual awareness.
    90
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    An MCP server and CLI tool that transforms codebases into AI-ready context through semantic search, call graph analysis, and incremental indexing. It enables AI assistants to perform hybrid vector and keyword searches to understand complex repository structures and cross-file relationships.
    35
    54 npm
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that transforms codebases into intelligent, queryable knowledge bases, enabling AI assistants to perform semantic search, explore architecture, and analyze code relationships.
    166
    -