Skip to main content
Glama

search_method

Search for Java methods within running JVM processes using pattern matching to inspect class and method information for debugging and analysis.

Instructions

查看类的方法信息

Args: pid (str): 进程ID,使用字符串形式(如:"12345") class_pattern (str): 类名表达式匹配 method_pattern (Optional[str]): 可选的方法名表达式 show_detail (bool): 是否展示每个方法的详细信息 use_regex (bool): 是否开启正则表达式匹配,默认为通配符匹配 classloader_hash (Optional[str]): 指定class的ClassLoader的hashcode classloader_class (Optional[str]): 指定执行表达式的ClassLoader的class name max_matches (str): 匹配类的最大数量,使用字符串形式(如:"100") Returns: Dict: 包含方法信息的字典(暂未实现)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNo
class_patternNo
method_patternNo
show_detailNo
use_regexNo
classloader_hashNo
classloader_classNo
max_matchesNo

Implementation Reference

  • Handler function for the 'search_method' MCP tool. It is currently a stub implementation that returns an error message indicating it is not yet supported/implemented. The function signature and docstring define the expected inputs and outputs.
    @self.mcp.tool() def search_method(pid: str = "", class_pattern: str = "", method_pattern: Optional[str] = None, show_detail: bool = False, use_regex: bool = False, classloader_hash: Optional[str] = None, classloader_class: Optional[str] = None, max_matches: str = "") -> Dict: """查看类的方法信息 Args: pid (str): 进程ID,使用字符串形式(如:"12345") class_pattern (str): 类名表达式匹配 method_pattern (Optional[str]): 可选的方法名表达式 show_detail (bool): 是否展示每个方法的详细信息 use_regex (bool): 是否开启正则表达式匹配,默认为通配符匹配 classloader_hash (Optional[str]): 指定class的ClassLoader的hashcode classloader_class (Optional[str]): 指定执行表达式的ClassLoader的class name max_matches (str): 匹配类的最大数量,使用字符串形式(如:"100") Returns: Dict: 包含方法信息的字典(暂未实现) """ return {"success": False, "error": "未实现/不支持"}
  • The @self.mcp.tool() decorator registers the 'search_method' function as an MCP tool in the FastMCP server.
    @self.mcp.tool()

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