Skip to main content
Glama

objc_query_instances

Read-only

Query Objective-C app instances to discover class instances or read object IDs, then inspect bounded ivars without getters. Select field names to reduce tokens; sensitive fields are redacted.

Instructions

One-call allowlisted app instance values: reuse/attach, discover class instances or read mixed-class object_ids, then read bounded ivars without arbitrary getters/descriptions. Select field_names to minimize tokens; sensitive fields are redacted. Default first 8 ivars, 20 instances, 10 per page. snapshot_id pages never rescan the heap. Foundation strings/numbers/collections are bounded; other objects return leased references. ObjC-visible classes only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
bundle_idYes
device_idYes
max_depthNo
max_itemsNo
class_nameNo
max_fieldsNo
object_idsNo
field_namesNo
snapshot_idNo
max_instancesNo
max_string_lengthNo
include_subclassesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
dataNo
errorNo
elapsed_msYes
request_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already declare a safe read, yet the description still adds substantial behavior: sensitive fields are redacted, snapshot_id pages never rescan the heap, Foundation strings/numbers/collections are bounded while other objects return leased references, and only ObjC-visible classes are reachable. That is exactly the extra context annotations cannot convey.

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?

The action is front-loaded and nearly every clause carries payload (redaction, defaults, paging, bounding). It is compressed to the point of being telegraphic — 'reuse/attach' and the run-on first sentence require re-reading — but there is little dead weight.

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?

For a 14-parameter tool with strong annotations and an output schema (so return values need no explanation), the description covers the important behavioral contours: redaction, bounding, snapshot paging, and per-call caps. The remaining gap is the discovery-vs-object_ids mode switch and the subclass/depth knobs, which an agent would have to guess at.

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 description coverage is 0% across 14 parameters, so the description must compensate and it only partly does: it explains field_names token trade-offs, snapshot_id paging, and the defaults behind max_fields (8 ivars), max_instances (20), and limit (10 per page). It leaves include_subclasses, max_depth, max_items, max_string_length, offset, and the object_ids/class_name mode interaction unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific resource (allowlisted app ObjC instances) and the concrete actions: discover class instances, read mixed-class object_ids, then read bounded ivars. It distinguishes itself from getter/description-based approaches, though it never names a sibling tool such as objc_dump or debug_inspect, so an agent must infer the boundary itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the 'discover class instances or read mixed-class object_ids' phrasing hints at two entry modes, and 'select field_names to minimize tokens' is practical guidance. But there is no explicit when-to-use-this-vs-objc_dump/debug_inspect rule and no exclusion conditions, leaving the agent to infer routing.

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