feat (coding-agent): Expose getToolDefinition to command context#4954
Closed
xl0 wants to merge 2 commits into
Closed
feat (coding-agent): Expose getToolDefinition to command context#4954xl0 wants to merge 2 commits into
getToolDefinition to command context#4954xl0 wants to merge 2 commits into
Conversation
getToolDefinition to command context
This was referenced May 24, 2026
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.
I've seen more than enough tools and mcp servers where the author clearly never reviewed the actual output of those tools.
I made a
/toolcommand extension that lets you call the agent tools manually. It does not add the calls to the context, just adds a nice ui to fill in the input schema and displays the tool output mostly raw - no custom rendering.Peek.2026-05-24.12-30.mp4
Right now we actually don't have a way to grab the tool definitions from a command context. We have
getAllToolsthat resurnsToolInfo[]:which picks out just a few items from the
ToolDefinition.This PR just adds a
getToolDefinitionto the command context, which calls the AgentSessiongetToolDefinitionand wraps the output in ReadOnly as a hint. Not married to the implementation. Maybe we could just expose the AgentSession to the commands and tools?P.S.
Also a somewhat unrelated