stop_project
Terminate the MCP-TY server's ty type checker process to free up system resources when analysis is complete.
Instructions
Stop ty and release resources.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "stop_project"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/mcp_ty/server.py:330-343 (handler)Implementation of the stop_project tool which stops the LSP client and releases resources.
@mcp.tool() async def stop_project() -> str: """Stop ty and release resources.""" global _lsp_client if _lsp_client is None: return _ok({"stopped": True, "message": "No active project"}) try: await _lsp_client.stop() _lsp_client = None return _ok({"stopped": True}) except Exception as e: return _error(str(e))