Skip to main content

ZOOM_TOOL

Constant ZOOM_TOOL 

Source
pub(crate) const ZOOM_TOOL: &str = r#"{
  "name": "Zoom",
  "description": "Read and set zoom by value: a pane's, and the chrome's (the title bar, status bar and panels of your window). Every call takes an action. get: the zoom of every pane in your tab and of your window's chrome, each as a number (1.0 is 100%) with its min, max and step; scope pane (with block) reads one pane, scope window the chrome only. A pane whose view has no pane zoom says supported: false. set: target pane (block, default your own pane) or chrome, with value (0.5 to 2.0, or a string like \"83%\"); a value out of range is refused, not clamped. reset: back to 100% for target pane, chrome, or all (every pane in your tab; chrome: true adds the chrome). Every set and reset answers with an undo_token; undo with that token puts back what you changed, except what the person changed since (it lives 60 seconds). The person is told in the window, with who changed what and an Undo. You may change only panes in the tab that holds your own pane and your own window; another tab or window is refused with not_in_your_tab. A change is refused with person_prompt_showing while an approval or question for the person is open, and over 30 changes a minute with rate_limited. Nothing here moves focus. fit: the largest zoom at which a pane's content is not cut off (block, blocks or \"all\" for every pane of your tab); it never enlarges a pane unless you pass max, refuses with too_narrow below 50% or when the smallest text would go under min_text_px (default 8), and apply: false measures and changes nothing. check: read-only, which text is cut off (with its label) and which columns are out of view, and the smallest text, for the panes you name or all of them; ok is true only when nothing is cut. Order for a screen: set the chrome, fit the panes, then check. A terminal, agent, editor, browser or log pane reflows or scrolls by design and always fits. A pane in another tab, or one not on screen, is refused. A browser pane is zoomed with Browser (action zoom). host: the same calls on another machine you are trusted by (a LAN peer or another channel on this host), as the agent you are: get first, and it names the window the person used last and its showing tab; every set, fit, reset, check and undo there must carry that window and tab (window_and_tab_required, or tab_changed once the person has moved on), and names a block from that get. The person there sees your name and Undo, may have remote operations off, and a remote caller may make 10 changes a minute.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "action": { "type": "string", "enum": ["get", "set", "reset", "undo", "fit", "check"], "description": "What to do" },
      "scope":  { "type": "string", "enum": ["tab", "pane", "window"], "description": "get: all panes of your tab and the chrome (default tab), one pane (with block), or the chrome only" },
      "target": { "type": "string", "enum": ["pane", "chrome", "all"], "description": "set: pane or chrome. reset: pane, chrome or all" },
      "block":  { "type": "string", "description": "A pane in your tab (its block id from get or Pane layout). set and reset with target pane: default your own pane" },
      "value":  { "type": ["number", "string"], "description": "set: the zoom, 0.5 to 2.0 (1.0 is 100%), or a string like \"83%\"" },
      "chrome": { "type": "boolean", "description": "reset with target all: also reset the chrome" },
      "token":  { "type": "string", "description": "undo: the undo_token a set or reset answered with" },
      "blocks": { "type": "array", "items": { "type": "string" }, "description": "fit, check: several panes of your tab by block id" },
      "max":    { "type": "number", "description": "fit: the most to zoom a pane to (default: its zoom now, so fit never enlarges)" },
      "min_text_px": { "type": "number", "description": "fit, check: the smallest effective text size in CSS pixels (default 8)" },
      "axis":   { "type": "string", "enum": ["x", "y", "both"], "description": "fit, check: which overflow counts (default x, sideways; y adds rows below the bottom of a scroller)" },
      "apply":  { "type": "boolean", "description": "fit: false only measures (default true)" },
      "host":   { "type": "string", "description": "Another machine, by the name Agents list shows (name[/channel[/install]]); omitted: this instance" },
      "window": { "type": "string", "description": "With host, on every call but get: the window id a get of that machine named (its window.id)" },
      "tab":    { "type": "string", "description": "With host, on every call but get: the tab id a get of that machine named (its tab.id)" },
      "reason": { "type": "string", "description": "With host: why, shown to the person there" }
    },
    "required": ["action"]
  }
}"#;
Expand description

Zoom: read and set the zoom of the panes in the agent’s own tab and of its own window’s chrome (docs/specs/SPEC_MUXAPI_ZOOM_2026_11_24.md). Short: every agent is shown it.