Skip to main content
Glama
wrale

mcp-server-tree-sitter

by wrale

remove_project_tool

Remove a registered project from the MCP server-tree-sitter by specifying its name. This tool ensures proper context management for code analysis operations by disassociating the project.

Instructions

Remove a registered project.

    Args:
        name: Project name

    Returns:
        Success message
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • The handler function for the 'remove_project_tool' MCP tool. It removes the specified project using the project_registry and returns a success message or raises an error.
    @mcp_server.tool()
    def remove_project_tool(name: str) -> Dict[str, str]:
        """Remove a registered project.
    
        Args:
            name: Project name
    
        Returns:
            Success message
        """
        try:
            project_registry.remove_project(name)
            return {"status": "success", "message": f"Project '{name}' removed"}
        except Exception as e:
            raise ProjectError(f"Failed to remove project: {e}") from e
  • The registration of all MCP tools, including 'remove_project_tool', via the register_tools function call in the main server initialization.
    from .tools.registration import register_tools
    
    register_capabilities(mcp)
    register_tools(mcp, container)
  • The core helper method in ProjectRegistry that removes a project from the internal projects dictionary, used by the tool handler.
    def remove_project(self, name: str) -> None:
        """
        Remove a project.
    
        Args:
            name: Project name
    
        Raises:
            ProjectError: If project doesn't exist
        """
        with self._global_lock:
            if name not in self._projects:
                raise ProjectError(f"Project '{name}' not found")
            del self._projects[name]

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/wrale/mcp-server-tree-sitter'

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