get_skill
Retrieve detailed skill information and complete documentation to verify capabilities before installation or recommendation.
Instructions
Get detailed information about a skill, including the complete SKILL.md content.
Use cases:
When you want to learn detailed information about a skill
When you need to view the core documentation (SKILL.md) of a skill
Before recommending or installing a skill, you need to confirm the detailed information to analyze whether it meets the requirements
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skillId | Yes | The skill ID to query. Can be obtained from the results returned by the search_skills tool. |
Implementation Reference
- src/tools/detail.ts:10-40 (handler)The main handler function that executes the get_skill tool logic. It takes a skillId parameter, calls the API client to fetch skill details, and returns the result as formatted JSON text. Includes error handling for failed API calls.
export async function getSkillHandler( args: z.infer<typeof getSkillSchema> ): Promise<{ content: Array<{ type: 'text'; text: string }> }> { const api = getAPIClient(); try { const result = await api.getSkill({ skillId: args.skillId }); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { const message = error instanceof Error ? error.message : 'Failed to retrieve'; return { content: [ { type: 'text', text: JSON.stringify({ error: message, message: 'Failed to get skill. Please check: 1. Parameter format is correct 2. Network connection is normal', }, null, 2), }, ], }; } } - src/tools/detail.ts:6-8 (schema)Zod schema definition for the get_skill tool input. Validates that skillId is a required string parameter, with a description explaining it can be obtained from search_skills results.
export const getSkillSchema = z.object({ skillId: z.string().describe('The skill ID to query. Can be obtained from the results returned by the search_skills tool.'), }); - src/server.ts:37-46 (registration)Registration of the get_skill tool with the MCP server. Registers the tool name, description, input schema, and handler callback function.
server.registerTool( 'get_skill', { description: 'Get detailed information about a skill, including the complete SKILL.md content.\n\nUse cases:\n- When you want to learn detailed information about a skill\n- When you need to view the core documentation (SKILL.md) of a skill\n- Before recommending or installing a skill, you need to confirm the detailed information to analyze whether it meets the requirements', inputSchema: getSkillSchema, }, async (args) => { return getSkillHandler(args); } ); - src/api/client.ts:48-60 (helper)API client method that makes the actual HTTP GET request to fetch skill details from the endpoint /skills/{skillId}. Handles errors and returns the GetSkillResponse.
async getSkill(params: GetSkillParams): Promise<GetSkillResponse> { try { const response = await this.client.get<GetSkillResponse>( `/skills/${encodeURIComponent(params.skillId)}` ); return response.data; } catch (error) { if (axios.isAxiosError(error)) { throw this.handleError(error); } throw new Error('Failed to get skill: Unknown error'); } }