Show inline parameter signatures in tools list#82
Merged
Conversation
Display required parameters and collapsed optional count in the compact tools-list view, so users can see at a glance what each tool expects without needing --full. https://claude.ai/code/session_01CzLbKsRtTusJ1ypzKwKkaH
Types are now abbreviated (str, num, obj, bool, [str]) for conciseness. At most 3 parameters are shown inline, with required params first, then optional in declaration order. Remaining params are indicated with "…". https://claude.ai/code/session_01CzLbKsRtTusJ1ypzKwKkaH
Backticks now enclose the tool name and params together, e.g. `ping()` instead of `ping`(). Also exports shortType and adds unit tests for the abbreviated type formatting. https://claude.ai/code/session_01CzLbKsRtTusJ1ypzKwKkaH
Distinguishes integer parameters from number (float) parameters in the compact tool listing. https://claude.ai/code/session_01CzLbKsRtTusJ1ypzKwKkaH
- Fix TS2345 by defaulting undefined properties to {}
- Export formatToolParamsInline and add unit tests for empty,
ordering, and truncation behavior
- Apply Prettier formatting
https://claude.ai/code/session_01CzLbKsRtTusJ1ypzKwKkaH
…x e2e - Remove chalk.dim from parameter list so it renders in normal color - Export and add unit tests for formatToolParamsInline - Fix e2e human-output test to match new backtick-wrapping format https://claude.ai/code/session_01CzLbKsRtTusJ1ypzKwKkaH
…1' into claude/show-tool-parameters-5loH1
Remove the separate "Task support:" section from tools-get detail view and instead show the task mode inline as [task:optional], [task:required], or [task:forbidden] in both tools-list and tools-get annotations. https://claude.ai/code/session_01CzLbKsRtTusJ1ypzKwKkaH
The MCP spec uses "task" terminology (taskSupport, taskId, etc.), so the CLI flag should match. --detach now implies --task instead of --async. Updated all source, tests, and changelog references. https://claude.ai/code/session_01CzLbKsRtTusJ1ypzKwKkaH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enhanced the
tools-listcommand to display inline parameter signatures with abbreviated type names, allowing users to quickly scan tool parameters without needing the--fullflag.Plus adds other interface improvements, e.g. rename
--asyncto--taskKey Changes
shortType()function: Converts JSON Schema types to compact abbreviations (e.g.,string→str,array<number>→[num], union types →type1 | type2)formatToolParamsInline()function: Generates inline parameter signatures showing up to 3 parameters (required first, then optional) with ellipsis (…) for additional parameters`search_web(query: str, maxResults?: num, language?: str)`)Implementation Details
str,num,int,bool,obj,[type]for arrays,enumfor enumsnulland display remaining types separated by|anyhttps://claude.ai/code/session_01CzLbKsRtTusJ1ypzKwKkaH