Skip to content

fix(mcp): say why a tool is missing in read-only mode - #307

Merged
finalerock44 merged 2 commits into
devfrom
fix/mcp-read-only-unknown-tool
Nov 9, 2026
Merged

finalerock44 merged 2 commits into
devfrom
fix/mcp-read-only-unknown-tool

Conversation

@finalerock44

Copy link
Copy Markdown
Contributor

With --read-only, dcd mcp asks the hosted server for its read-only tools, and the server then doesn't list the others at all. A call to one of them, such as run, came back as a bare "Unknown tool: run". In read-only mode an unknown tool now says the server offers only the tools that change nothing.

The test stand-in for the hosted server now honours ?read_only=true as the API does, which is how this slipped through. A second test plays an API that lists every tool, so the local refusal stays covered.

What & why

Type of change

  • fix — bug fix
  • feat — new feature
  • perf — performance improvement
  • refactor — code change that's neither a fix nor a feature
  • docs — documentation only
  • chore / ci / build / test — tooling, no user-facing change
  • Breaking change (title has ! or PR notes a BREAKING CHANGE:)

Checklist

  • PR title follows the Conventional Commits format (see comment above)
  • pnpm lint passes
  • pnpm typecheck passes
  • pnpm build passes
  • I have not bumped the version or edited CHANGELOG.md (the release workflow handles this)
  • I have signed the CLA (the bot will prompt on first contribution)
  • Docs / README.md / STYLE_GUIDE.md updated if behaviour or output changed

How to test

With --read-only, dcd mcp asks the hosted server for its read-only tools,
and the server then doesn't list the others at all. A call to one of them,
such as run, came back as a bare "Unknown tool: run". In read-only mode
an unknown tool now says the server offers only the tools that change
nothing.

The test stand-in for the hosted server now honours ?read_only=true as the
API does, which is how this slipped through. A second test plays an API
that lists every tool, so the local refusal stays covered.
@finalerock44 finalerock44 self-assigned this Nov 9, 2026
@claude

claude Bot commented Nov 9, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@finalerock44 finalerock44 reopened this Nov 9, 2026
@finalerock44
finalerock44 merged commit 9a54e3a into dev Nov 9, 2026
9 checks passed
@finalerock44
finalerock44 deleted the fix/mcp-read-only-unknown-tool branch November 9, 2026 17:35
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.

1 participant