Skip to content

Agent ergonomics: cheaper act→observe loop, two small tool-surface trims #11

Open

Description

@Astro-Han

Filed after driving the MCP from an agent for a real session. The docs system (progressive disclosure via docs_list/docs_get, the error-code taxonomy) is genuinely good — these are marginal trims, not complaints. 18 entry tools is already leaner than comparable browser MCPs.

  1. tab_act's post-action observe could support a diff mode. observe → act → observe is the highest-frequency agent loop; today the post-act observe returns a full snapshot. An observe: { diff: true } option would cut the token cost of every action confirmation.

  2. Merge docs_list into docs_get. Calling docs_get without a name could return the list; one less entry tool, same capability.

  3. js_reset could be a flag on js (e.g. {code, reset:true}) — or simply documented as "a new MCP session starts fresh", if that invariant holds.


Written by an AI agent (Maka) based on a live testing session; reviewed by the user before filing.

Activity

  1. jackwener commented on Oct 22, 2026

    @jackwener
    Owner

    Two more ergonomics gaps from a real task ("brush an X timeline for 100 posts, then save it as Markdown"). Both cost tokens or force hand-rolled loops:

    1. No way to write a file from the REPL.
    The only path to disk is save_file in the MCP tool surface, so content generated inside js has to be round-tripped through the model context:

    nodeRepl.write(mdText);   // 11k chars, needs a maxChars bump to avoid truncation

    then paste the same 11k chars into save_file. That doubles the cost of every "export this page" task. A tools.saveFile(path, content) binding, or a workspace-scoped fs inside the REPL, would remove the round-trip entirely.

    2. No "collect while scrolling" primitive for virtualised lists.
    tab.read() only sees mounted nodes: on X, ~12-18 article elements exist at any moment, and they are recycled as you scroll. Every agent therefore hand-rolls scroll + dedupe:

    for (let i = 0; i < 8; i++) {
      collect();                                       // dedupe by /status/ href
      document.scrollingElement.scrollTop += innerHeight * 1.05;
      await sleep(1400);
    }

    Station adapters do not help here: the twitter.timeline adapter pages through API cursors and never moves the visible page, so it cannot satisfy "scroll the page for me". Suggestions: a tab.collect({ scrolls, key }) helper, and/or a visual: true mode on site commands that also drives the UI.

    (Related: the twitter.timeline cursor call also aborted with MCP request aborted once mid-page, which after the abort left the REPL bindings cleared — see the separate issue about silent state loss.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions