hanzo-mcp 0.9.0__py3-none-any.whl → 0.9.2__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.

Files changed (135) hide show
  1. hanzo_mcp/__init__.py +1 -1
  2. hanzo_mcp/analytics/posthog_analytics.py +14 -1
  3. hanzo_mcp/cli.py +108 -4
  4. hanzo_mcp/server.py +11 -0
  5. hanzo_mcp/tools/__init__.py +3 -16
  6. hanzo_mcp/tools/agent/__init__.py +5 -0
  7. hanzo_mcp/tools/agent/agent.py +5 -0
  8. hanzo_mcp/tools/agent/agent_tool.py +3 -17
  9. hanzo_mcp/tools/agent/agent_tool_v1_deprecated.py +623 -0
  10. hanzo_mcp/tools/agent/clarification_tool.py +7 -1
  11. hanzo_mcp/tools/agent/claude_desktop_auth.py +16 -6
  12. hanzo_mcp/tools/agent/cli_agent_base.py +5 -0
  13. hanzo_mcp/tools/agent/cli_tools.py +26 -0
  14. hanzo_mcp/tools/agent/code_auth_tool.py +5 -0
  15. hanzo_mcp/tools/agent/critic_tool.py +7 -1
  16. hanzo_mcp/tools/agent/iching_tool.py +5 -0
  17. hanzo_mcp/tools/agent/network_tool.py +5 -0
  18. hanzo_mcp/tools/agent/review_tool.py +7 -1
  19. hanzo_mcp/tools/agent/swarm_alias.py +5 -0
  20. hanzo_mcp/tools/agent/swarm_tool.py +701 -0
  21. hanzo_mcp/tools/agent/swarm_tool_v1_deprecated.py +554 -0
  22. hanzo_mcp/tools/agent/unified_cli_tools.py +5 -0
  23. hanzo_mcp/tools/common/auto_timeout.py +254 -0
  24. hanzo_mcp/tools/common/base.py +4 -0
  25. hanzo_mcp/tools/common/batch_tool.py +5 -0
  26. hanzo_mcp/tools/common/config_tool.py +5 -0
  27. hanzo_mcp/tools/common/critic_tool.py +5 -0
  28. hanzo_mcp/tools/common/paginated_base.py +4 -0
  29. hanzo_mcp/tools/common/permissions.py +38 -12
  30. hanzo_mcp/tools/common/personality.py +673 -980
  31. hanzo_mcp/tools/common/stats.py +5 -0
  32. hanzo_mcp/tools/common/thinking_tool.py +5 -0
  33. hanzo_mcp/tools/common/timeout_parser.py +103 -0
  34. hanzo_mcp/tools/common/tool_disable.py +5 -0
  35. hanzo_mcp/tools/common/tool_enable.py +5 -0
  36. hanzo_mcp/tools/common/tool_list.py +5 -0
  37. hanzo_mcp/tools/config/config_tool.py +5 -0
  38. hanzo_mcp/tools/config/mode_tool.py +5 -0
  39. hanzo_mcp/tools/database/graph.py +5 -0
  40. hanzo_mcp/tools/database/graph_add.py +5 -0
  41. hanzo_mcp/tools/database/graph_query.py +5 -0
  42. hanzo_mcp/tools/database/graph_remove.py +5 -0
  43. hanzo_mcp/tools/database/graph_search.py +5 -0
  44. hanzo_mcp/tools/database/graph_stats.py +5 -0
  45. hanzo_mcp/tools/database/sql.py +5 -0
  46. hanzo_mcp/tools/database/sql_query.py +2 -0
  47. hanzo_mcp/tools/database/sql_search.py +5 -0
  48. hanzo_mcp/tools/database/sql_stats.py +5 -0
  49. hanzo_mcp/tools/editor/neovim_command.py +5 -0
  50. hanzo_mcp/tools/editor/neovim_edit.py +7 -2
  51. hanzo_mcp/tools/editor/neovim_session.py +5 -0
  52. hanzo_mcp/tools/filesystem/__init__.py +23 -26
  53. hanzo_mcp/tools/filesystem/ast_tool.py +3 -4
  54. hanzo_mcp/tools/filesystem/base.py +2 -18
  55. hanzo_mcp/tools/filesystem/batch_search.py +825 -0
  56. hanzo_mcp/tools/filesystem/content_replace.py +5 -3
  57. hanzo_mcp/tools/filesystem/diff.py +5 -0
  58. hanzo_mcp/tools/filesystem/directory_tree.py +34 -281
  59. hanzo_mcp/tools/filesystem/directory_tree_paginated.py +345 -0
  60. hanzo_mcp/tools/filesystem/edit.py +6 -5
  61. hanzo_mcp/tools/filesystem/find.py +177 -311
  62. hanzo_mcp/tools/filesystem/find_files.py +370 -0
  63. hanzo_mcp/tools/filesystem/git_search.py +5 -3
  64. hanzo_mcp/tools/filesystem/grep.py +454 -0
  65. hanzo_mcp/tools/filesystem/multi_edit.py +6 -5
  66. hanzo_mcp/tools/filesystem/read.py +10 -9
  67. hanzo_mcp/tools/filesystem/rules_tool.py +6 -4
  68. hanzo_mcp/tools/filesystem/search_tool.py +728 -0
  69. hanzo_mcp/tools/filesystem/symbols_tool.py +510 -0
  70. hanzo_mcp/tools/filesystem/tree.py +273 -0
  71. hanzo_mcp/tools/filesystem/watch.py +6 -1
  72. hanzo_mcp/tools/filesystem/write.py +13 -7
  73. hanzo_mcp/tools/jupyter/jupyter.py +30 -2
  74. hanzo_mcp/tools/jupyter/notebook_edit.py +298 -0
  75. hanzo_mcp/tools/jupyter/notebook_read.py +148 -0
  76. hanzo_mcp/tools/llm/consensus_tool.py +8 -6
  77. hanzo_mcp/tools/llm/llm_manage.py +5 -0
  78. hanzo_mcp/tools/llm/llm_tool.py +2 -0
  79. hanzo_mcp/tools/llm/llm_unified.py +5 -0
  80. hanzo_mcp/tools/llm/provider_tools.py +5 -0
  81. hanzo_mcp/tools/lsp/lsp_tool.py +475 -622
  82. hanzo_mcp/tools/mcp/mcp_add.py +7 -2
  83. hanzo_mcp/tools/mcp/mcp_remove.py +15 -2
  84. hanzo_mcp/tools/mcp/mcp_stats.py +5 -0
  85. hanzo_mcp/tools/mcp/mcp_tool.py +5 -0
  86. hanzo_mcp/tools/memory/knowledge_tools.py +14 -0
  87. hanzo_mcp/tools/memory/memory_tools.py +17 -0
  88. hanzo_mcp/tools/search/find_tool.py +5 -3
  89. hanzo_mcp/tools/search/unified_search.py +3 -1
  90. hanzo_mcp/tools/shell/__init__.py +2 -14
  91. hanzo_mcp/tools/shell/base_process.py +4 -2
  92. hanzo_mcp/tools/shell/bash_tool.py +2 -0
  93. hanzo_mcp/tools/shell/command_executor.py +7 -7
  94. hanzo_mcp/tools/shell/logs.py +5 -0
  95. hanzo_mcp/tools/shell/npx.py +5 -0
  96. hanzo_mcp/tools/shell/npx_background.py +5 -0
  97. hanzo_mcp/tools/shell/npx_tool.py +5 -0
  98. hanzo_mcp/tools/shell/open.py +5 -0
  99. hanzo_mcp/tools/shell/pkill.py +5 -0
  100. hanzo_mcp/tools/shell/process_tool.py +5 -0
  101. hanzo_mcp/tools/shell/processes.py +5 -0
  102. hanzo_mcp/tools/shell/run_background.py +5 -0
  103. hanzo_mcp/tools/shell/run_command.py +2 -0
  104. hanzo_mcp/tools/shell/run_command_windows.py +5 -0
  105. hanzo_mcp/tools/shell/streaming_command.py +5 -0
  106. hanzo_mcp/tools/shell/uvx.py +5 -0
  107. hanzo_mcp/tools/shell/uvx_background.py +5 -0
  108. hanzo_mcp/tools/shell/uvx_tool.py +5 -0
  109. hanzo_mcp/tools/shell/zsh_tool.py +3 -0
  110. hanzo_mcp/tools/todo/todo.py +5 -0
  111. hanzo_mcp/tools/todo/todo_read.py +142 -0
  112. hanzo_mcp/tools/todo/todo_write.py +367 -0
  113. hanzo_mcp/tools/vector/__init__.py +42 -95
  114. hanzo_mcp/tools/vector/index_tool.py +5 -0
  115. hanzo_mcp/tools/vector/vector.py +5 -0
  116. hanzo_mcp/tools/vector/vector_index.py +5 -0
  117. hanzo_mcp/tools/vector/vector_search.py +5 -0
  118. {hanzo_mcp-0.9.0.dist-info → hanzo_mcp-0.9.2.dist-info}/METADATA +1 -1
  119. hanzo_mcp-0.9.2.dist-info/RECORD +195 -0
  120. hanzo_mcp/tools/common/path_utils.py +0 -34
  121. hanzo_mcp/tools/compiler/__init__.py +0 -8
  122. hanzo_mcp/tools/compiler/sandboxed_compiler.py +0 -681
  123. hanzo_mcp/tools/environment/__init__.py +0 -8
  124. hanzo_mcp/tools/environment/environment_detector.py +0 -594
  125. hanzo_mcp/tools/filesystem/search.py +0 -1160
  126. hanzo_mcp/tools/framework/__init__.py +0 -8
  127. hanzo_mcp/tools/framework/framework_modes.py +0 -714
  128. hanzo_mcp/tools/memory/conversation_memory.py +0 -636
  129. hanzo_mcp/tools/shell/run_tool.py +0 -56
  130. hanzo_mcp/tools/vector/node_tool.py +0 -538
  131. hanzo_mcp/tools/vector/unified_vector.py +0 -384
  132. hanzo_mcp-0.9.0.dist-info/RECORD +0 -191
  133. {hanzo_mcp-0.9.0.dist-info → hanzo_mcp-0.9.2.dist-info}/WHEEL +0 -0
  134. {hanzo_mcp-0.9.0.dist-info → hanzo_mcp-0.9.2.dist-info}/entry_points.txt +0 -0
  135. {hanzo_mcp-0.9.0.dist-info → hanzo_mcp-0.9.2.dist-info}/top_level.txt +0 -0
hanzo_mcp/__init__.py CHANGED
@@ -26,4 +26,4 @@ if os.environ.get("HANZO_MCP_TRANSPORT") == "stdio":
26
26
  except ImportError:
27
27
  pass
28
28
 
29
- __version__ = "0.8.4"
29
+ __version__ = "0.8.16"
@@ -16,6 +16,7 @@ import traceback
16
16
  from typing import Any, Dict, TypeVar, Callable, Optional
17
17
  from datetime import datetime
18
18
  from dataclasses import dataclass
19
+ from importlib.metadata import version, PackageNotFoundError
19
20
 
20
21
  # Try to import PostHog, but make it optional
21
22
  try:
@@ -98,7 +99,7 @@ class Analytics:
98
99
  "timestamp": datetime.utcnow().isoformat(),
99
100
  "platform": platform.system(),
100
101
  "python_version": platform.python_version(),
101
- "mcp_version": "0.6.13", # TODO: Get from package
102
+ "mcp_version": self._get_package_version(),
102
103
  **(properties or {}),
103
104
  }
104
105
 
@@ -179,6 +180,18 @@ class Analytics:
179
180
  except Exception:
180
181
  pass
181
182
 
183
+ def _get_package_version(self) -> str:
184
+ """Get the current package version."""
185
+ try:
186
+ return version('hanzo-mcp')
187
+ except PackageNotFoundError:
188
+ # Fallback to hardcoded version if package not installed
189
+ try:
190
+ from hanzo_mcp import __version__
191
+ return __version__
192
+ except ImportError:
193
+ return "0.8.14"
194
+
182
195
  def shutdown(self) -> None:
183
196
  """Shutdown analytics client."""
184
197
  if self.is_enabled():
hanzo_mcp/cli.py CHANGED
@@ -15,6 +15,19 @@ import argparse
15
15
  from typing import Any, cast
16
16
  from pathlib import Path
17
17
 
18
+ # Import timeout parser (deferred to avoid early imports)
19
+ def _parse_timeout_arg(timeout_str: str) -> float:
20
+ """Parse timeout argument with human-readable format support."""
21
+ try:
22
+ from hanzo_mcp.tools.common.timeout_parser import parse_timeout
23
+ return parse_timeout(timeout_str)
24
+ except ImportError:
25
+ # Fallback if parser not available
26
+ try:
27
+ return float(timeout_str)
28
+ except ValueError:
29
+ raise ValueError(f"Invalid timeout format: '{timeout_str}'")
30
+
18
31
 
19
32
  def main() -> None:
20
33
  """Run the CLI for the Hanzo AI server."""
@@ -150,9 +163,37 @@ def main() -> None:
150
163
  _ = parser.add_argument(
151
164
  "--command-timeout",
152
165
  dest="command_timeout",
153
- type=float,
154
- default=120.0,
155
- help="Default timeout for command execution in seconds (default: 120.0)",
166
+ type=str,
167
+ default="120s",
168
+ help="Default timeout for command execution (default: 120s). Supports: 2min, 5m, 120s, 30sec, 1.5h",
169
+ )
170
+
171
+ _ = parser.add_argument(
172
+ "--timeout", "-t",
173
+ dest="tool_timeout",
174
+ type=str,
175
+ help="Default timeout for MCP tool operations (default: 2min). Supports: 2min, 5m, 120s, 30sec, 1.5h",
176
+ )
177
+
178
+ _ = parser.add_argument(
179
+ "--search-timeout",
180
+ dest="search_timeout",
181
+ type=str,
182
+ help="Timeout specifically for search operations. Supports: 2min, 5m, 120s, 30sec, 1.5h",
183
+ )
184
+
185
+ _ = parser.add_argument(
186
+ "--find-timeout",
187
+ dest="find_timeout",
188
+ type=str,
189
+ help="Timeout specifically for find operations. Supports: 2min, 5m, 120s, 30sec, 1.5h",
190
+ )
191
+
192
+ _ = parser.add_argument(
193
+ "--ast-timeout",
194
+ dest="ast_timeout",
195
+ type=str,
196
+ help="Timeout specifically for AST operations. Supports: 2min, 5m, 120s, 30sec, 1.5h",
156
197
  )
157
198
 
158
199
  _ = parser.add_argument(
@@ -206,6 +247,27 @@ def main() -> None:
206
247
  help="Run in development mode with hot reload",
207
248
  )
208
249
 
250
+ _ = parser.add_argument(
251
+ "--daemon",
252
+ action="store_true",
253
+ help="Run as daemon process for multiple agent connections",
254
+ )
255
+
256
+ _ = parser.add_argument(
257
+ "--socket-path",
258
+ dest="socket_path",
259
+ default="/tmp/hanzo-mcp.sock",
260
+ help="Unix socket path for daemon mode (default: /tmp/hanzo-mcp.sock)",
261
+ )
262
+
263
+ _ = parser.add_argument(
264
+ "--max-connections",
265
+ dest="max_connections",
266
+ type=int,
267
+ default=100,
268
+ help="Maximum number of concurrent connections in daemon mode (default: 100)",
269
+ )
270
+
209
271
  _ = parser.add_argument(
210
272
  "--install",
211
273
  action="store_true",
@@ -222,10 +284,33 @@ def main() -> None:
222
284
  pass
223
285
  sys.stdout = original_stdout
224
286
 
287
+ # Parse timeout arguments with human-readable format support
288
+ command_timeout = _parse_timeout_arg(str(args.command_timeout))
289
+
290
+ # Set timeout environment variables from CLI args
291
+ if hasattr(args, 'tool_timeout') and args.tool_timeout:
292
+ tool_timeout = _parse_timeout_arg(args.tool_timeout)
293
+ os.environ["HANZO_MCP_TOOL_TIMEOUT"] = str(tool_timeout)
294
+
295
+ if hasattr(args, 'search_timeout') and args.search_timeout:
296
+ search_timeout = _parse_timeout_arg(args.search_timeout)
297
+ os.environ["HANZO_MCP_SEARCH_TIMEOUT"] = str(search_timeout)
298
+
299
+ if hasattr(args, 'find_timeout') and args.find_timeout:
300
+ find_timeout = _parse_timeout_arg(args.find_timeout)
301
+ os.environ["HANZO_MCP_FIND_TIMEOUT"] = str(find_timeout)
302
+
303
+ if hasattr(args, 'ast_timeout') and args.ast_timeout:
304
+ ast_timeout = _parse_timeout_arg(args.ast_timeout)
305
+ os.environ["HANZO_MCP_AST_TIMEOUT"] = str(ast_timeout)
306
+
225
307
  # Cast args attributes to appropriate types to avoid 'Any' warnings
226
308
  name: str = cast(str, args.name)
227
309
  install: bool = cast(bool, args.install)
228
310
  dev: bool = cast(bool, args.dev)
311
+ daemon: bool = cast(bool, args.daemon)
312
+ socket_path: str = cast(str, args.socket_path)
313
+ max_connections: int = cast(int, args.max_connections)
229
314
  transport: str = cast(str, args.transport)
230
315
  agent_model: str | None = cast(str | None, args.agent_model)
231
316
  agent_max_tokens: int | None = cast(int | None, args.agent_max_tokens)
@@ -234,7 +319,6 @@ def main() -> None:
234
319
  agent_max_iterations: int = cast(int, args.agent_max_iterations)
235
320
  agent_max_tool_uses: int = cast(int, args.agent_max_tool_uses)
236
321
  enable_agent_tool: bool = cast(bool, args.enable_agent_tool)
237
- command_timeout: float = cast(float, args.command_timeout)
238
322
  disable_write_tools: bool = cast(bool, args.disable_write_tools)
239
323
  disable_search_tools: bool = cast(bool, args.disable_search_tools)
240
324
  host: str = cast(str, args.host)
@@ -285,6 +369,26 @@ def main() -> None:
285
369
  if not allowed_paths:
286
370
  allowed_paths = [os.path.expanduser("~")]
287
371
 
372
+ # Set daemon mode environment variables
373
+ if daemon:
374
+ os.environ["HANZO_MCP_DAEMON"] = "true"
375
+ os.environ["HANZO_MCP_SOCKET_PATH"] = socket_path
376
+ os.environ["HANZO_MCP_MAX_CONNECTIONS"] = str(max_connections)
377
+
378
+ if transport != "stdio":
379
+ logger.info(f"Starting Hanzo MCP daemon on {socket_path}")
380
+ logger.info(f"Max connections: {max_connections}")
381
+
382
+ # Ensure only one daemon runs per socket
383
+ try:
384
+ import fcntl
385
+ lock_file = f"{socket_path}.lock"
386
+ with open(lock_file, 'w') as f:
387
+ fcntl.flock(f.fileno(), fcntl.LOCK_EX | fcntl.LOCK_NB)
388
+ except (ImportError, IOError):
389
+ # Fallback for systems without fcntl or if lock fails
390
+ pass
391
+
288
392
  # Run in dev mode if requested
289
393
  if dev:
290
394
  from hanzo_mcp.dev_server import DevServer
hanzo_mcp/server.py CHANGED
@@ -3,6 +3,7 @@
3
3
  import os
4
4
  import atexit
5
5
  import signal
6
+ import secrets
6
7
  import logging
7
8
  import warnings
8
9
  import threading
@@ -53,6 +54,7 @@ class HanzoMCPServer:
53
54
  port: int = 8888,
54
55
  enabled_tools: dict[str, bool] | None = None,
55
56
  disabled_tools: list[str] | None = None,
57
+ auth_token: str | None = None,
56
58
  ):
57
59
  """Initialize the Hanzo AI server.
58
60
 
@@ -80,6 +82,15 @@ class HanzoMCPServer:
80
82
  # Use enhanced server for automatic context normalization
81
83
  self.mcp = mcp_instance if mcp_instance is not None else EnhancedFastMCP(name)
82
84
 
85
+ # Initialize authentication token
86
+ self.auth_token = auth_token or os.environ.get('HANZO_MCP_TOKEN')
87
+ if not self.auth_token:
88
+ # Generate a secure random token if none provided
89
+ self.auth_token = secrets.token_urlsafe(32)
90
+ logger = logging.getLogger(__name__)
91
+ logger.warning(f"No auth token provided. Generated token: {self.auth_token}")
92
+ logger.warning("Set HANZO_MCP_TOKEN environment variable for persistent auth")
93
+
83
94
  # Initialize permissions and command executor
84
95
  self.permission_manager = PermissionManager()
85
96
 
@@ -226,22 +226,9 @@ def register_all_tools(
226
226
  for tool in jupyter_tools:
227
227
  all_tools[tool.name] = tool
228
228
 
229
- # Register shell tools with individual configuration
230
- shell_enabled = {
231
- "run": is_tool_enabled("run", True),
232
- "shell": is_tool_enabled("shell", True),
233
- "bash": is_tool_enabled("bash", True),
234
- "zsh": is_tool_enabled("zsh", True),
235
- "npx": is_tool_enabled("npx", True),
236
- "uvx": is_tool_enabled("uvx", True),
237
- "process": is_tool_enabled("process", True),
238
- "open": is_tool_enabled("open", True),
239
- # Legacy name support
240
- "run_command": is_tool_enabled("run_command", True),
241
- }
242
-
243
- if any(shell_enabled.values()):
244
- shell_tools = register_shell_tools(mcp_server, permission_manager, enabled_tools=shell_enabled)
229
+ # Register shell tools if enabled
230
+ if is_tool_enabled("run_command", True):
231
+ shell_tools = register_shell_tools(mcp_server, permission_manager)
245
232
  for tool in shell_tools:
246
233
  all_tools[tool.name] = tool
247
234
 
@@ -6,6 +6,8 @@ enabling concurrent execution of multiple operations and specialized processing.
6
6
 
7
7
  from mcp.server import FastMCP
8
8
 
9
+ from hanzo_mcp.tools.common.auto_timeout import auto_timeout
10
+
9
11
  from hanzo_mcp.tools.common.base import BaseTool, ToolRegistry
10
12
 
11
13
  # Import unified CLI tools (single source of truth)
@@ -78,6 +80,9 @@ def register_agent_tools(
78
80
  def __init__(self, agent_tool: AgentTool):
79
81
  self._agent = agent_tool
80
82
 
83
+ @auto_timeout("__init__")
84
+
85
+
81
86
  async def call(self, ctx, **params): # type: ignore[override]
82
87
  # Default to 5 agents unless explicitly provided
83
88
  params = dict(params)
@@ -30,6 +30,8 @@ from pydantic import Field
30
30
  from openai.types.chat import ChatCompletionMessageParam
31
31
  from mcp.server.fastmcp import Context as MCPContext
32
32
 
33
+ from hanzo_mcp.tools.common.auto_timeout import auto_timeout
34
+
33
35
  from hanzo_mcp.tools.jupyter import get_read_only_jupyter_tools
34
36
  from hanzo_mcp.tools.filesystem import get_read_only_filesystem_tools
35
37
  from hanzo_mcp.tools.common.base import BaseTool
@@ -212,6 +214,9 @@ Modes:
212
214
  - rpc: Long-running agent for multiple calls (A2A support)"""
213
215
 
214
216
  @override
217
+ @auto_timeout("agent")
218
+
219
+
215
220
  async def call(
216
221
  self,
217
222
  ctx: MCPContext,
@@ -20,6 +20,8 @@ from typing import (
20
20
  from mcp.server import FastMCP
21
21
  from mcp.server.fastmcp import Context as MCPContext
22
22
 
23
+ from hanzo_mcp.tools.common.auto_timeout import auto_timeout
24
+
23
25
  # Import hanzo-agents SDK
24
26
  try:
25
27
  from hanzo_agents import (
@@ -103,23 +105,6 @@ from hanzo_mcp.tools.agent.clarification_protocol import (
103
105
 
104
106
 
105
107
  class AgentToolParams(TypedDict, total=False):
106
-
107
- def __init__(self, *args, mode: str = "single", **kwargs):
108
- """Initialize agent tool with mode support.
109
-
110
- Modes:
111
- - single: Single agent execution (default)
112
- - network: Network of agents (formerly swarm)
113
- - dispatch: Dispatch to best agent (legacy compatibility)
114
- """
115
- super().__init__(*args, **kwargs)
116
- self.mode = mode
117
-
118
- # Handle legacy names
119
- if self.name == "dispatch_agent":
120
- self.mode = "dispatch"
121
- elif self.name in ["network", "swarm"]:
122
- self.mode = "network"
123
108
  """Parameters for the AgentTool."""
124
109
 
125
110
  prompts: str | list[str]
@@ -355,6 +340,7 @@ Usage notes:
355
340
  self.available_tools.append(BatchTool({t.name: t for t in self.available_tools}))
356
341
 
357
342
  @override
343
+ @auto_timeout("agent")
358
344
  async def call(
359
345
  self,
360
346
  ctx: MCPContext,