definition property

  1. @override
Tool get definition
override

Implementation

@override
Tool get definition => Tool(
      name: 'get_scene',
      description:
          'Read the screen as a compact scene, one node per line: `<marker> <role> <glintId> [label]`. Markers: `*` tappable, `>` typeable, `<>` scrollable, `-` static. Pass the glintId to tap/type/scroll. An open dialog comes first under `--- dialog ---`, the blocked screen after it. Long lists fold to the first row plus a digest naming the rest by label and #id. glintId: only that node\'s subtree; depth caps the levels below it. structuredContent: hasOverlay, overlayKind, keyboardVisible, route.name, state (loaded/loading/error, or device/native). Warnings name each app error since the last read (summary and file:line; format:json adds data.renderErrors) and an emptyViewport when a scrollable holds built children but painted none, which tells a crashed screen from an empty one.',
      inputSchema: ObjectSchema(
        properties: {
          'format': Schema.string(
            description: 'text (default). Leave unset.',
          ),
          'glintId': Schema.string(
            description: 'Only this node and its descendants. Use to drill into one '
                'container or list instead of re-reading the whole screen.',
          ),
          'depth': Schema.int(
            description: 'With glintId: levels below it to include (0 = the node '
                'only). Default: all, up to the renderer\'s cap.',
          ),
        },
      ),
    );