Skip to content

Expose only selectable tools over MCP server - #127

Merged
MikeAlhayek merged 1 commit into
mainfrom
fix/mcp-expose-selectable-tools-only
Aug 10, 2026
Merged

Expose only selectable tools over MCP server#127
MikeAlhayek merged 1 commit into
mainfrom
fix/mcp-expose-selectable-tools-only

Conversation

@fsfh60

@fsfh60 fsfh60 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The MCP server list and call handlers (WithCrestAppsHandlers()) exposed every non-hidden tool, including system tools that agents auto-include based on context. Both handlers now gate on AIToolDefinitionEntry.IsSelectable() (!IsSystemTool && !Hidden), so system and hidden tools are never listed or callable over MCP — even when ExposeAllTools is true. Tool instances are unchanged (user-created, always selectable).

This restores the intended behavior: release/1.0 filtered only !Hidden, so it also leaked non-hidden system tools; this fix applies the framework's existing selectable-tool concept to MCP.

Changes

  • Filter list handler and call handler (ResolveAllowedCodeTool) to selectable tools only
  • Tests: system tool omitted from ExposeAllTools listing; system tool rejected by call handler
  • Docs: mcp/server.md exposure section + changelog/1.1.0.md Fixes entry

Validation

  • All 2573 unit tests pass
  • Docs site builds successfully

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

The MCP list and call handlers exposed every non-hidden tool, including
system tools that agents auto-include based on context. They now gate on
AIToolDefinitionEntry.IsSelectable() so system and hidden tools are never
listed or callable over MCP, even when ExposeAllTools is true.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@MikeAlhayek
MikeAlhayek merged commit b6d8b4f into main Aug 10, 2026
10 checks passed
@MikeAlhayek
MikeAlhayek deleted the fix/mcp-expose-selectable-tools-only branch August 10, 2026 22:51
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.

2 participants