feat(plugin): align plugin tool types with built-in tool capabilities#9138
Closed
eXamadeus wants to merge 17 commits intoanomalyco:devfrom
Closed
feat(plugin): align plugin tool types with built-in tool capabilities#9138eXamadeus wants to merge 17 commits intoanomalyco:devfrom
eXamadeus wants to merge 17 commits intoanomalyco:devfrom
Conversation
Fix plugin tool types to expose ToolContext fields and ExecuteResult that built-in tools already have access to. The only functional change is allowing plugin tools to return structured result objects (with title, metadata, attachments) instead of only plain strings.
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #8328: feat(plugin): align plugin tool types with built-in tool capabilities Why they're related: |
This was referenced Jan 17, 2026
…ng sent back as assistant message content (anomalyco#11270) Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
00637c0 to
71e0ba2
Compare
f1ae801 to
08fa7f7
Compare
Contributor
Author
|
Closed in favor of #12050 to make my fork easier to maintain. |
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.
What does this PR do?
Fixes: #8327
Related: #8269, #12042
This PR aligns plugin tool types with the capabilities tools already have. Specifically:
ToolContextfields to plugin tools:callID,extra,, andmetadata()to give plugins the correct context typesask()metadata()andask()were added in fix: add missing metadata() and ask() defintions to ToolContext type #8269ExecuteResulttype allowing plugin tools to return structured result objects withtitle,metadata,output, andattachmentsinstead of only plain stringsExecuteResultdirectly (assuming tools till truncate...we could add a check here?)This enables plugins to provide richer tool responses with proper metadata updates, closer matching the flexibility of built-in tools.
How did you verify your code works?
The types all align nicely in the registry: