catpane-ios-console

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

CatPane iOS console MCP

CatPane iOS控制台MCP

Use this skill when you need iOS logs from CatPane's MCP runtime. It is for live debugging, reproductions, and incremental monitoring of simulator or physical-device output.
当你需要从CatPane的MCP运行时获取iOS日志时使用此技能。它适用于模拟器或物理设备输出的实时调试、问题复现以及增量监控。

Use it when

适用场景

  • you need to discover whether a useful capture already exists
  • you need to start a scoped capture for an iOS simulator or physical device
  • you need focused log queries instead of dumping raw console output
  • you need to poll for new high-signal logs during an investigation
  • 你需要确认是否已存在可用的捕获任务
  • 你需要为iOS模拟器或物理设备启动一个范围化的捕获任务
  • 你需要针对性的日志查询,而非导出原始控制台输出
  • 你需要在排查问题期间轮询获取新的高价值日志

Tool surface

工具功能

  • get_status
    — inspect captures and optionally include all currently available capture devices
  • list_devices
    — list all currently available capture devices; focus on iOS entries
  • start_capture
    — start buffering console logs for an iOS capture target
  • get_logs
    — read buffered logs with filters and cursor pagination
  • clear_logs
    — reset the buffered window for a capture without stopping it
  • stop_capture
    — stop and remove a capture
  • get_crashes
    — detect structured crash reports from buffered logs
  • create_watch
    — pin high-signal matches so they survive main-buffer overflow
  • list_watches
    — inspect active pinned watches
  • get_watch_matches
    — poll retained watch matches incrementally
Supporting docs:
  • tools/status.md
    get_status
  • tools/list-devices.md
    list_devices
  • tools/capture.md
    start_capture
    ,
    clear_logs
    ,
    stop_capture
  • tools/get-logs.md
    get_logs
  • get_status
    — 检查捕获任务状态,可选择包含所有当前可用的捕获设备
  • list_devices
    — 列出所有当前可用的捕获设备;重点关注iOS条目
  • start_capture
    — 为iOS捕获目标启动控制台日志缓冲
  • get_logs
    — 通过过滤器和游标分页读取缓冲日志
  • clear_logs
    — 在不停止捕获的情况下重置缓冲窗口
  • stop_capture
    — 停止并移除捕获任务
  • get_crashes
    — 从缓冲日志中检测结构化崩溃报告
  • create_watch
    — 固定高价值匹配日志,使其不会因主缓冲区溢出而丢失
  • list_watches
    — 查看当前活跃的固定监控任务
  • get_watch_matches
    — 增量轮询保留的监控匹配结果
相关文档:
  • tools/status.md
    get_status
  • tools/list-devices.md
    list_devices
  • tools/capture.md
    start_capture
    ,
    clear_logs
    ,
    stop_capture
  • tools/get-logs.md
    get_logs

Recommended workflow

推荐工作流程

  1. Check runtime state first.
    • Call
      get_status
      with
      {"includeDevices": true}
      .
    • If a suitable capture already exists and is
      running
      , reuse it.
    • If you only need device identifiers,
      list_devices
      is the lighter call.
    • Both calls can include Android devices too, so filter to
      platform: "iOS"
      for this skill.
  2. Start capture only when needed, and scope it early.
    • Call
      start_capture
      with
      device
      when more than one capture target is available.
    • For iOS, prefer
      process
      ,
      text
      , and simulator
      predicate
      scope so irrelevant lines never enter the main buffer.
    • Use
      quiet: true
      on physical iOS captures when you need a lighter default stream.
    • Use
      restart: true
      only when replacing an existing capture on the same target.
  3. Clear logs before a fresh reproduction.
    • Call
      clear_logs
      to reset the main buffer and any retained watch matches.
  4. Create a pinned watch for the important signal.
    • Call
      create_watch
      for the app process, subsystem, or key error text before reproducing.
    • Poll
      get_watch_matches
      during the session; retained matches survive main-buffer overflow.
  5. Check crashes early.
    • Call
      get_crashes
      after reproduction to surface structured crash reports without paging raw logs first.
  6. Query with focused filters.
    • Keep
      get_logs
      pulls small.
    • Start with
      limit
      ,
      minLevel
      , and
      text
      .
    • Use
      process
      ,
      subsystem
      , and
      category
      to narrow results to specific system components.
    • Prefer targeted queries over large unfiltered pulls.
  7. Page with cursors.
    • get_logs
      is cursor-based.
    • Reuse the same
      order
      , pass
      page.nextCursor
      as the next
      cursor
      , and stop when
      page.hasMore
      is false.
  8. Use
    since
    for incremental polling.
    • Keep the last processed timestamp.
    • Pass it back as
      since
      on the next call.
    • since
      is inclusive, so expect one boundary overlap and dedupe by
      seq
      if needed.
  9. Stop capture only when you are done.
    • Use
      stop_capture
      when the capture is no longer needed.
  1. 先检查运行时状态
    • 调用
      get_status
      并传入
      {"includeDevices": true}
    • 如果已有合适的捕获任务处于
      running
      状态,则复用它
    • 若仅需设备标识符,
      list_devices
      是更轻量的调用
    • 这两个调用都会包含Android设备,因此针对此技能需筛选
      platform: "iOS"
  2. 仅在需要时启动捕获,并尽早设置范围
    • 当存在多个捕获目标时,调用
      start_capture
      并指定
      device
    • 对于iOS,优先使用
      process
      text
      和模拟器
      predicate
      来设置范围,避免无关日志进入主缓冲区
    • 在物理iOS设备捕获时,若需要更轻量化的默认流,可使用
      quiet: true
    • 仅在替换同一目标上的现有捕获任务时使用
      restart: true
  3. 在全新复现问题前清除日志
    • 调用
      clear_logs
      重置主缓冲区和所有保留的监控匹配结果
  4. 为重要日志创建固定监控
    • 在复现问题前,调用
      create_watch
      针对应用进程、子系统或关键错误文本设置监控
    • 在会话期间轮询
      get_watch_matches
      ;保留的匹配结果不会因主缓冲区溢出而丢失
  5. 尽早检查崩溃信息
    • 复现问题后调用
      get_crashes
      ,无需先分页查看原始日志即可获取结构化崩溃报告
  6. 使用针对性过滤器进行查询
    • 控制
      get_logs
      的返回数据量
    • 先使用
      limit
      minLevel
      text
      参数
    • 使用
      process
      subsystem
      category
      将结果缩小到特定系统组件
    • 优先使用针对性查询,而非大量无过滤的日志导出
  7. 使用游标进行分页
    • get_logs
      基于游标实现分页
    • 保持相同的
      order
      ,将
      page.nextCursor
      作为下一次调用的
      cursor
      ,当
      page.hasMore
      为false时停止分页
  8. 使用
    since
    进行增量轮询
    • 记录最后处理的时间戳
    • 将其作为
      since
      参数传入下一次调用
    • since
      是包含性的,因此可能会出现一次边界重叠,必要时可通过
      seq
      去重
  9. 仅在完成操作后停止捕获
    • 当不再需要捕获任务时,使用
      stop_capture
      停止它

Query rules

查询规则

  • Always prefer
    captureId
    or
    device
    once more than one capture exists. Unqualified calls only auto-resolve when exactly one capture is registered.
  • get_logs
    reads the main in-memory ring buffer for a capture. Older entries can age out when the buffer reaches capacity.
  • create_watch
    +
    get_watch_matches
    give you a second retained path for relevant lines; use that for long or noisy iOS sessions.
  • cursor
    is exclusive:
    • order: "desc"
      returns older entries with
      seq < cursor
    • order: "asc"
      returns newer entries with
      seq > cursor
  • Use
    page.hasMore
    to decide whether to continue paging.
    page.nextCursor
    is still the correct next anchor.
  • minLevel
    is a threshold, not an exact match. Example:
    warn
    returns
    warn
    ,
    error
    , and
    fatal
    .
  • text
    is a case-insensitive substring filter over process name, subsystem, category, and message.
  • process
    is a case-insensitive substring filter on the originating process name.
  • subsystem
    is a case-insensitive substring filter on the logging subsystem.
  • category
    is a case-insensitive substring filter on the logging category.
  • since
    must use the format:
    MM-DD HH:MM:SS.mmm
  • 当存在多个捕获任务时,始终优先使用
    captureId
    device
    。只有当恰好注册了一个捕获任务时,未指定参数的调用才会自动解析
  • get_logs
    读取捕获任务的主内存环形缓冲区。当缓冲区达到容量时,较旧的条目会被淘汰
  • create_watch
    +
    get_watch_matches
    为相关日志提供了第二条保留路径;在长时间或高噪声的iOS会话中使用此功能
  • cursor
    是排他性的:
    • order: "desc"
      返回
      seq < cursor
      的旧条目
    • order: "asc"
      返回
      seq > cursor
      的新条目
  • 使用
    page.hasMore
    决定是否继续分页。
    page.nextCursor
    仍是正确的下一个锚点
  • minLevel
    是阈值,而非精确匹配。例如:
    warn
    会返回
    warn
    error
    fatal
    级别的日志
  • text
    是对进程名称、子系统、类别和消息的不区分大小写的子字符串过滤器
  • process
    是对源进程名称的不区分大小写的子字符串过滤器
  • subsystem
    是对日志子系统的不区分大小写的子字符串过滤器
  • category
    是对日志类别的不区分大小写的子字符串过滤器
  • since
    必须使用格式:
    MM-DD HH:MM:SS.mmm

Quick start

快速开始

get_status
json
{
  "includeDevices": true
}
start_capture
json
{
  "device": "My iPhone",
  "process": "MyApp",
  "text": "timeout",
  "quiet": true
}
create_watch
json
{
  "device": "My iPhone",
  "name": "app-errors",
  "pattern": "timeout",
  "minLevel": "error",
  "tag": "MyApp"
}
get_watch_matches
json
{
  "device": "My iPhone",
  "watchId": "w1",
  "sinceSeq": 0,
  "limit": 100
}
get_logs
json
{
  "device": "My iPhone",
  "order": "desc",
  "limit": 50,
  "minLevel": "error",
  "process": "MyApp",
  "subsystem": "com.example.app"
}
get_status
json
{
  "includeDevices": true
}
start_capture
json
{
  "device": "My iPhone",
  "process": "MyApp",
  "text": "timeout",
  "quiet": true
}
create_watch
json
{
  "device": "My iPhone",
  "name": "app-errors",
  "pattern": "timeout",
  "minLevel": "error",
  "tag": "MyApp"
}
get_watch_matches
json
{
  "device": "My iPhone",
  "watchId": "w1",
  "sinceSeq": 0,
  "limit": 100
}
get_logs
json
{
  "device": "My iPhone",
  "order": "desc",
  "limit": 50,
  "minLevel": "error",
  "process": "MyApp",
  "subsystem": "com.example.app"
}