Class: Clacky::Mcp::SkillProvider
- Inherits:
-
Object
- Object
- Clacky::Mcp::SkillProvider
- Defined in:
- lib/clacky/mcp/skill_provider.rb
Overview
Static, read-only provider that translates ~/.clacky/mcp.json (and the project-level override) into VirtualSkill instances for the SkillLoader.
Unlike Mcp::Registry, this class never spawns server processes, never talks JSON-RPC, and holds no mutable state. All actual MCP traffic flows through the local Clacky HTTP API (/api/mcp/:server/tools and /call), which subagents reach via curl. This keeps agents process-light and decouples skill discovery from server lifecycle.
Instance Method Summary collapse
-
#initialize(working_dir: nil) ⇒ SkillProvider
constructor
A new instance of SkillProvider.
- #virtual_skills ⇒ Object
Constructor Details
#initialize(working_dir: nil) ⇒ SkillProvider
Returns a new instance of SkillProvider.
18 19 20 |
# File 'lib/clacky/mcp/skill_provider.rb', line 18 def initialize(working_dir: nil) @working_dir = working_dir end |
Instance Method Details
#virtual_skills ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/clacky/mcp/skill_provider.rb', line 22 def virtual_skills load_servers.map do |name, spec| VirtualSkill.new( server_name: name, description: spec["description"] || default_description_for(name) ) end end |