samply record
samply_recordRecords CPU profiles to disk in save-only mode by profiling a command, attaching to an existing process ID, or capturing the whole system.
Instructions
Run samply record --save-only and write a profile to disk. Use exactly one recording mode: command, pid, or all=true.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "samply_record"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Profile the whole system with `samply record --all`. | |
| cwd | No | Working directory for the profiled command and output path. | |
| gfx | No | Enable Graphics-related event capture. | |
| pid | No | Existing process ID to attach to. | |
| rateHz | No | Sampling rate in Hz. | |
| command | No | Command and arguments to profile. | |
| extraArgs | No | Additional raw arguments appended to `samply record`. | |
| outputPath | No | Where to save the profile. Relative paths are resolved from cwd. | |
| samplyPath | No | Optional path to a specific samply executable. | |
| durationSec | No | Optional recording duration in seconds. | |
| profileName | No | Custom profile name. | |
| reuseThreads | No | Enable `--reuse-threads`. | |
| mainThreadOnly | No | Only include the main thread when supported by samply. | |
| presymbolicate | No | Generate a `.syms.json` sidecar for better offline symbol resolution. Enabled by default. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| cwd | Yes | ||
| args | Yes | ||
| mode | Yes | ||
| error | Yes | ||
| signal | Yes | ||
| stderr | Yes | ||
| stdout | Yes | ||
| exitCode | Yes | ||
| durationMs | Yes | ||
| samplyPath | Yes | ||
| installHint | Yes | ||
| profilePath | Yes | ||
| sidecarPath | Yes |