hanzo-mcp 0.8.15__py3-none-any.whl → 0.9.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of hanzo-mcp might be problematic. Click here for more details.
- hanzo_mcp/__init__.py +1 -1
- hanzo_mcp/cli.py +108 -4
- hanzo_mcp/tools/agent/__init__.py +5 -0
- hanzo_mcp/tools/agent/agent.py +5 -0
- hanzo_mcp/tools/agent/agent_tool.py +3 -0
- hanzo_mcp/tools/agent/agent_tool_v1_deprecated.py +5 -0
- hanzo_mcp/tools/agent/clarification_tool.py +2 -0
- hanzo_mcp/tools/agent/claude_desktop_auth.py +5 -0
- hanzo_mcp/tools/agent/cli_agent_base.py +5 -0
- hanzo_mcp/tools/agent/cli_tools.py +26 -0
- hanzo_mcp/tools/agent/code_auth_tool.py +5 -0
- hanzo_mcp/tools/agent/critic_tool.py +2 -0
- hanzo_mcp/tools/agent/iching_tool.py +5 -0
- hanzo_mcp/tools/agent/network_tool.py +5 -0
- hanzo_mcp/tools/agent/review_tool.py +2 -0
- hanzo_mcp/tools/agent/swarm_alias.py +5 -0
- hanzo_mcp/tools/agent/swarm_tool.py +3 -0
- hanzo_mcp/tools/agent/swarm_tool_v1_deprecated.py +5 -0
- hanzo_mcp/tools/agent/unified_cli_tools.py +5 -0
- hanzo_mcp/tools/common/auto_timeout.py +234 -0
- hanzo_mcp/tools/common/base.py +4 -0
- hanzo_mcp/tools/common/batch_tool.py +5 -0
- hanzo_mcp/tools/common/config_tool.py +5 -0
- hanzo_mcp/tools/common/critic_tool.py +5 -0
- hanzo_mcp/tools/common/paginated_base.py +4 -0
- hanzo_mcp/tools/common/stats.py +5 -0
- hanzo_mcp/tools/common/thinking_tool.py +5 -0
- hanzo_mcp/tools/common/timeout_parser.py +103 -0
- hanzo_mcp/tools/common/tool_disable.py +5 -0
- hanzo_mcp/tools/common/tool_enable.py +5 -0
- hanzo_mcp/tools/common/tool_list.py +5 -0
- hanzo_mcp/tools/config/config_tool.py +5 -0
- hanzo_mcp/tools/config/mode_tool.py +5 -0
- hanzo_mcp/tools/database/graph.py +5 -0
- hanzo_mcp/tools/database/graph_add.py +5 -0
- hanzo_mcp/tools/database/graph_query.py +5 -0
- hanzo_mcp/tools/database/graph_remove.py +5 -0
- hanzo_mcp/tools/database/graph_search.py +5 -0
- hanzo_mcp/tools/database/graph_stats.py +5 -0
- hanzo_mcp/tools/database/sql.py +5 -0
- hanzo_mcp/tools/database/sql_query.py +2 -0
- hanzo_mcp/tools/database/sql_search.py +5 -0
- hanzo_mcp/tools/database/sql_stats.py +5 -0
- hanzo_mcp/tools/editor/neovim_command.py +5 -0
- hanzo_mcp/tools/editor/neovim_edit.py +5 -0
- hanzo_mcp/tools/editor/neovim_session.py +5 -0
- hanzo_mcp/tools/filesystem/ast_tool.py +2 -0
- hanzo_mcp/tools/filesystem/batch_search.py +5 -0
- hanzo_mcp/tools/filesystem/content_replace.py +5 -0
- hanzo_mcp/tools/filesystem/diff.py +5 -0
- hanzo_mcp/tools/filesystem/directory_tree.py +5 -0
- hanzo_mcp/tools/filesystem/directory_tree_paginated.py +5 -0
- hanzo_mcp/tools/filesystem/edit.py +5 -0
- hanzo_mcp/tools/filesystem/find.py +5 -0
- hanzo_mcp/tools/filesystem/find_files.py +5 -0
- hanzo_mcp/tools/filesystem/git_search.py +5 -0
- hanzo_mcp/tools/filesystem/grep.py +5 -0
- hanzo_mcp/tools/filesystem/multi_edit.py +5 -0
- hanzo_mcp/tools/filesystem/read.py +5 -0
- hanzo_mcp/tools/filesystem/rules_tool.py +5 -0
- hanzo_mcp/tools/filesystem/search_tool.py +5 -0
- hanzo_mcp/tools/filesystem/symbols_tool.py +5 -0
- hanzo_mcp/tools/filesystem/tree.py +5 -0
- hanzo_mcp/tools/filesystem/watch.py +5 -0
- hanzo_mcp/tools/filesystem/write.py +5 -0
- hanzo_mcp/tools/jupyter/jupyter.py +5 -0
- hanzo_mcp/tools/jupyter/notebook_edit.py +5 -0
- hanzo_mcp/tools/jupyter/notebook_read.py +5 -0
- hanzo_mcp/tools/llm/consensus_tool.py +2 -0
- hanzo_mcp/tools/llm/llm_manage.py +5 -0
- hanzo_mcp/tools/llm/llm_tool.py +2 -0
- hanzo_mcp/tools/llm/llm_unified.py +5 -0
- hanzo_mcp/tools/llm/provider_tools.py +5 -0
- hanzo_mcp/tools/lsp/lsp_tool.py +5 -0
- hanzo_mcp/tools/mcp/mcp_add.py +5 -0
- hanzo_mcp/tools/mcp/mcp_remove.py +5 -0
- hanzo_mcp/tools/mcp/mcp_stats.py +5 -0
- hanzo_mcp/tools/mcp/mcp_tool.py +5 -0
- hanzo_mcp/tools/memory/knowledge_tools.py +14 -0
- hanzo_mcp/tools/memory/memory_tools.py +17 -0
- hanzo_mcp/tools/search/find_tool.py +3 -1
- hanzo_mcp/tools/search/unified_search.py +3 -1
- hanzo_mcp/tools/shell/base_process.py +4 -2
- hanzo_mcp/tools/shell/bash_tool.py +2 -0
- hanzo_mcp/tools/shell/logs.py +5 -0
- hanzo_mcp/tools/shell/npx.py +5 -0
- hanzo_mcp/tools/shell/npx_background.py +5 -0
- hanzo_mcp/tools/shell/npx_tool.py +5 -0
- hanzo_mcp/tools/shell/open.py +5 -0
- hanzo_mcp/tools/shell/pkill.py +5 -0
- hanzo_mcp/tools/shell/process_tool.py +5 -0
- hanzo_mcp/tools/shell/processes.py +5 -0
- hanzo_mcp/tools/shell/run_background.py +5 -0
- hanzo_mcp/tools/shell/run_command.py +2 -0
- hanzo_mcp/tools/shell/run_command_windows.py +5 -0
- hanzo_mcp/tools/shell/streaming_command.py +5 -0
- hanzo_mcp/tools/shell/uvx.py +5 -0
- hanzo_mcp/tools/shell/uvx_background.py +5 -0
- hanzo_mcp/tools/shell/uvx_tool.py +5 -0
- hanzo_mcp/tools/shell/zsh_tool.py +3 -0
- hanzo_mcp/tools/todo/todo.py +5 -0
- hanzo_mcp/tools/todo/todo_read.py +5 -0
- hanzo_mcp/tools/todo/todo_write.py +5 -0
- hanzo_mcp/tools/vector/index_tool.py +5 -0
- hanzo_mcp/tools/vector/vector.py +5 -0
- hanzo_mcp/tools/vector/vector_index.py +5 -0
- hanzo_mcp/tools/vector/vector_search.py +5 -0
- {hanzo_mcp-0.8.15.dist-info → hanzo_mcp-0.9.1.dist-info}/METADATA +1 -1
- hanzo_mcp-0.9.1.dist-info/RECORD +195 -0
- hanzo_mcp-0.8.15.dist-info/RECORD +0 -193
- {hanzo_mcp-0.8.15.dist-info → hanzo_mcp-0.9.1.dist-info}/WHEEL +0 -0
- {hanzo_mcp-0.8.15.dist-info → hanzo_mcp-0.9.1.dist-info}/entry_points.txt +0 -0
- {hanzo_mcp-0.8.15.dist-info → hanzo_mcp-0.9.1.dist-info}/top_level.txt +0 -0
hanzo_mcp/tools/database/sql.py
CHANGED
|
@@ -15,6 +15,8 @@ from typing import (
|
|
|
15
15
|
from pydantic import Field
|
|
16
16
|
from mcp.server.fastmcp import Context as MCPContext
|
|
17
17
|
|
|
18
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
19
|
+
|
|
18
20
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
19
21
|
from hanzo_mcp.tools.common.permissions import PermissionManager
|
|
20
22
|
from hanzo_mcp.tools.database.database_manager import DatabaseManager
|
|
@@ -100,6 +102,9 @@ sql --action stats --table users
|
|
|
100
102
|
"""
|
|
101
103
|
|
|
102
104
|
@override
|
|
105
|
+
@auto_timeout("sql")
|
|
106
|
+
|
|
107
|
+
|
|
103
108
|
async def call(
|
|
104
109
|
self,
|
|
105
110
|
ctx: MCPContext,
|
|
@@ -6,6 +6,7 @@ from typing import Unpack, Optional, Annotated, TypedDict, final, override
|
|
|
6
6
|
from pydantic import Field
|
|
7
7
|
from mcp.server.fastmcp import Context as MCPContext
|
|
8
8
|
|
|
9
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
9
10
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
10
11
|
from hanzo_mcp.tools.common.context import create_tool_context
|
|
11
12
|
from hanzo_mcp.tools.common.permissions import PermissionManager
|
|
@@ -89,6 +90,7 @@ Examples:
|
|
|
89
90
|
Note: Use sql_search for text search operations."""
|
|
90
91
|
|
|
91
92
|
@override
|
|
93
|
+
@auto_timeout("sql_query")
|
|
92
94
|
async def call(
|
|
93
95
|
self,
|
|
94
96
|
ctx: MCPContext,
|
|
@@ -6,6 +6,8 @@ from typing import Unpack, Optional, Annotated, TypedDict, final, override
|
|
|
6
6
|
from pydantic import Field
|
|
7
7
|
from mcp.server.fastmcp import Context as MCPContext
|
|
8
8
|
|
|
9
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
10
|
+
|
|
9
11
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
10
12
|
from hanzo_mcp.tools.common.context import create_tool_context
|
|
11
13
|
from hanzo_mcp.tools.common.permissions import PermissionManager
|
|
@@ -107,6 +109,9 @@ Examples:
|
|
|
107
109
|
Use sql_query for complex queries with joins, conditions, etc."""
|
|
108
110
|
|
|
109
111
|
@override
|
|
112
|
+
@auto_timeout("sql_search")
|
|
113
|
+
|
|
114
|
+
|
|
110
115
|
async def call(
|
|
111
116
|
self,
|
|
112
117
|
ctx: MCPContext,
|
|
@@ -6,6 +6,8 @@ from typing import Unpack, Optional, Annotated, TypedDict, final, override
|
|
|
6
6
|
from pydantic import Field
|
|
7
7
|
from mcp.server.fastmcp import Context as MCPContext
|
|
8
8
|
|
|
9
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
10
|
+
|
|
9
11
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
10
12
|
from hanzo_mcp.tools.common.context import create_tool_context
|
|
11
13
|
from hanzo_mcp.tools.common.permissions import PermissionManager
|
|
@@ -75,6 +77,9 @@ Examples:
|
|
|
75
77
|
"""
|
|
76
78
|
|
|
77
79
|
@override
|
|
80
|
+
@auto_timeout("sql_stats")
|
|
81
|
+
|
|
82
|
+
|
|
78
83
|
async def call(
|
|
79
84
|
self,
|
|
80
85
|
ctx: MCPContext,
|
|
@@ -9,6 +9,8 @@ from typing import List, Unpack, Optional, Annotated, TypedDict, final, override
|
|
|
9
9
|
from pydantic import Field
|
|
10
10
|
from mcp.server.fastmcp import Context as MCPContext
|
|
11
11
|
|
|
12
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
13
|
+
|
|
12
14
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
13
15
|
from hanzo_mcp.tools.common.context import create_tool_context
|
|
14
16
|
from hanzo_mcp.tools.common.permissions import PermissionManager
|
|
@@ -128,6 +130,9 @@ Note: Requires Neovim to be installed.
|
|
|
128
130
|
"""
|
|
129
131
|
|
|
130
132
|
@override
|
|
133
|
+
@auto_timeout("neovim_command")
|
|
134
|
+
|
|
135
|
+
|
|
131
136
|
async def call(
|
|
132
137
|
self,
|
|
133
138
|
ctx: MCPContext,
|
|
@@ -8,6 +8,8 @@ from typing import Unpack, Optional, Annotated, TypedDict, final, override
|
|
|
8
8
|
from pydantic import Field
|
|
9
9
|
from mcp.server.fastmcp import Context as MCPContext
|
|
10
10
|
|
|
11
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
12
|
+
|
|
11
13
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
12
14
|
from hanzo_mcp.tools.common.context import create_tool_context
|
|
13
15
|
from hanzo_mcp.tools.common.permissions import PermissionManager
|
|
@@ -125,6 +127,9 @@ Note: Requires Neovim to be installed and available in PATH.
|
|
|
125
127
|
"""
|
|
126
128
|
|
|
127
129
|
@override
|
|
130
|
+
@auto_timeout("neovim_edit")
|
|
131
|
+
|
|
132
|
+
|
|
128
133
|
async def call(
|
|
129
134
|
self,
|
|
130
135
|
ctx: MCPContext,
|
|
@@ -11,6 +11,8 @@ from datetime import datetime
|
|
|
11
11
|
from pydantic import Field
|
|
12
12
|
from mcp.server.fastmcp import Context as MCPContext
|
|
13
13
|
|
|
14
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
15
|
+
|
|
14
16
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
15
17
|
from hanzo_mcp.tools.common.context import create_tool_context
|
|
16
18
|
|
|
@@ -114,6 +116,9 @@ Note: Requires Neovim to be installed.
|
|
|
114
116
|
"""
|
|
115
117
|
|
|
116
118
|
@override
|
|
119
|
+
@auto_timeout("neovim_session")
|
|
120
|
+
|
|
121
|
+
|
|
117
122
|
async def call(
|
|
118
123
|
self,
|
|
119
124
|
ctx: MCPContext,
|
|
@@ -15,6 +15,7 @@ from grep_ast.grep_ast import TreeContext
|
|
|
15
15
|
from mcp.server.fastmcp import Context as MCPContext
|
|
16
16
|
|
|
17
17
|
from hanzo_mcp.tools.filesystem.base import FilesystemBaseTool
|
|
18
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
18
19
|
|
|
19
20
|
Pattern = Annotated[
|
|
20
21
|
str,
|
|
@@ -97,6 +98,7 @@ ast "def test_" ./tests
|
|
|
97
98
|
Searches code structure intelligently, understanding syntax and providing semantic context."""
|
|
98
99
|
|
|
99
100
|
@override
|
|
101
|
+
@auto_timeout("ast")
|
|
100
102
|
async def call(
|
|
101
103
|
self,
|
|
102
104
|
ctx: MCPContext,
|
|
@@ -21,6 +21,8 @@ from typing_extensions import Unpack, Annotated, TypedDict, final, override
|
|
|
21
21
|
|
|
22
22
|
from pydantic import Field
|
|
23
23
|
from mcp.server import FastMCP
|
|
24
|
+
|
|
25
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
24
26
|
from mcp.server.fastmcp import Context as MCPContext
|
|
25
27
|
|
|
26
28
|
from hanzo_mcp.tools.filesystem.base import FilesystemBaseTool
|
|
@@ -539,6 +541,9 @@ Perfect for comprehensive code analysis and refactoring tasks."""
|
|
|
539
541
|
return all_results
|
|
540
542
|
|
|
541
543
|
@override
|
|
544
|
+
@auto_timeout("batch_search")
|
|
545
|
+
|
|
546
|
+
|
|
542
547
|
async def call(self, ctx: MCPContext, **params: Unpack[BatchSearchParams]) -> str:
|
|
543
548
|
"""Execute batch search with multiple queries in parallel."""
|
|
544
549
|
import time
|
|
@@ -9,6 +9,8 @@ from pathlib import Path
|
|
|
9
9
|
|
|
10
10
|
from pydantic import Field
|
|
11
11
|
from mcp.server import FastMCP
|
|
12
|
+
|
|
13
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
12
14
|
from mcp.server.fastmcp import Context as MCPContext
|
|
13
15
|
|
|
14
16
|
from hanzo_mcp.tools.filesystem.base import FilesystemBaseTool
|
|
@@ -101,6 +103,9 @@ Can be run in dry-run mode to preview changes without applying them.
|
|
|
101
103
|
Only works within allowed directories."""
|
|
102
104
|
|
|
103
105
|
@override
|
|
106
|
+
@auto_timeout("content_replace")
|
|
107
|
+
|
|
108
|
+
|
|
104
109
|
async def call(
|
|
105
110
|
self,
|
|
106
111
|
ctx: MCPContext,
|
|
@@ -5,6 +5,8 @@ from typing import override
|
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
|
|
7
7
|
from mcp.server import FastMCP
|
|
8
|
+
|
|
9
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
8
10
|
from mcp.server.fastmcp import Context as MCPContext
|
|
9
11
|
|
|
10
12
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
@@ -200,6 +202,9 @@ diff a.json b.json --ignore-whitespace"""
|
|
|
200
202
|
show_line_numbers=show_line_numbers,
|
|
201
203
|
)
|
|
202
204
|
|
|
205
|
+
@auto_timeout("diff")
|
|
206
|
+
|
|
207
|
+
|
|
203
208
|
async def call(self, ctx: MCPContext, **params) -> str:
|
|
204
209
|
"""Call the tool with arguments."""
|
|
205
210
|
return await self.run(
|
|
@@ -8,6 +8,8 @@ from pathlib import Path
|
|
|
8
8
|
|
|
9
9
|
from pydantic import Field
|
|
10
10
|
from mcp.server import FastMCP
|
|
11
|
+
|
|
12
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
11
13
|
from mcp.server.fastmcp import Context as MCPContext
|
|
12
14
|
|
|
13
15
|
from hanzo_mcp.tools.common.truncate import truncate_response
|
|
@@ -85,6 +87,9 @@ indented list for readability. By default, common development directories like
|
|
|
85
87
|
requested. Only works within allowed directories."""
|
|
86
88
|
|
|
87
89
|
@override
|
|
90
|
+
@auto_timeout("directory_tree")
|
|
91
|
+
|
|
92
|
+
|
|
88
93
|
async def call(
|
|
89
94
|
self,
|
|
90
95
|
ctx: MCPContext,
|
|
@@ -19,6 +19,8 @@ from pathlib import Path
|
|
|
19
19
|
|
|
20
20
|
from pydantic import Field
|
|
21
21
|
from mcp.server import FastMCP
|
|
22
|
+
|
|
23
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
22
24
|
from mcp.server.fastmcp import Context as MCPContext
|
|
23
25
|
|
|
24
26
|
from hanzo_mcp.tools.filesystem.base import FilesystemBaseTool
|
|
@@ -116,6 +118,9 @@ Use the cursor field to continue from where the previous request left off.
|
|
|
116
118
|
Returns nextCursor if more entries are available."""
|
|
117
119
|
|
|
118
120
|
@override
|
|
121
|
+
@auto_timeout("directory_tree_paginated")
|
|
122
|
+
|
|
123
|
+
|
|
119
124
|
async def call(
|
|
120
125
|
self,
|
|
121
126
|
ctx: MCPContext,
|
|
@@ -9,6 +9,8 @@ from pathlib import Path
|
|
|
9
9
|
|
|
10
10
|
from pydantic import Field
|
|
11
11
|
from mcp.server import FastMCP
|
|
12
|
+
|
|
13
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
12
14
|
from mcp.server.fastmcp import Context as MCPContext
|
|
13
15
|
|
|
14
16
|
from hanzo_mcp.tools.filesystem.base import FilesystemBaseTool
|
|
@@ -88,6 +90,9 @@ Usage:
|
|
|
88
90
|
- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required."""
|
|
89
91
|
|
|
90
92
|
@override
|
|
93
|
+
@auto_timeout("edit")
|
|
94
|
+
|
|
95
|
+
|
|
91
96
|
async def call(
|
|
92
97
|
self,
|
|
93
98
|
ctx: MCPContext,
|
|
@@ -23,6 +23,8 @@ from pathlib import Path
|
|
|
23
23
|
from pydantic import Field
|
|
24
24
|
from mcp.server.fastmcp import Context as MCPContext
|
|
25
25
|
|
|
26
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
27
|
+
|
|
26
28
|
from hanzo_mcp.tools.filesystem.base import FilesystemBaseTool
|
|
27
29
|
|
|
28
30
|
# Parameter types
|
|
@@ -147,6 +149,9 @@ Fast, intuitive file content search."""
|
|
|
147
149
|
return self._available_backends
|
|
148
150
|
|
|
149
151
|
@override
|
|
152
|
+
@auto_timeout("find")
|
|
153
|
+
|
|
154
|
+
|
|
150
155
|
async def call(
|
|
151
156
|
self,
|
|
152
157
|
ctx: MCPContext,
|
|
@@ -6,6 +6,8 @@ from typing import Unpack, Optional, Annotated, TypedDict, final, override
|
|
|
6
6
|
from pydantic import Field
|
|
7
7
|
from mcp.server.fastmcp import Context as MCPContext
|
|
8
8
|
|
|
9
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
10
|
+
|
|
9
11
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
10
12
|
from hanzo_mcp.tools.common.context import create_tool_context
|
|
11
13
|
from hanzo_mcp.tools.common.permissions import PermissionManager
|
|
@@ -138,6 +140,9 @@ For database search, use 'sql_search' or 'vector_search'.
|
|
|
138
140
|
"""
|
|
139
141
|
|
|
140
142
|
@override
|
|
143
|
+
@auto_timeout("find_files")
|
|
144
|
+
|
|
145
|
+
|
|
141
146
|
async def call(
|
|
142
147
|
self,
|
|
143
148
|
ctx: MCPContext,
|
|
@@ -8,6 +8,8 @@ from typing import Unpack, Annotated, TypedDict, final, override
|
|
|
8
8
|
from pydantic import Field
|
|
9
9
|
from mcp.server.fastmcp import Context as MCPContext
|
|
10
10
|
|
|
11
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
12
|
+
|
|
11
13
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
12
14
|
from hanzo_mcp.tools.common.context import create_tool_context
|
|
13
15
|
from hanzo_mcp.tools.common.permissions import PermissionManager
|
|
@@ -153,6 +155,9 @@ Examples:
|
|
|
153
155
|
"""
|
|
154
156
|
|
|
155
157
|
@override
|
|
158
|
+
@auto_timeout("git_search")
|
|
159
|
+
|
|
160
|
+
|
|
156
161
|
async def call(
|
|
157
162
|
self,
|
|
158
163
|
ctx: MCPContext,
|
|
@@ -14,6 +14,8 @@ from pathlib import Path
|
|
|
14
14
|
|
|
15
15
|
from pydantic import Field
|
|
16
16
|
from mcp.server import FastMCP
|
|
17
|
+
|
|
18
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
17
19
|
from mcp.server.fastmcp import Context as MCPContext
|
|
18
20
|
|
|
19
21
|
from hanzo_mcp.tools.common.context import ToolContext
|
|
@@ -353,6 +355,9 @@ When you are doing an open ended search that may require multiple rounds of glob
|
|
|
353
355
|
return f"Error searching file contents: {str(e)}"
|
|
354
356
|
|
|
355
357
|
@override
|
|
358
|
+
@auto_timeout("grep")
|
|
359
|
+
|
|
360
|
+
|
|
356
361
|
async def call(
|
|
357
362
|
self,
|
|
358
363
|
ctx: MCPContext,
|
|
@@ -9,6 +9,8 @@ from pathlib import Path
|
|
|
9
9
|
|
|
10
10
|
from pydantic import Field
|
|
11
11
|
from mcp.server import FastMCP
|
|
12
|
+
|
|
13
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
12
14
|
from mcp.server.fastmcp import Context as MCPContext
|
|
13
15
|
|
|
14
16
|
from hanzo_mcp.tools.filesystem.base import FilesystemBaseTool
|
|
@@ -132,6 +134,9 @@ If you want to create a new file, use:
|
|
|
132
134
|
- Subsequent edits: normal edit operations on the created content"""
|
|
133
135
|
|
|
134
136
|
@override
|
|
137
|
+
@auto_timeout("multi_edit")
|
|
138
|
+
|
|
139
|
+
|
|
135
140
|
async def call(
|
|
136
141
|
self,
|
|
137
142
|
ctx: MCPContext,
|
|
@@ -8,6 +8,8 @@ from pathlib import Path
|
|
|
8
8
|
|
|
9
9
|
from pydantic import Field
|
|
10
10
|
from mcp.server import FastMCP
|
|
11
|
+
|
|
12
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
11
13
|
from mcp.server.fastmcp import Context as MCPContext
|
|
12
14
|
|
|
13
15
|
from hanzo_mcp.tools.common.truncate import truncate_response
|
|
@@ -91,6 +93,9 @@ Usage:
|
|
|
91
93
|
- When reading multiple files, you MUST use the batch tool to read them all at once"""
|
|
92
94
|
|
|
93
95
|
@override
|
|
96
|
+
@auto_timeout("read")
|
|
97
|
+
|
|
98
|
+
|
|
94
99
|
async def call(
|
|
95
100
|
self,
|
|
96
101
|
ctx: MCPContext,
|
|
@@ -9,6 +9,8 @@ from pathlib import Path
|
|
|
9
9
|
|
|
10
10
|
from pydantic import Field
|
|
11
11
|
from mcp.server import FastMCP
|
|
12
|
+
|
|
13
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
12
14
|
from mcp.server.fastmcp import Context as MCPContext
|
|
13
15
|
|
|
14
16
|
from hanzo_mcp.tools.filesystem.base import FilesystemBaseTool
|
|
@@ -74,6 +76,9 @@ The tool returns the contents of all found configuration files to help
|
|
|
74
76
|
understand project-specific requirements and preferences."""
|
|
75
77
|
|
|
76
78
|
@override
|
|
79
|
+
@auto_timeout("rules")
|
|
80
|
+
|
|
81
|
+
|
|
77
82
|
async def call(
|
|
78
83
|
self,
|
|
79
84
|
ctx: MCPContext,
|
|
@@ -27,6 +27,8 @@ from dataclasses import dataclass
|
|
|
27
27
|
|
|
28
28
|
from pydantic import Field
|
|
29
29
|
from mcp.server import FastMCP
|
|
30
|
+
|
|
31
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
30
32
|
from mcp.server.fastmcp import Context as MCPContext
|
|
31
33
|
|
|
32
34
|
from hanzo_mcp.tools.filesystem.base import FilesystemBaseTool
|
|
@@ -528,6 +530,9 @@ This is the recommended search tool for comprehensive results."""
|
|
|
528
530
|
return results
|
|
529
531
|
|
|
530
532
|
@override
|
|
533
|
+
@auto_timeout("search")
|
|
534
|
+
|
|
535
|
+
|
|
531
536
|
async def call(
|
|
532
537
|
self,
|
|
533
538
|
ctx: MCPContext,
|
|
@@ -23,6 +23,8 @@ from pydantic import Field
|
|
|
23
23
|
from grep_ast.grep_ast import TreeContext
|
|
24
24
|
from mcp.server.fastmcp import Context as MCPContext
|
|
25
25
|
|
|
26
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
27
|
+
|
|
26
28
|
from hanzo_mcp.tools.filesystem.base import FilesystemBaseTool
|
|
27
29
|
|
|
28
30
|
# Parameter types
|
|
@@ -126,6 +128,9 @@ symbols --action list --path ./src --symbol-type class
|
|
|
126
128
|
Finds code structures (functions, classes, methods) with full context."""
|
|
127
129
|
|
|
128
130
|
@override
|
|
131
|
+
@auto_timeout("symbols")
|
|
132
|
+
|
|
133
|
+
|
|
129
134
|
async def call(
|
|
130
135
|
self,
|
|
131
136
|
ctx: MCPContext,
|
|
@@ -9,6 +9,8 @@ from pathlib import Path
|
|
|
9
9
|
from pydantic import Field
|
|
10
10
|
from mcp.server.fastmcp import Context as MCPContext
|
|
11
11
|
|
|
12
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
13
|
+
|
|
12
14
|
from hanzo_mcp.tools.filesystem.base import FilesystemBaseTool
|
|
13
15
|
|
|
14
16
|
# Parameter types
|
|
@@ -95,6 +97,9 @@ tree --dirs-only
|
|
|
95
97
|
tree --pattern "*.py" --show-size"""
|
|
96
98
|
|
|
97
99
|
@override
|
|
100
|
+
@auto_timeout("tree")
|
|
101
|
+
|
|
102
|
+
|
|
98
103
|
async def call(
|
|
99
104
|
self,
|
|
100
105
|
ctx: MCPContext,
|
|
@@ -7,6 +7,8 @@ from pathlib import Path
|
|
|
7
7
|
from datetime import datetime
|
|
8
8
|
|
|
9
9
|
from mcp.server import FastMCP
|
|
10
|
+
|
|
11
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
10
12
|
from mcp.server.fastmcp import Context as MCPContext
|
|
11
13
|
|
|
12
14
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
@@ -41,6 +43,9 @@ class WatchTool(BaseTool):
|
|
|
41
43
|
duration=duration,
|
|
42
44
|
)
|
|
43
45
|
|
|
46
|
+
@auto_timeout("watch")
|
|
47
|
+
|
|
48
|
+
|
|
44
49
|
async def call(self, ctx: MCPContext, **params) -> str:
|
|
45
50
|
"""Call the tool with arguments."""
|
|
46
51
|
return await self.run(
|
|
@@ -8,6 +8,8 @@ from pathlib import Path
|
|
|
8
8
|
|
|
9
9
|
from pydantic import Field
|
|
10
10
|
from mcp.server import FastMCP
|
|
11
|
+
|
|
12
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
11
13
|
from mcp.server.fastmcp import Context as MCPContext
|
|
12
14
|
|
|
13
15
|
from hanzo_mcp.tools.filesystem.base import FilesystemBaseTool
|
|
@@ -72,6 +74,9 @@ Usage:
|
|
|
72
74
|
- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User."""
|
|
73
75
|
|
|
74
76
|
@override
|
|
77
|
+
@auto_timeout("write")
|
|
78
|
+
|
|
79
|
+
|
|
75
80
|
async def call(
|
|
76
81
|
self,
|
|
77
82
|
ctx: MCPContext,
|
|
@@ -16,6 +16,8 @@ import nbformat
|
|
|
16
16
|
from pydantic import Field
|
|
17
17
|
from mcp.server.fastmcp import Context as MCPContext
|
|
18
18
|
|
|
19
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
20
|
+
|
|
19
21
|
from hanzo_mcp.tools.jupyter.base import JupyterBaseTool
|
|
20
22
|
|
|
21
23
|
# Parameter types
|
|
@@ -111,6 +113,9 @@ jupyter --action create "new.ipynb"
|
|
|
111
113
|
"""
|
|
112
114
|
|
|
113
115
|
@override
|
|
116
|
+
@auto_timeout("jupyter")
|
|
117
|
+
|
|
118
|
+
|
|
114
119
|
async def call(
|
|
115
120
|
self,
|
|
116
121
|
ctx: MCPContext,
|
|
@@ -9,6 +9,8 @@ from pathlib import Path
|
|
|
9
9
|
|
|
10
10
|
from pydantic import Field
|
|
11
11
|
from mcp.server import FastMCP
|
|
12
|
+
|
|
13
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
12
14
|
from mcp.server.fastmcp import Context as MCPContext
|
|
13
15
|
|
|
14
16
|
from hanzo_mcp.tools.jupyter.base import JupyterBaseTool
|
|
@@ -96,6 +98,9 @@ class NoteBookEditTool(JupyterBaseTool):
|
|
|
96
98
|
return "Completely replaces the contents of a specific cell in a Jupyter notebook (.ipynb file) with new source. Jupyter notebooks are interactive documents that combine code, text, and visualizations, commonly used for data analysis and scientific computing. The notebook_path parameter must be an absolute path, not a relative path. The cell_number is 0-indexed. Use edit_mode=insert to add a new cell at the index specified by cell_number. Use edit_mode=delete to delete the cell at the index specified by cell_number."
|
|
97
99
|
|
|
98
100
|
@override
|
|
101
|
+
@auto_timeout("notebook_edit")
|
|
102
|
+
|
|
103
|
+
|
|
99
104
|
async def call(
|
|
100
105
|
self,
|
|
101
106
|
ctx: MCPContext,
|
|
@@ -9,6 +9,8 @@ from pathlib import Path
|
|
|
9
9
|
|
|
10
10
|
from pydantic import Field
|
|
11
11
|
from mcp.server import FastMCP
|
|
12
|
+
|
|
13
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
12
14
|
from mcp.server.fastmcp import Context as MCPContext
|
|
13
15
|
|
|
14
16
|
from hanzo_mcp.tools.jupyter.base import JupyterBaseTool
|
|
@@ -56,6 +58,9 @@ class NotebookReadTool(JupyterBaseTool):
|
|
|
56
58
|
return "Reads a Jupyter notebook (.ipynb file) and returns all of the cells with their outputs. Jupyter notebooks are interactive documents that combine code, text, and visualizations, commonly used for data analysis and scientific computing. The notebook_path parameter must be an absolute path, not a relative path."
|
|
57
59
|
|
|
58
60
|
@override
|
|
61
|
+
@auto_timeout("notebook_read")
|
|
62
|
+
|
|
63
|
+
|
|
59
64
|
async def call(
|
|
60
65
|
self,
|
|
61
66
|
ctx: MCPContext,
|
|
@@ -15,6 +15,7 @@ from typing import (
|
|
|
15
15
|
from pydantic import Field
|
|
16
16
|
from mcp.server.fastmcp import Context as MCPContext
|
|
17
17
|
|
|
18
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
18
19
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
19
20
|
from hanzo_mcp.tools.llm.llm_tool import LLMTool
|
|
20
21
|
from hanzo_mcp.tools.common.context import create_tool_context, ToolContext
|
|
@@ -155,6 +156,7 @@ The tool will:
|
|
|
155
156
|
"""
|
|
156
157
|
|
|
157
158
|
@override
|
|
159
|
+
@auto_timeout("consensus")
|
|
158
160
|
async def call(
|
|
159
161
|
self,
|
|
160
162
|
ctx: MCPContext,
|
|
@@ -7,6 +7,8 @@ from pathlib import Path
|
|
|
7
7
|
from pydantic import Field
|
|
8
8
|
from mcp.server.fastmcp import Context as MCPContext
|
|
9
9
|
|
|
10
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
11
|
+
|
|
10
12
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
11
13
|
from hanzo_mcp.tools.llm.llm_tool import LLMTool
|
|
12
14
|
from hanzo_mcp.tools.common.context import create_tool_context
|
|
@@ -110,6 +112,9 @@ Providers are automatically detected based on environment variables:
|
|
|
110
112
|
"""
|
|
111
113
|
|
|
112
114
|
@override
|
|
115
|
+
@auto_timeout("llm_manage")
|
|
116
|
+
|
|
117
|
+
|
|
113
118
|
async def call(
|
|
114
119
|
self,
|
|
115
120
|
ctx: MCPContext,
|
hanzo_mcp/tools/llm/llm_tool.py
CHANGED
|
@@ -21,6 +21,7 @@ from mcp.server.fastmcp import Context as MCPContext
|
|
|
21
21
|
|
|
22
22
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
23
23
|
from hanzo_mcp.tools.common.context import create_tool_context
|
|
24
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
24
25
|
|
|
25
26
|
# Check if litellm is available
|
|
26
27
|
try:
|
|
@@ -263,6 +264,7 @@ llm --action models --provider openai
|
|
|
263
264
|
Available: {", ".join(available) if available else "None"}"""
|
|
264
265
|
|
|
265
266
|
@override
|
|
267
|
+
@auto_timeout("llm")
|
|
266
268
|
async def call(
|
|
267
269
|
self,
|
|
268
270
|
ctx: MCPContext,
|
|
@@ -19,6 +19,8 @@ from pathlib import Path
|
|
|
19
19
|
from pydantic import Field
|
|
20
20
|
from mcp.server.fastmcp import Context as MCPContext
|
|
21
21
|
|
|
22
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
23
|
+
|
|
22
24
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
23
25
|
from hanzo_mcp.tools.common.context import create_tool_context
|
|
24
26
|
|
|
@@ -263,6 +265,9 @@ llm --action models --provider openai
|
|
|
263
265
|
Available: {", ".join(available) if available else "None"}"""
|
|
264
266
|
|
|
265
267
|
@override
|
|
268
|
+
@auto_timeout("llm_unified")
|
|
269
|
+
|
|
270
|
+
|
|
266
271
|
async def call(
|
|
267
272
|
self,
|
|
268
273
|
ctx: MCPContext,
|
|
@@ -5,6 +5,8 @@ from typing import Dict, Unpack, Optional, Annotated, TypedDict, final, override
|
|
|
5
5
|
from pydantic import Field
|
|
6
6
|
from mcp.server.fastmcp import Context as MCPContext
|
|
7
7
|
|
|
8
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
9
|
+
|
|
8
10
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
9
11
|
from hanzo_mcp.tools.llm.llm_tool import LLMTool
|
|
10
12
|
|
|
@@ -98,6 +100,9 @@ class BaseProviderTool(BaseTool):
|
|
|
98
100
|
return model
|
|
99
101
|
|
|
100
102
|
@override
|
|
103
|
+
@auto_timeout("provider_tools")
|
|
104
|
+
|
|
105
|
+
|
|
101
106
|
async def call(
|
|
102
107
|
self,
|
|
103
108
|
ctx: MCPContext,
|
hanzo_mcp/tools/lsp/lsp_tool.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
1
3
|
"""Language Server Protocol (LSP) tool for code intelligence.
|
|
2
4
|
|
|
3
5
|
This tool provides on-demand LSP configuration and installation for various
|
|
@@ -472,6 +474,9 @@ class LSPTool(BaseTool):
|
|
|
472
474
|
|
|
473
475
|
return MCPResourceDocument(data=result)
|
|
474
476
|
|
|
477
|
+
@auto_timeout("lsp")
|
|
478
|
+
|
|
479
|
+
|
|
475
480
|
async def call(self, **kwargs) -> str:
|
|
476
481
|
"""Tool interface for MCP - converts result to JSON string."""
|
|
477
482
|
result = await self.run(**kwargs)
|