Skip to main content
Glama

profiler-stack-query

Query native profiler trace data for iterative investigation of hangs, thread CPU usage, and memory leaks after initial analysis.

Instructions

Query native profiler trace data for iterative investigation of native performance. Requires native-profiler-stop → native-profiler-analyze to have been called first. Modes:

  • hang_stacks: Full CPU context during a specific hang (by hang_index).

  • function_callers: Who calls a specific native function and what it calls.

  • thread_breakdown: CPU time split by thread, optionally filtered.

  • leak_stacks: Memory leak details (iOS only), optionally filtered by object_type. Use when drilling into native hang stacks, thread CPU breakdown, or memory leaks after native-profiler-analyze. Returns a markdown report with native call stacks, thread weights, or leak details for the selected mode. Fails if native-profiler-analyze has not been run or no parsed trace data is in memory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesQuery mode: hang_stacks (full CPU context during a hang), function_callers (who calls a native function), thread_breakdown (CPU split by thread), leak_stacks (leak details by object type)
top_nNoMax results to return (default 15)
threadNoThread filter. thread_breakdown: case-insensitive substring match. function_callers: exact raw thread name (e.g. ".blueskyweb.app"), or "main" for the UI thread; omit to search ALL threads (each result is tagged with its thread). Run thread_breakdown first to see the exact raw names.
device_idYesiOS Simulator UDID or Android serial.
hang_indexNo0-based index into the hang list for hang_stacks mode
object_typeNoObject type filter for leak_stacks mode
function_nameNoFunction name for function_callers mode
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden. It discloses prerequisites, failure conditions (if analyze not run or no trace data), and return type (markdown report). It does not mention idempotency or permissions, but covers key aspects adequately.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single paragraph but logically structured: purpose, prerequisites, modes, usage, return, failure. It is concise and front-loaded with the main action. Minor improvement could be bullet-pointing modes for readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description explains the return type (markdown report with call stacks, weights, or leak details). It covers prerequisites and failure conditions. It is complete for the tool's complexity, though more detail on output format could be added.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all parameters. The description adds value beyond the schema, e.g., for the 'thread' parameter it advises running thread_breakdown first to see exact names. Each mode is explained in detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'Query native profiler trace data' for iterative investigation, with specific modes (hang_stacks, function_callers, etc.). It distinguishes itself from sibling tools like native-profiler-analyze by focusing on post-analysis queries.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states prerequisite calls (native-profiler-stop → native-profiler-analyze) and when to use ('drilling into native hang stacks...'). Provides good context for usage, though it could be more explicit about scenarios where the tool should not be used.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/software-mansion/argent'

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