Skip to main content

DEPRECATED: Use hanzo-tools instead. This package re-exports from hanzo-tools for backwards compatibility.

Project description

hanzo-tools-core

Core infrastructure for Hanzo MCP tools.

Installation

pip install hanzo-tools-core

Components

BaseTool

Base class for all Hanzo tools.

from hanzo_tools.core import BaseTool

class MyTool(BaseTool):
    name = "my_tool"
    
    @property
    def description(self) -> str:
        return "My custom tool"
    
    async def call(self, ctx, **params) -> str:
        return "result"

ToolRegistry

Manage tool registration and discovery.

from hanzo_tools.core import ToolRegistry

ToolRegistry.register_tools(mcp_server, [MyTool()])

PermissionManager

Access control for file and command operations.

from hanzo_tools.core import PermissionManager

pm = PermissionManager(allowed_paths=["/home/user/project"])
if pm.can_access("/home/user/project/file.py"):
    # proceed

Decorators

from hanzo_tools.core import auto_timeout

@auto_timeout("my_tool")
async def my_function():
    # Auto-backgrounds after timeout
    pass

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hanzo_tools_core-0.3.0.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hanzo_tools_core-0.3.0-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file hanzo_tools_core-0.3.0.tar.gz.

File metadata

  • Download URL: hanzo_tools_core-0.3.0.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for hanzo_tools_core-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7351b37c33cc0bba08fea2c697f832b4fdd1a31336ee4fc946194636ac8341c5
MD5 f25b47aac962ab70cdc58bf855157aae
BLAKE2b-256 c919fe28273c3e6de3872eebb37c76bd873e7fc9e9c290da3316bc1abac1fda2

See more details on using hashes here.

File details

Details for the file hanzo_tools_core-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hanzo_tools_core-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75bba9a3fb6f9203e9bd6c14fff86fdebbd50b0b7b44f6fb663ddfccbba25bf3
MD5 ad5e9b90ccc45844d5952e1ca20b1dfa
BLAKE2b-256 36f2a0bdbc43b160a32dae34eac683779a5aa70d326665b758a4972101fb0b44

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page