Tools Module#

class isek.tools.toolkit.SimpleFunction(name: str, entrypoint: Callable, description: str | None = None, parameters: Dict[str, Any] | None = None)[source]#

Bases: object

Ultra-simplified function wrapper.

description: str | None = None#
entrypoint: Callable#
execute(**kwargs) Any[source]#

Execute the function with given arguments.

name: str#
parameters: Dict[str, Any] | None = None#
to_dict() Dict[str, Any][source]#

Convert function to dictionary.

class isek.tools.toolkit.Toolkit(name: str = 'toolkit', tools: List[Callable] | None = None, instructions: str | None = None, auto_register: bool = True, debug: bool = False)[source]#

Bases: object

Ultra-simplified Toolkit class with minimal features.

execute_function(name: str, **kwargs) Any[source]#

Execute a function by name.

get_function(name: str) SimpleFunction | None[source]#

Get a function by name.

list_functions() List[str][source]#

List all registered function names.

register(function: Callable, name: str | None = None) SimpleFunction[source]#

Register a function with the toolkit.

Parameters:
  • function -- The callable to register

  • name -- Optional custom name for the function

Returns:

The registered SimpleFunction

class isek.tools.fastmcp_toolkit.FastMCPToolkit(server_source: str, name: str = 'fastmcp', timeout: float = 30.0, auto_register: bool = True, debug: bool = False, auth_token: str | None = None)[source]#

Bases: Toolkit

FastMCP-based toolkit for MCP server integration. Provides simplified access to MCP tools with automatic discovery and registration.

call_tool(tool_name: str, **kwargs) Any[source]#

Call a specific MCP tool.

Parameters:
  • tool_name -- Name of the tool to call

  • **kwargs -- Arguments to pass to the tool

Returns:

Tool execution result

health_check() bool[source]#

Check if MCP connection is healthy.

Returns:

True if connection is working, False otherwise

list_available_tools() List[str][source]#

Get list of available MCP tools.

Returns:

List of tool names

isek.tools.fastmcp_toolkit.create_fastmcp_toolkit(server_source: str, auth_token: str | None = None, debug: bool = False) FastMCPToolkit[source]#

Create a FastMCP toolkit instance.

isek.tools.calculator.add_numbers(a: int, b: int) int[source]#

Add two numbers together.

isek.tools.calculator.divide_numbers(a: int, b: int) float[source]#

Divide a by b.

isek.tools.calculator.multiply_numbers(a: int, b: int) int[source]#

Multiply two numbers together.