list_skills
Lists all available skills with their ID, title, and a short description teaser.
Instructions
Return a manifest of available skills (id, title, description teaser). No filesystem paths are exposed.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_skills"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/create-server.ts:108-126 (handler)Handler function for the list_skills tool. It calls registry.listSkills(), formats results as a markdown list (id, title, description teaser), and returns the text content.
async () => { tracker?.recordToolCall("list_skills", {}); const skills = await registry.listSkills(); const lines = skills.map( (s) => `- **${s.id}**${s.title ? `: ${s.title}` : ""}\n ${s.description.replace(/\s+/g, " ").slice(0, 280)}`, ); return { content: [ { type: "text", text: lines.length > 0 ? lines.join("\n\n") : "No skills found. Mount SKILL.md files under SKILLS_ROOT (see server README).", }, ], }; }, - src/create-server.ts:101-127 (registration)The list_skills tool is registered via server.registerTool with name 'list_skills', a description, empty inputSchema, and the handler callback.
server.registerTool( "list_skills", { description: "Return a manifest of available skills (id, title, description teaser). No filesystem paths are exposed.", inputSchema: {}, }, async () => { tracker?.recordToolCall("list_skills", {}); const skills = await registry.listSkills(); const lines = skills.map( (s) => `- **${s.id}**${s.title ? `: ${s.title}` : ""}\n ${s.description.replace(/\s+/g, " ").slice(0, 280)}`, ); return { content: [ { type: "text", text: lines.length > 0 ? lines.join("\n\n") : "No skills found. Mount SKILL.md files under SKILLS_ROOT (see server README).", }, ], }; }, ); - src/create-server.ts:106-106 (schema)The list_skills tool has an empty input schema (no parameters required).
inputSchema: {}, - src/skills-registry.ts:84-119 (helper)The SkillsRegistry.listSkills() method is the core helper that walks the skills directory for SKILL.md files, extracts title/description teaser from markdown, and returns sorted SkillManifestEntry[].
async listSkills(): Promise<SkillManifestEntry[]> { const root = this.skillsRoot; let stat; try { stat = await fs.stat(root); } catch { return []; } if (!stat.isDirectory()) return []; const files = await walkSkillFiles(root); const out: SkillManifestEntry[] = []; for (const filePath of files) { const relDir = path.relative(root, path.dirname(filePath)); /** SKILL.md directly under SKILLS_ROOT */ const normalizedId = relDir === "" ? "_root" : toPosix(relDir); let raw: string; try { raw = await fs.readFile(filePath, "utf8"); } catch { continue; } const { title, description } = extractTitleAndTeaser(raw); out.push({ id: normalizedId, filePath, title, description, }); } out.sort((a, b) => a.id.localeCompare(b.id)); return out; }