(name: string | undefined, executeInventory: string)
| 529 | // same block the execute tool description carries, so a model reading the guide |
| 530 | // sees what is connected without a second round trip. |
| 531 | const skillsResult = (name: string | undefined, executeInventory: string): McpToolResult => { |
| 532 | const trimmed = name?.trim(); |
| 533 | if (!trimmed) { |
| 534 | return { content: [{ type: "text", text: renderSkillsIndex() }] }; |
| 535 | } |
| 536 | const skill = findSkill(trimmed); |
| 537 | if (!skill) { |
| 538 | return { |
| 539 | content: [{ type: "text", text: `No skill named "${trimmed}".\n\n${renderSkillsIndex()}` }], |
| 540 | isError: true, |
| 541 | }; |
| 542 | } |
| 543 | const text = |
| 544 | skill.name === EXECUTE_SKILL.name && executeInventory.length > 0 |
| 545 | ? `${skill.body}\n\n${executeInventory}` |
| 546 | : skill.body; |
| 547 | return { content: [{ type: "text", text }] }; |
| 548 | }; |
| 549 | |
| 550 | /** Pull the live integration inventory block out of the built execute |
| 551 | * description (it runs from its header to the end), so the `skills` tool can |
no test coverage detected