Skip to main content
Glama

get_stacks

Analyze CUDA/driver call stacks to identify code paths causing operations. Returns frequent stacks with symbols, source files, and timing for performance troubleshooting.

Instructions

Get resolved call stacks for CUDA/driver operations. Returns top stacks by frequency with symbol names, source files, and timing stats. One call answers 'what code path caused this operation?' For older DBs without resolved symbols, falls back to raw IPs (hex addresses).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNoSource filter: 1=CUDA, 3=HOST, 4=DRIVER
opNoOperation name (e.g. cudaMalloc, cuLaunchKernel)
pidNoProcess ID filter
sinceNoTime window (e.g. 5m, 1h). Default: all data
limitNoMax stacks returned (default 10)
tscNotelegraphic compression (default: true)

Implementation Reference

  • The `get_stacks` method in `MCPClient` is a handler that acts as an MCP client-side wrapper to invoke the `get_stacks` MCP tool.
    def get_stacks(self, since: str = "0", op: str = "") -> dict:
        """Get resolved call stacks (120s timeout — stack aggregation can be slow)."""
        args = {"since": since, "tsc": False}
        if op:
            args["op"] = op
        return self.call("get_stacks", args, timeout=120)

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/ingero-io/ingero'

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