Skip to content

Conversation

@Eric-Guo
Copy link
Contributor

@Eric-Guo Eric-Guo commented Jan 22, 2026

Close #9979

It's a following enhancement for #6529 and #6564

@rekram1-node

Copilot AI review requested due to automatic review settings January 22, 2026 08:01
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the debug agent command to display MCP server configurations and tool configurations alongside the agent details. It modifies the command to fetch and include both registry tools and MCP tools in the output, providing better visibility into the complete tooling setup for an agent.

Changes:

  • Added fetching and display of MCP configuration and tool configuration
  • Updated tool resolution to include both registry tools and MCP tools
  • Refactored resolveTools function to accept tool IDs directly instead of tool objects
Comments suppressed due to low confidence (1)

packages/opencode/src/cli/cmd/debug/agent.ts:65

  • The tool execution logic only searches in availableTools (registry tools) but does not handle MCP tools. When a user tries to execute an MCP tool using the --tool flag, it will always fail with "Tool not found" even though MCP tools are now included in the resolvedTools output. The code should also fetch MCP tools and check if the requested tool is an MCP tool when it's not found in availableTools.
        const tool = availableTools.find((item) => item.id === toolID)
        if (!tool) {
          process.stderr.write(`Tool ${toolID} not found for agent ${agentName}` + EOL)
          process.exit(1)
        }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Eric-Guo Eric-Guo force-pushed the debug_tool_available branch 6 times, most recently from b3d38ea to 411cf7b Compare January 26, 2026 03:46
@Eric-Guo Eric-Guo force-pushed the debug_tool_available branch from 411cf7b to 8d59ce9 Compare January 26, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Display MCP and tools available list in a command.

1 participant