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

Function skillsResult

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

Source from the content-addressed store, hash-verified

529// same block the execute tool description carries, so a model reading the guide
530// sees what is connected without a second round trip.
531const 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

Callers 1

createExecutorMcpServerFunction · 0.85

Calls 2

renderSkillsIndexFunction · 0.90
findSkillFunction · 0.90

Tested by

no test coverage detected