Skip to main content
Glama

skill

Load complete skill instructions with step-by-step guidance, examples, and file references for implementation.

Instructions

Load a skill's full instructions. Returns the complete SKILL.md content with step-by-step guidance, examples, and file references to follow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesSkill name from <available_skills>

Implementation Reference

  • The async handler function for the "skill" MCP tool. It parses the skill name from args, retrieves the skill metadata from the map, loads the SKILL.md content using loadSkillContent, and returns it as markdown text or an error response.
    async (args): Promise<CallToolResult> => { const { name } = SkillSchema.parse(args); const skill = skillMap.get(name); if (!skill) { const availableSkills = Array.from(skillMap.keys()).join(", "); return { content: [ { type: "text", text: `Skill "${name}" not found. Available skills: ${availableSkills || "none"}`, }, ], isError: true, }; } try { const content = loadSkillContent(skill.path); return { content: [ { type: "text", text: content, }, ], }; } catch (error) { const message = error instanceof Error ? error.message : String(error); return { content: [ { type: "text", text: `Failed to load skill "${name}": ${message}`, }, ], isError: true, }; } }
  • Zod input schema for the "skill" tool, defining the required 'name' parameter.
    const SkillSchema = z.object({ name: z.string().describe("Skill name from <available_skills>"), });
  • MCP server registration of the "skill" tool, providing title, description, schema, annotations, and handler.
    server.registerTool( "skill", { title: "Activate Skill", description: "Load a skill's full instructions. Returns the complete SKILL.md content " + "with step-by-step guidance, examples, and file references to follow.", inputSchema: SkillSchema, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, }, async (args): Promise<CallToolResult> => { const { name } = SkillSchema.parse(args); const skill = skillMap.get(name); if (!skill) { const availableSkills = Array.from(skillMap.keys()).join(", "); return { content: [ { type: "text", text: `Skill "${name}" not found. Available skills: ${availableSkills || "none"}`, }, ], isError: true, }; } try { const content = loadSkillContent(skill.path); return { content: [ { type: "text", text: content, }, ], }; } catch (error) { const message = error instanceof Error ? error.message : String(error); return { content: [ { type: "text", text: `Failed to load skill "${name}": ${message}`, }, ], isError: true, }; } } );
  • src/index.ts:74-74 (registration)
    Invocation of registerSkillTool during server initialization, passing the McpServer and skill map.
    registerSkillTool(server, skillMap);
  • Helper function used by the skill tool handler to read the full content of SKILL.md file.
    * Load the full content of a skill's SKILL.md file. */ export function loadSkillContent(skillPath: string): string { return fs.readFileSync(skillPath, "utf-8"); }

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/olaservo/skill-jack-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server