Skip to main content
Glama

get_stack_trace_by_method

Trace the call path of specific methods in Java processes by specifying process ID, class/method patterns, and conditions for targeted debugging and performance analysis.

Instructions

获取方法的调用路径

Args: pid: 进程ID class_pattern: 类名表达式匹配 method_pattern: 方法名表达式匹配 condition: 条件表达式,例如:'params[0]<0' 或 '#cost>10' use_regex: 是否开启正则表达式匹配,默认为通配符匹配 max_matches: 指定Class最大匹配数量,默认值为50 max_times: 执行次数限制

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
class_patternYes
conditionNo
max_matchesNo
max_timesNo
method_patternYes
pidYes
use_regexNo

Implementation Reference

  • Stub handler function for the 'get_stack_trace_by_method' tool, decorated with @self.mcp.tool() for automatic registration in the FastMCP server. Currently returns a 'not implemented' response.
    @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 function as an MCP tool.
    @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