Skip to content

Remove spaces around colons in tool parameter formatting#110

Merged
jancurn merged 3 commits intomainfrom
claude/update-tools-summary-format-D1e28
Mar 24, 2026
Merged

Remove spaces around colons in tool parameter formatting#110
jancurn merged 3 commits intomainfrom
claude/update-tools-summary-format-D1e28

Conversation

@jancurn
Copy link
Member

@jancurn jancurn commented Mar 24, 2026

Summary

Updated the tool parameter formatting to remove spaces around colons and add a space between tool name and parameters for improved readability in CLI output.

Key Changes

  • Parameter type formatting: Removed spaces around colons in parameter type annotations

    • Changed name: type to name:type for required parameters
    • Changed name?: type to name?:type for optional parameters
  • Tool name spacing: Added a space between tool name and opening parenthesis

    • Changed `tool_name(params)` to `tool_name (params)`
    • Applies to all tool output formatting including tools with no parameters

Implementation Details

  • Modified formatToolParamsInline() in src/cli/output.ts to remove spaces around colons when building parameter strings
  • Modified formatToolsSummary() in src/cli/output.ts to insert a space between the tool name and parameter list
  • Updated all corresponding test expectations in test/unit/cli/output.test.ts to match the new formatting

These changes provide a more compact and visually distinct parameter format while maintaining clarity through the space between tool name and parameters.

https://claude.ai/code/session_01VLYvhktShAWqkRozr61hUp

claude and others added 3 commits March 24, 2026 10:24
Change formatToolParamsInline to remove spaces around colons
(e.g. `name:str` instead of `name: str`) and add a space between
the tool name and parameter list in formatToolsSummary.

https://claude.ai/code/session_01VLYvhktShAWqkRozr61hUp
@jancurn jancurn merged commit 0e08033 into main Mar 24, 2026
6 checks passed
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