data_juicer.tools.DJ_mcp_granular_ops module

data_juicer.tools.DJ_mcp_granular_ops.process_parameter(name: str, param: Parameter) Parameter[源代码]

Processes a function parameter: - Converts jsonargparse.typing.ClosedUnitInterval to a local equivalent annotation.

data_juicer.tools.DJ_mcp_granular_ops.create_operator_function(op, mcp)[源代码]

Creates a callable function for a Data-Juicer operator class.

This function dynamically creates a function that can be registered as an MCP tool, with proper signature and documentation based on the operator's __init__ method.

data_juicer.tools.DJ_mcp_granular_ops.create_mcp_server(port: str = '8000')[源代码]

Creates the FastMCP server and registers the tools.

参数:

port (str, optional) -- Port number. Defaults to "8000".