INNER CODE UNIT · TypeScript

maybeEmptyState

HoangNguyen0403/agent-skills-standard · mcp/src/tools/index.ts:86

function maybeEmptyState(ctx: ToolContext): ToolResult | null {
  if (ctx.setup.kind !== "ready" || ctx.index.isEmpty()) {
    const guidance = setupGuidance(ctx.setup);
    if (guidance) {
      return { content: [{ type: "text", text: guidance }] };
    }
    return {
      content: [
        {
          type: "text",
          text: "No skills are loaded in this project. Run `npx agent-skills-standard@latest sync` to install standard skills, then restart the MCP server.",
        },
      ],
    };
  }
  return null;
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…