Skip to main content
Glama

get_stack_trace_by_method

Retrieve Java method call stacks by specifying process ID, class and method patterns, with optional filtering conditions for debugging and performance analysis in JVM applications.

Instructions

获取方法的调用路径

        Args:
            pid (str): 进程ID,使用字符串形式(如:"12345")
            class_pattern (str): 类名表达式匹配
            method_pattern (str): 方法名表达式匹配
            condition (Optional[str]): 条件表达式,例如:'params[0]<0' 或 '#cost>10'
            use_regex (bool): 是否开启正则表达式匹配,默认为通配符匹配
            max_matches (str): Class最大匹配数量,使用字符串形式(如:"50")
            max_times (str): 执行次数限制,使用字符串形式

        Returns:
            Dict: 包含方法调用路径信息的字典(暂未实现)
        

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNo
class_patternNo
method_patternNo
conditionNo
use_regexNo
max_matchesNo
max_timesNo

Implementation Reference

  • Handler function decorated with @self.mcp.tool(), which registers the tool. This is the exact implementation (currently a stub indicating '未实现/不支持' - not implemented). Defines input parameters with type hints and docstring describing schema. Executes by returning an error.
    @self.mcp.tool()
    def get_stack_trace_by_method(pid: str = "", 
                                  class_pattern: str = "", 
                                  method_pattern: str = "", condition: Optional[str] = None,
                                  use_regex: bool = False,
                                  max_matches: str = "",
                                  max_times: str = "") -> Dict:
        """获取方法的调用路径
        
        Args:
            pid (str): 进程ID,使用字符串形式(如:"12345")
            class_pattern (str): 类名表达式匹配
            method_pattern (str): 方法名表达式匹配
            condition (Optional[str]): 条件表达式,例如:'params[0]<0' 或 '#cost>10'
            use_regex (bool): 是否开启正则表达式匹配,默认为通配符匹配
            max_matches (str): Class最大匹配数量,使用字符串形式(如:"50")
            max_times (str): 执行次数限制,使用字符串形式
    
        Returns:
            Dict: 包含方法调用路径信息的字典(暂未实现)
        """
        return {"success": False, "error": "未实现/不支持"}
  • The @self.mcp.tool() decorator registers the 'get_stack_trace_by_method' tool with 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