Skip to main content
Glama
duke0317

Image Processing MCP Server

by duke0317

reset_performance_stats

Reset performance statistics for the Image Processing MCP Server to clear accumulated metrics and restore baseline measurement conditions.

Instructions

重置性能统计信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:808-821 (handler)
    The MCP tool handler for reset_performance_stats, decorated with @mcp.tool(), which calls the utils function and returns JSON response.
    @mcp.tool()
    def reset_performance_stats() -> str:
        """重置性能统计信息"""
        try:
            utils_reset_performance_stats()
            return json.dumps({
                "success": True,
                "message": "性能统计已重置"
            }, ensure_ascii=False, indent=2)
        except Exception as e:
            return json.dumps({
                "success": False,
                "error": f"重置性能统计失败: {str(e)}"
            }, ensure_ascii=False, indent=2)
  • Core helper function that resets the performance monitor, clears image cache, and cleans up resources.
    def reset_performance_stats():
        """重置性能统计"""
        global performance_monitor, image_cache
        performance_monitor = PerformanceMonitor()
        image_cache.clear()
        resource_manager.cleanup_memory()
  • main.py:808-821 (registration)
    The @mcp.tool() decorator registers this function as an MCP tool.
    @mcp.tool()
    def reset_performance_stats() -> str:
        """重置性能统计信息"""
        try:
            utils_reset_performance_stats()
            return json.dumps({
                "success": True,
                "message": "性能统计已重置"
            }, ensure_ascii=False, indent=2)
        except Exception as e:
            return json.dumps({
                "success": False,
                "error": f"重置性能统计失败: {str(e)}"
            }, ensure_ascii=False, indent=2)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/duke0317/ps-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server