search_skills
Find skills by searching their id, title, or description with a case-insensitive substring query.
Instructions
Filter skills by free-text query over id, title, and description.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Case-insensitive substring match |
Implementation Reference
- src/create-server.ts:152-179 (registration)Registers the "search_skills" tool on the MCP server with inputSchema requiring a 'query' string.
server.registerTool( "search_skills", { description: "Filter skills by free-text query over id, title, and description.", inputSchema: { query: z.string().describe("Case-insensitive substring match"), }, }, async ({ query }) => { tracker?.recordToolCall("search_skills", { query }); const found = await registry.search(query); const lines = found.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 matched query: ${query}`, }, ], }; }, ); - src/create-server.ts:160-178 (handler)Handler function that calls registry.search() with the query and formats results as markdown bullet list.
async ({ query }) => { tracker?.recordToolCall("search_skills", { query }); const found = await registry.search(query); const lines = found.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 matched query: ${query}`, }, ], }; }, - src/skills-registry.ts:132-141 (helper)The SkillsRegistry.search() method that performs a case-insensitive substring match against id, title, and description.
async search(query: string): Promise<SkillManifestEntry[]> { const q = query.trim().toLowerCase(); const all = await this.listSkills(); if (!q) return all; return all.filter((s) => { const blob = `${s.id}\n${s.title ?? ""}\n${s.description}`.toLowerCase(); return blob.includes(q); }); } } - src/create-server.ts:154-158 (schema)Input schema for search_skills: takes a single 'query' string parameter for case-insensitive substring matching.
{ description: "Filter skills by free-text query over id, title, and description.", inputSchema: { query: z.string().describe("Case-insensitive substring match"), },