Skip to content

Add brief/verbose output mode to endpoint tools - #5

Open
KamiV2 wants to merge 2 commits into
mainfrom
feat/verbosity-brief-mode
Open

Add brief/verbose output mode to endpoint tools#5
KamiV2 wants to merge 2 commits into
mainfrom
feat/verbosity-brief-mode

Conversation

@KamiV2

@KamiV2 KamiV2 commented Jun 8, 2026

Copy link
Copy Markdown

What

In the spirit of token-reduction -- adds an optional per-call verbosity parameter to every endpoint tool, so token-conscious callers can opt into a trimmed response. Mostly matters for check/verify_proof.

  • verbosity: "verbose" (default) — the current behavior: raw AXLE response, pretty-printed with indent=2. Existing callers are unaffected.
  • verbosity: "brief" — drops timings, empty message buckets, and content that merely echoes the submitted input; emits compact JSON.

What brief keeps

brief keeps all non-empty errors/warnings/infos. The content drop only fires when the response echoes the input, so transformed output from rename/merge/normalize/etc. always survives.

Endpoint responses were a raw passthrough pretty-printed with indent=2,
echoing back the full (often unchanged) input content on every call. Add
an optional per-call `verbosity` knob ("verbose" default, "brief") so
token-conscious callers can opt into a trimmed response.

brief drops timings, empty message buckets, and content that merely
echoes the submitted input, and emits compact JSON. It keeps all
errors/warnings/infos -- infos carries exact?/apply?/rw? "Try this:"
suggestions and #eval/#check output that consumers rely on. The knob is
consumed server-side and never forwarded to the AXLE API. Default stays
verbose, so existing callers are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@jxin31415 jxin31415 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine but I'm a liiiil dubious about whether this will be confusing (particularly the content field removal)? Maybe it's worth adding a placeholder, but that might be overkill

I'm fine with merging if Simon wants to try it out

Comment thread axle_mcp_server/server.py Outdated
"Output detail level. \"verbose\" (default): the raw AXLE response, "
"pretty-printed. \"brief\": drops timings, empty message buckets, and "
"content that just echoes the input; emits compact JSON. Keeps all "
"errors/warnings/infos. Use \"brief\" to save tokens."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Keeps all errors/warnings/infos." <-- ? seems kinda misleading

Comment thread axle_mcp_server/server.py Outdated
Comment thread axle_mcp_server/server.py
out[key] = brief
continue
if key == "content" and submitted_content is not None and value == submitted_content:
continue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this might be kind of misleading -- if repair proofs fails, for example, and there is no content field returned, that seems rather confusing

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same goes for the messages but less so

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding a content_unchanged field solves this I think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

- Inline one-caller helpers (_inject_verbosity, _brief_messages,
  _serialize_result); drop narration comments and duplicated docstrings
- Replace silently-dropped echoed content with content_unchanged=true
  so brief output is unambiguous (review feedback)
- Reword verbosity description: empty buckets are dropped, non-empty
  errors/warnings/infos always survive

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@KamiV2
KamiV2 requested a review from nautsimon June 12, 2026 23:06

@nautsimon nautsimon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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.

3 participants