Skip to content

feat(tools): exclude denied tools from system prompt #250

@bug-ops

Description

@bug-ops

Problem

Currently all tools are always included in the system prompt tool catalog. Tools with deny-all rules should be hidden from the LLM to prevent it from attempting to use them.

Solution

  • ToolRegistry::format_for_prompt() accepts &PermissionPolicy
  • Tools where all rules resolve to Deny are excluded from the prompt
  • Tools with mixed rules still appear (LLM should try, permission check handles it)

Acceptance Criteria

  • Denied tools excluded from system prompt
  • Partially denied tools still visible
  • Test for prompt generation with permission filtering

Part of #247 (M19 Phase C)

Metadata

Metadata

Assignees

No one assigned

    Labels

    toolsTool execution and MCP integration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions