Skip to main content
Glama
osulivan

skill4agent MCP Server

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
NameRequiredDescriptionDefault
skillIdYesThe skill ID to query. Can be obtained from the results returned by the search_skills tool.

Implementation Reference

  • 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),
            },
          ],
        };
      }
    }
  • 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);
      }
    );
  • 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');
      }
    }
Install Server

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/osulivan/skill4agent-mcp-server'

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