Skip to content

fix: Add conditional check for ProfileTool usage based on repository …#717

Merged
binaryk merged 1 commit intoBinarCode:10.xfrom
LAlex14:fix/profile-tool-boot-condition
Feb 13, 2026
Merged

fix: Add conditional check for ProfileTool usage based on repository …#717
binaryk merged 1 commit intoBinarCode:10.xfrom
LAlex14:fix/profile-tool-boot-condition

Conversation

@LAlex14
Copy link
Copy Markdown
Contributor

@LAlex14 LAlex14 commented Feb 13, 2026

Fix ProfileTool boot condition to respect canUseForProfile method

Problem

ProfileTool was being registered in MCP tools regardless of whether repositories defined a canUseForProfile() method that returned false. This was inconsistent with
ProfileController, which already respects this method to control access.

Solution

Added the same canUseForProfile check used in ProfileController (line 39) to BootMcpTools (line 156-157). Now ProfileTool is only registered if:

  • The canUseForProfile method doesn't exist (default allow), OR
  • The method exists and returns true

This ensures consistent behavior between the controller and MCP tool registration.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 13, 2026

@LAlex14 is attempting to deploy a commit to the BinarCode Team on Vercel.

A member of the Team first needs to authorize it.

@what-the-diff
Copy link
Copy Markdown

what-the-diff bot commented Feb 13, 2026

PR Summary

  • Added conditional check for tool use
    A new condition has been introduced to make sure a tool can only be accessed if it's deemed usable. This is determined by a method called 'canUseForProfile'. If this method doesn't exist or if it answers 'true' when inquired, then the tool will be allowed for use. This would aid in preventing unauthorized or inappropriate tool use.

@binaryk binaryk merged commit 539210d into BinarCode:10.x Feb 13, 2026
10 of 11 checks passed
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