Skip to content

[PROTOTYPE] Pi tool formatters#1005

Draft
LasmarKhalifa wants to merge 3 commits into
mainfrom
06-29/pi-tool-formatters-prototype
Draft

[PROTOTYPE] Pi tool formatters#1005
LasmarKhalifa wants to merge 3 commits into
mainfrom
06-29/pi-tool-formatters-prototype

Conversation

@LasmarKhalifa

@LasmarKhalifa LasmarKhalifa commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Prototype for Pi tool formatters. Mirrors the current implementation of Claude tool formatters. Pi only exposes 7 tools by default, as stated here.

The final implementation would include doc comments (mirroring the style of the Claude formatters), as well as tests.

Current tool formatting (includes every tool call and result as well as an error case):

image.png

Proposed formatting (same tool calls, results and error case):

image.png

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

dersam commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

We should put some more thought into how we handle custom tool display, as Pi is almost certain to have those. Calling them "unknown" isn't good enough, as anybody can define a tool in the harness and Roast should not be expected to know anything other than defaults.

Copy link
Copy Markdown
Contributor Author

We should put some more thought into how we handle custom tool display, as Pi is almost certain to have those. Calling them "unknown" isn't good enough, as anybody can define a tool in the harness and Roast should not be expected to know anything other than defaults.

​I agree. Made changes so that each unknown tool call shows the name of the tool, and then shows each key-value pair with truncation so the output remains concise. This makes it more of a generic tool formatter rather than one that expresses that this tool is unknown, which is a great improvement. Let me know what you think!

@dersam

dersam commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Nice, I like that much better.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants