Skip to main content
Glama

watch_method

Monitor Java method calls in real-time by tracking execution parameters, return values, and invocation frequency for debugging and performance analysis.

Instructions

监控方法的调用情况

Args: pid (str): 进程ID,使用字符串形式(如:"12345") class_pattern (str): 类名表达式匹配 method_pattern (str): 方法名表达式匹配 watch_params (bool): 是否监控方法参数 watch_return (bool): 是否监控方法返回值 condition (Optional[str]): 条件表达式 max_times (str): 最大监控次数,使用字符串形式(如:"10") Returns: Dict: 包含方法监控信息的字典(暂未实现)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNo
class_patternNo
method_patternNo
watch_paramsNo
watch_returnNo
conditionNo
max_timesNo10

Implementation Reference

  • The watch_method tool is registered via @self.mcp.tool() decorator and implemented as a handler function. The function signature and docstring define the input schema. Currently a stub implementation returning 'not implemented' error.
    @self.mcp.tool() def watch_method(pid: str = "", class_pattern: str = "", method_pattern: str = "", watch_params: bool = True, watch_return: bool = True, condition: Optional[str] = None, max_times: str = "10") -> Dict: """监控方法的调用情况 Args: pid (str): 进程ID,使用字符串形式(如:"12345") class_pattern (str): 类名表达式匹配 method_pattern (str): 方法名表达式匹配 watch_params (bool): 是否监控方法参数 watch_return (bool): 是否监控方法返回值 condition (Optional[str]): 条件表达式 max_times (str): 最大监控次数,使用字符串形式(如:"10") Returns: Dict: 包含方法监控信息的字典(暂未实现) """ return {"success": False, "error": "未实现/不支持"}

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/xzq-xu/jvm-mcp-server'

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