Skip to main content
Glama
carloshpdoc

memorydetective

Record a Time Profiler trace

recordTimeProfile

Record a time profile trace of an iOS app on a device or simulator to analyze performance and identify bottlenecks.

Instructions

[mg.trace] Wrapper around xcrun xctrace record. Capture a .trace bundle from a running app on a device or simulator. Required: exactly 1 of deviceId/simulatorId, exactly 1 of attachAppName/attachPid/launchBundleId, an output path ending in .trace. Defaults: template = "Time Profiler", durationSec = 90.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
templateNoxctrace template name (e.g. "Time Profiler", "Animation Hitches", "Allocations"). Default "Time Profiler".Time Profiler
deviceIdNoUDID of a physical device. Mutually exclusive with `simulatorId`.
simulatorIdNoUDID of a simulator. Mutually exclusive with `deviceId`. Use `listTraceDevices` to find UDIDs.
attachAppNameNoAttach to a running app by name (e.g. "DemoApp"). Mutually exclusive with `attachPid` and `launchBundleId`.
attachPidNoAttach by PID. Mutually exclusive with `attachAppName` and `launchBundleId`.
launchBundleIdNoLaunch app by bundle id and start recording at launch. Mutually exclusive with `attachAppName` and `attachPid`.
durationSecNoRecording duration in seconds (default 90, max 600).
outputYesAbsolute path where the resulting `.trace` bundle should be written. Must end in `.trace`.
Behavior4/5

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

No annotations provided, so description carries full burden. Describes that it records a trace, specifies default template and duration, and output path constraint. Lacks mention of side effects like file creation or potential wait time, but adequate for a capture 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?

Two sentences with clear structure and front-loaded key information. Every sentence adds value.

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?

Covers all essential aspects: recording purpose, required parameter groups, defaults, and output constraint. No explanation of return value, but file-based output is implied. Good for an agent to invoke correctly.

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%, and description adds mutual exclusivity rules and output path format, which go beyond individual parameter descriptions.

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?

Clearly states it captures a .trace bundle using xcrun xctrace record, specifying it wraps the underlying command. Distinguishes from sibling tools like recordViaInstrumentsApp.

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 lists required parameter combinations (exactly one of deviceId/simulatorId, etc.) and defaults. Not explicit about when not to use, but context with sibling tools makes usage clear.

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