get_skill
Retrieve the full SKILL.md file for a given skill ID. Get detailed instructions and context for a specific skill.
Instructions
Load the full SKILL.md contents for a skill id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skill_id | Yes | Skill id as returned by list_skills |
Implementation Reference
- src/create-server.ts:129-150 (handler)The tool handler for 'get_skill'. It calls registry.getSkillMarkdown(skill_id) and returns the full SKILL.md text for a given skill id.
server.registerTool( "get_skill", { description: "Load the full SKILL.md contents for a skill id.", inputSchema: { skill_id: z.string().describe("Skill id as returned by list_skills"), }, }, async ({ skill_id }) => { tracker?.recordToolCall("get_skill", { skill_id }); const text = await registry.getSkillMarkdown(skill_id); if (!text) { return { content: [{ type: "text", text: `Skill not found: ${skill_id}` }], isError: true, }; } return { content: [{ type: "text", text }], }; }, ); - src/create-server.ts:133-135 (schema)Input schema for the 'get_skill' tool, expecting a 'skill_id' string parameter.
inputSchema: { skill_id: z.string().describe("Skill id as returned by list_skills"), }, - src/create-server.ts:129-150 (registration)Registration of 'get_skill' tool on the MCP server via server.registerTool().
server.registerTool( "get_skill", { description: "Load the full SKILL.md contents for a skill id.", inputSchema: { skill_id: z.string().describe("Skill id as returned by list_skills"), }, }, async ({ skill_id }) => { tracker?.recordToolCall("get_skill", { skill_id }); const text = await registry.getSkillMarkdown(skill_id); if (!text) { return { content: [{ type: "text", text: `Skill not found: ${skill_id}` }], isError: true, }; } return { content: [{ type: "text", text }], }; }, ); - src/skills-registry.ts:121-130 (helper)The getSkillMarkdown() method on SkillsRegistry that loads the full SKILL.md file for a given skill ID.
async getSkillMarkdown(skillId: string): Promise<string | null> { const list = await this.listSkills(); const hit = list.find((s) => s.id === skillId); if (!hit) return null; try { return await fs.readFile(hit.filePath, "utf8"); } catch { return null; } }