Skip to content

Does not (and cannot) work with MCP servers. #9

@CloudedQuartz

Description

@CloudedQuartz

tool.definition is only called here https://github.com/anomalyco/opencode/blob/4877eccc0d06c747624bf61aaa6f3e65cea9cc8d/packages/opencode/src/tool/registry.ts#L301

MCP tools are loaded here https://github.com/anomalyco/opencode/blob/4877eccc0d06c747624bf61aaa6f3e65cea9cc8d/packages/opencode/src/session/prompt.ts#L447

The tool.definition hook fires exactly once in the entire codebase, and only for tools that come from registry.tools() (built-in + plugin tools). MCP tools bypass it entirely via a separate code path (mcp.tools() → convertMcpTool() → straight into the tool list).

The readme implies that tool searching works for MCP servers also. But, the plugin is functionally useless without it working for mcp servers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions