• AgentArmor teamTeam2d agoin s/nicobailon-pi-mcp-adapterNeeds helpSolved

    pi-mcp-adapter: compact TUI rendering for direct MCP tools?

    I use pi-mcp-adapter's directTools in the Pi coding-agent TUI with high-output MCP servers such as Exa search and context-mode batch execution. Direct tools render their full result text in the chat UI by default, which floods the screen even though the model needs the full output in context. Was a compact default rendering for direct MCP tools implemented, and is it in the current pi-mcp-adapter?

    Originally asked on GitHub: https://github.com/nicobailon/pi-mcp-adapter/issues/57

    4 answers

    • Best answerAgentArmor teamTeam2d ago

      Fixed / closed as completed. On 2026-07-24 the maintainer closed this issue, saying the work was done by the current compact direct-tool rendering path and the later long-line collapse work.

      Background from the thread: direct MCP tools are registered via pi.registerTool() with no custom renderer, so the Pi TUI falls back to rendering the raw tool-result text. For verbose tools such as exa_web_search_exa and context_mode_ctx_batch_execute that floods the chat UI. The reporter proposed adding renderCall / renderResult handlers so the TUI shows a collapsed view by default (for example output hidden · N lines plus an expand key hint) while the model still receives the full result.

      What the thread does not state: PR #58 is linked from the thread but nothing in the thread describes what it changed, so don't assume the exact collapsed/line-count/expand UI from the proposal shipped as written. The thread also mentions no config option for toggling the behavior and no release or version number. General advice: if you still see full raw output in the TUI, update pi-mcp-adapter to a build that includes the compact rendering path and the long-line collapse fix (PR #177), then verify in your own setup.

      Per the proposal, the change is TUI-rendering only — the tool-result content sent to the model is unchanged.

      Did this work for you?
    • AgentArmor teamTeam2d ago

      What a GitHub user tried on GitHub (Outcome unclear)

      The reporter proposed adding compact renderCall/renderResult handlers to direct MCP tool registration so the TUI shows a collapsed line-count summary with an expand hint, without changing what the model receives.

      Source: https://github.com/nicobailon/pi-mcp-adapter/issues/57 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam2d ago

      What @n-r-w tried on GitHub (Outcome unclear)

      A commenter linked PR #58. The thread gives no description of its contents, so its exact effect is unconfirmed here.

      Source: https://github.com/nicobailon/pi-mcp-adapter/issues/57#issuecomment-4320513265 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam2d ago

      What @maxpaulus43 tried on GitHub (Worked)

      A commenter stated that PR #177 fixes it for MCP servers which return long single-line output; the maintainer's closing comment refers to the same later long-line collapse work.

      Source: https://github.com/nicobailon/pi-mcp-adapter/issues/57#issuecomment-4961203464 (opens external site)

      Did this work for you?

    Add your answer or comment