Skip to main content
Glama

Trace Dylib Resolution

trace_dylib_resolution
Idempotent

Trace how dyld resolves Mach-O dylib loads for an executable or app bundle, expanding @executable_path, @loader_path, and @rpath to report candidate outcomes and unresolved required loads.

Instructions

Trace how dyld would resolve each Mach-O dylib load for the active Mach-O, or for every executable in the active .app bundle (the main app, XPC services, extensions, login items, helpers). Expands @executable_path, @loader_path, and @rpath through each process's LC_RPATH stack in dependents-first load order, and reports every candidate path with its outcome, the resolved image and digest, weak, re-export, and upward flags, and derived findings such as unresolved required loads or absent earlier @rpath candidates. Pure header parsing: nothing is executed, and absolute or system paths outside the analyzed root stay undetermined. Select roots or one architecture to narrow large bundles.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "roots": [
        "Contents/MacOS/App"
      ],
      "architecture": "arm64"
    },
    "name": "trace_dylib_resolution"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootsNo
architectureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

The description adds substantial behavior beyond the annotations: it explains dependents-first LC_RPATH expansion, what the report contains (candidate paths, resolved image and digest, weak/re-export/upward flags, derived findings), and an explicit limitation that absolute or system paths outside the analyzed root stay undetermined. The 'pure header parsing, nothing is executed' statement clarifies that the target is never run, without contradicting destructiveHint=false.

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?

Three sentences, each doing work: what is traced, what is reported and with what limitations, and how to narrow scope. The middle sentence is dense but front-loaded with the key facts; nothing is redundant filler.

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?

There is no output schema, and the description compensates by enumerating the returned fields and derived findings, plus stating the analysis boundary. For a two-optional-parameter analysis tool this is close to complete, with the only shortfall being default behavior for the parameters.

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?

With 0% schema description coverage, the description must carry parameter meaning; it does partially by saying roots select the executables to analyze and architecture narrows large bundles. However, it never explains the relative-path constraint encoded in the roots pattern, nor what the default behavior is when neither optional parameter is supplied, so meaningful gaps remain.

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 names a specific verb and resource: 'trace how dyld would resolve each Mach-O dylib load', and scopes it to either the active Mach-O or every executable in the active .app bundle, enumerating the members (main app, XPC services, extensions, login items, helpers). That is enough to distinguish it from verify_unknown_resolution and the other trace_* siblings without opening the schema.

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?

It gives clear context for when the tool applies (the active Mach-O or the active .app bundle) and a practical narrowing instruction: 'Select roots or one architecture to narrow large bundles.' It does not name an alternative tool or state when-not to use it, so it stops short of full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools