Skip to main content
Glama

profiler-gc-alloc

Identify the top functions causing garbage collection allocations in a Unity profiler frame, including full call paths, to diagnose and eliminate frame hitches.

Instructions

Returns the top N functions with the highest GC (garbage collection) allocations in a profiler frame, including their call paths. GC allocations are a major source of frame hitches in Unity — use this to find and eliminate them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frameIndexNoFrame index to analyze. Use -1 for the latest available frame. Default: -1-1
threadIndexNoThread index. 0 = Main Thread. Default: 00
topNNoNumber of top entries to return. Default: 2020
minBytesNoMinimum GC allocation bytes to include. Filters out trivial allocations. Default: 00
maxDepthNoMaximum tree depth to scan. Default: 1515
Behavior3/5

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

Without annotations, the description carries full behavioral disclosure burden. It accurately indicates this is a read-only analytical operation (returns data, no mutations mentioned), but does not specify behavior when frame data is missing, limits on depth/topN, or any caching or freshness semantics. Adequate but not thorough.

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?

Three sentences with no filler. The first sentence states the function clearly, the second adds detail (call paths), the third provides motivational context. Every sentence earns its place, and key information is front-loaded.

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?

The tool has 5 parameters but no output schema or annotations. The description explains the output (top functions with call paths) but doesn't specify the structure (e.g., list of objects, fields like function name, bytes, call path). For a list-returning tool, this is nearly complete; only the output format is missing but not critical given the name implies a list.

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?

The input schema already describes all 5 parameters with defaults and brief descriptions (100% coverage). The description does not add new parameter meaning beyond what the schema provides—it only summarizes the tool's output. Baseline 3 is appropriate as the description does not detract but adds no extra parameter context.

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 that the tool returns top N functions with highest GC allocations and their call paths, specifying the resource (profiler frame) and the specific metric (GC allocations). It distinguishes from sibling profiler tools (e.g., profiler-frame-hierarchy, profiler-hotpath) by focusing on garbage collection, a specific performance concern.

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 context on when to use the tool ('GC allocations are a major source of frame hitches in Unity — use this to find and eliminate them'), but does not explicitly state when not to use it or mention alternative tools for other performance issues. The context implies its niche, but lacks explicit guidance on exclusions.

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