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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. 'Reset' implies a mutation that clears or restores data, but it doesn't disclose behavioral traits such as whether this requires specific permissions, what exactly gets reset (e.g., counters, logs), if it's destructive or reversible, or any rate limits. The description is minimal and lacks critical operational details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single phrase '重置性能统计信息', which is very concise and front-loaded with the core action. There's no wasted text, but it might be overly terse given the lack of additional context. It earns its place by stating the purpose directly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters, an output schema exists, and no annotations are provided, the description is incomplete. It doesn't explain what 'performance statistics' entail, what resetting does (e.g., sets to zero, clears history), or any side effects. The output schema might cover return values, but the description fails to provide enough context for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, but it also doesn't compensate for any gaps since none exist. A baseline of 4 is appropriate as the description doesn't introduce confusion about parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '重置性能统计信息' (Reset performance statistics) states a clear verb ('reset') and resource ('performance statistics'), but it's vague about what exactly gets reset. It doesn't distinguish from sibling tools like 'get_performance_stats', which might retrieve the same statistics. The purpose is understandable but lacks specificity about scope or impact.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing performance stats to exist), exclusions, or related tools like 'get_performance_stats'. The description alone offers no context for usage decisions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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