Get skill
skills__getRetrieve the complete body and metadata of a named skill for use in toolchains or automation.
Instructions
Retrieve the full content (body + metadata) of a named skill.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- src/tools/get.ts:10-25 (handler)The main handler function for the skills__get tool. Looks up a skill by name in the registry, returning cached content or parsing from disk.
export async function handleGet(deps: ServerDeps, args: { name: string }): Promise<SkillContent> { await ensureRegistryFresh(deps); if (!deps.registry.has(args.name)) { throw new Error(`Skill not found: ${args.name}`); } const cached = deps.contentCache.get(args.name); if (cached !== undefined) return cached; // Cache miss — re-parse from disk using the metadata's location. const meta = deps.registry.get(args.name)!; const content = await deps.parser.parseFile(meta.sourcePath, meta.folder); deps.contentCache.set(args.name, content); return content; } - src/tools/get.ts:6-8 (schema)Input schema for skills__get, defines a 'name' string parameter.
export const getInputSchema = { name: z.string(), } as const; - src/tools/index.ts:2-2 (registration)Re-exports getInputSchema and handleGet from the get.ts module.
export { getInputSchema, handleGet } from './get.js';