Skip to main content
Glama
carloshpdoc

memorydetective

Record a .trace via Instruments.app GUI (macOS 26.x workaround)

recordViaInstrumentsApp

Open Instruments.app to record a performance trace when xcrun xctrace fails on macOS 26.x. Watches directory for saved .trace, then inspects it for memory issues.

Instructions

[mg.build] Open Instruments.app, prompt the user to record + save a .trace, then poll a watchDir for the new bundle and chain into inspectTrace. The macOS 26.x escape hatch: xcrun xctrace record wedges on this OS but Instruments.app GUI still produces valid traces. Returns instructions[] for the user-in-loop step, tracePath when found, plus a chained inspectTrace summary. Times out after timeoutSec (default 600s). v1.16+.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
templateNoThe Instruments template the user should pick after the app launches. Surfaced in the response's instructions array. Default 'Time Profiler'. Common alternatives: 'Allocations', 'Animation Hitches', 'Leaks', 'Energy Log', 'Network Profile'.Time Profiler
watchDirNoDirectory to watch for the saved `.trace` bundle. When omitted, defaults to $MEMORYDETECTIVE_TRACE_ROOT (typically `~/Library/Application Support/memorydetective/traces`). The directory is created if it does not exist.
timeoutSecNoMaximum seconds to wait for the user to save a `.trace` before returning a timeout. Default 600 (10 minutes). Capped at 3600 (1 hour).
preexistingTracesNoAbsolute paths to `.trace` bundles already in `watchDir`. The watcher excludes these so it only matches NEW files. When omitted, the watcher snapshots the directory at start. Optional override for callers who want explicit control.
Behavior3/5

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

The description mentions user-in-loop step, polling, timeout, and chained inspectTrace summary, but lacks details on error handling, side effects (e.g., leftover files), or blocking nature. With no annotations, the description carries full burden and provides adequate but not comprehensive transparency.

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?

Four sentences efficiently cover action, rationale, return values, and timeout. The title provides additional context. Could be slightly more concise (e.g., remove version number), but overall well-structured and 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?

Given the complexity of a tool requiring user interaction, polling, and chaining, the description sufficiently explains the return structure (instructions, tracePath, inspectTrace summary) and timeout. Missing output schema is compensated. No mention of error states or termination beyond timeout.

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 coverage is 100% with detailed descriptions for each parameter. The description adds minimal value beyond schema, only repeating the timeout default and mentioning the chaining behavior. Baseline 3 is appropriate as schema does the heavy lifting.

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's purpose: open Instruments.app, prompt user to record/save a .trace, poll watchDir for new bundle, and chain into inspectTrace. It explicitly distinguishes from sibling recordTimeProfile by framing it as a macOS 26.x workaround for the failing xcrun xctrace record.

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 for when to use (macOS 26.x escape hatch) and chaining into inspectTrace, but does not explicitly state when not to use or name alternatives beyond xcrun xctrace record. Sibling list includes recordTimeProfile, but no comparative guidance.

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/carloshpdoc/memorydetective'

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