Skip to content

opencode doesn't preserve plugin tool descriptions #19613

Closed as duplicate
Closed as duplicate

Description

@khimaros

Description

parameter-level descriptions on plugin-defined tools are not included in the JSON schema sent to the LLM.

tool-level descriptions work fine, and opencode's own builtin tools (bash, read, etc.) have parameter descriptions. Only plugin tools are affected.

in packages/opencode/src/tool/registry.ts, fromPlugin wraps plugin args with z.object(def.args):

  function fromPlugin(id: string, def: ToolDefinition): Tool.Info {                               
    return {                                                                                      
      id,                                                                                       
      init: async (initCtx) => ({                                                                 
        parameters: z.object(def.args),                                                           
        // ...                                                                                  
  • @opencode-ai/plugin: 1.3.5

Plugins

No response

OpenCode version

1.3.5

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

debian linux

Terminal

No response

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 29, 2026
  2. github-actions commented on Mar 29, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • Tool argument descriptions lost in schema conversion #4357: Tool argument descriptions lost in schema conversion — describes the same problem where parameter-level .describe() metadata on plugin/custom tools is dropped before reaching the LLM, with a similar root-cause analysis pointing to the schema conversion in the codebase.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions