MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / skillsResult

Function skillsResult

packages/hosts/mcp/src/tool-server.ts:623–640  ·  view source on GitHub ↗
(name: string | undefined, executeInventory: string)

Source from the content-addressed store, hash-verified

621// same block the execute tool description carries, so a model reading the guide
622// sees what is connected without a second round trip.
623const skillsResult = (name: string | undefined, executeInventory: string): McpToolResult => {
624 const trimmed = name?.trim();
625 if (!trimmed) {
626 return { content: [{ type: "text", text: renderSkillsIndex() }] };
627 }
628 const skill = findSkill(trimmed);
629 if (!skill) {
630 return {
631 content: [{ type: "text", text: `No skill named "${trimmed}".\n\n${renderSkillsIndex()}` }],
632 isError: true,
633 };
634 }
635 const text =
636 skill.name === EXECUTE_SKILL.name && executeInventory.length > 0
637 ? `${skill.body}\n\n${executeInventory}`
638 : skill.body;
639 return { content: [{ type: "text", text }] };
640};
641
642/** Pull the live integration inventory block out of the built execute
643 * description (it runs from its header to the end), so the `skills` tool can

Callers 1

createExecutorMcpServerFunction · 0.85

Calls 2

renderSkillsIndexFunction · 0.90
findSkillFunction · 0.90

Tested by

no test coverage detected