( mcpCommands: readonly Command[], )
| 545 | * separately. |
| 546 | */ |
| 547 | export function getMcpSkillCommands( |
| 548 | mcpCommands: readonly Command[], |
| 549 | ): readonly Command[] { |
| 550 | if (feature('MCP_SKILLS')) { |
| 551 | return mcpCommands.filter( |
| 552 | cmd => |
| 553 | cmd.type === 'prompt' && |
| 554 | cmd.loadedFrom === 'mcp' && |
| 555 | !cmd.disableModelInvocation, |
| 556 | ) |
| 557 | } |
| 558 | return [] |
| 559 | } |
| 560 | |
| 561 | // SkillTool shows ALL prompt-based commands that the model can invoke |
| 562 | // This includes both skills (from /skills/) and commands (from /commands/) |
no test coverage detected