Skip to main content
Glama

profiler-frame-hierarchy

Analyze Unity performance by retrieving detailed profiler call hierarchy trees for specific frames to identify bottlenecks and optimize execution.

Instructions

Retrieves the full profiler call hierarchy tree for a specific frame. Returns function names, total time, self time, call counts, and GC allocations in a tree structure — equivalent to the Unity Profiler Hierarchy view. Use this to analyze detailed per-function performance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frameIndexNoFrame index to analyze. Use -1 for the latest available frame. Default: -1-1
threadIndexNoThread index. 0 = Main Thread, 1 = Render Thread, etc. Default: 00
maxDepthNoMaximum depth of the call tree to return. Use smaller values for overview, larger values for detailed analysis. Default: 55
minTotalMsNoMinimum total time (ms) to include a node. Filters out insignificant calls. Default: 0.10.100000001
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the tool as 'retrieves' (implying read-only, non-destructive) and specifies the return format as a tree structure with performance metrics. However, it lacks details on potential errors (e.g., invalid frame/thread indices), performance implications (e.g., computational cost), or data freshness (e.g., real-time vs. cached data), which are important for a profiling tool.

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

Conciseness5/5

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

The description is appropriately sized and front-loaded, with the first sentence stating the core purpose and return data, and the second sentence providing usage context. Every sentence adds value without redundancy, making it efficient and easy to understand quickly.

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?

Given the tool's complexity (performance profiling with hierarchical data) and no output schema, the description adequately covers the purpose, return format, and usage context. However, it could be more complete by mentioning potential limitations (e.g., data availability based on Unity Profiler state) or example scenarios, which would help an agent use it effectively in varied contexts.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents all four parameters (frameIndex, threadIndex, maxDepth, minTotalMs) with descriptions and defaults. The description does not add any parameter-specific information beyond what the schema provides, such as explaining interactions between parameters or typical use cases for specific values, meeting the baseline score of 3.

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 'retrieves the full profiler call hierarchy tree for a specific frame' with specific details about what data is returned (function names, total time, self time, call counts, GC allocations) and compares it to the Unity Profiler Hierarchy view. It distinguishes itself from sibling tools like 'profiler-gc-alloc' or 'profiler-hotpath' by focusing on hierarchical call tree analysis rather than specific metrics or paths.

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?

The description provides clear context for when to use this tool: 'to analyze detailed per-function performance.' It implies usage for performance profiling scenarios but does not explicitly state when not to use it or name specific alternatives among sibling tools, such as 'profiler-hotpath' for identifying performance bottlenecks or 'profiler-gc-alloc' for garbage collection analysis.

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/butterlatte-zhang/unity-ai-bridge'

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