Skip to main content
Glama
TwT23333
by TwT23333

vector_index_status

Monitor the status of the vector index used for semantic search within the Moatless MCP Server. Ensure optimal performance and readiness for advanced code analysis and editing tasks.

Instructions

Check the status of the vector index for semantic search

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • VectorIndexStatusTool class implements the 'vector_index_status' tool. Includes name, description, empty input schema, and execute method that initializes VectorManager, retrieves index status, formats detailed status report with statistics and recommendations.
    class VectorIndexStatusTool(MCPTool): """Tool for checking vector index status.""" @property def name(self) -> str: return "vector_index_status" @property def description(self) -> str: return "Check the status of the vector index for semantic search" @property def input_schema(self) -> Dict[str, Any]: return { "type": "object", "properties": {} } async def execute(self, arguments: Dict[str, Any]) -> ToolResult: """Execute the vector_index_status tool.""" try: # Initialize vector manager vector_manager = VectorManager( workspace_root=str(self.workspace.workspace_path), config=self.workspace.config ) status = vector_manager.get_index_status() message = "📊 Vector Index Status\n\n" if status.get("error"): message += f"❌ Error: {status['error']}\n" return ToolResult(success=False, message=message, properties=status) # Index existence and loading status if status["index_exists"]: message += "✅ Index files exist on disk\n" else: message += "❌ No index files found\n" if status["index_loaded"]: message += "✅ Index loaded in memory\n" else: message += "❌ Index not loaded\n" if status["embedding_provider_ready"]: message += "✅ Embedding provider ready\n" else: message += "❌ Embedding provider not initialized\n" message += " (API key needed for search and index building)\n" # Statistics stats = status.get("stats", {}) if stats.get("total_chunks", 0) > 0: message += f"\n📈 Index Statistics:\n" message += f" • Total chunks: {stats['total_chunks']}\n" message += f" • Total files: {stats['total_files']}\n" message += f" • Index directory: {stats['index_dir']}\n" if "chunk_types" in stats: message += " • Chunk types:\n" for chunk_type, count in stats["chunk_types"].items(): message += f" - {chunk_type}: {count}\n" if "languages" in stats: message += " • Languages:\n" for language, count in stats["languages"].items(): message += f" - {language}: {count}\n" else: message += "\n📭 Index is empty\n" # Recommendations message += "\n💡 Recommendations:\n" if not status["index_exists"]: message += " • Use 'build_vector_index' tool to create the semantic search index\n" elif not status["embedding_provider_ready"]: message += " • Provide Jina API key to enable semantic search functionality\n" elif stats.get("total_chunks", 0) == 0: message += " • Index exists but is empty - try rebuilding with 'build_vector_index'\n" else: message += " • Vector index is ready for semantic search!\n" message += " • Use 'semantic_search' tool to search your codebase\n" return ToolResult( success=True, message=message, properties=status ) except Exception as e: logger.error(f"Error in vector_index_status: {e}") return self.format_error(str(e))
  • Input schema for vector_index_status tool: empty object (no parameters required).
    @property def input_schema(self) -> Dict[str, Any]: return { "type": "object", "properties": {} }
  • Instantiation and registration of VectorIndexStatusTool in ToolRegistry._register_default_tools() method, added to tools list and registered via register_tool.
    # Vector database tools BuildVectorIndexTool(self.workspace), VectorIndexStatusTool(self.workspace), ClearVectorIndexTool(self.workspace), # Project Understand tools ProjectUnderstandTool(self.workspace), ] for tool in tools: self.register_tool(tool)
  • Import of VectorIndexStatusTool from vector_tools.py for use in tool registry.
    from moatless_mcp.tools.vector_tools import ( BuildVectorIndexTool, VectorIndexStatusTool, ClearVectorIndexTool )
Install Server

Other Tools

Related Tools

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/TwT23333/mcp'

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