Skip to main content
Glama

get_skill

Retrieve detailed instructions and executable steps for a specific skill from the Hivemind MCP knowledge base to implement debugging solutions.

Instructions

Get detailed information about a specific skill including full instructions and executable steps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skill_idYesThe ID of the skill to retrieve

Implementation Reference

  • Input schema definition for the 'get_skill' tool, specifying skill_id as required number input.
    {
      name: "get_skill",
      description:
        "Get detailed information about a specific skill including full instructions and executable steps.",
      inputSchema: {
        type: "object",
        properties: {
          skill_id: {
            type: "number",
            description: "The ID of the skill to retrieve",
          },
        },
        required: ["skill_id"],
      },
    },
  • src/index.ts:394-399 (registration)
    MCP server registration and dispatch handler for 'get_skill' tool call, invokes getSkill function from api.ts.
    case "get_skill": {
      const result = await getSkill(args?.skill_id as number);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • Core handler implementation: Calls Supabase edge function /skill endpoint with skill_id to retrieve skill details from database.
    export async function getSkill(skillId: number): Promise<SkillDetailResult> {
      const response = await fetch(`${API_BASE}/skill`, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        body: JSON.stringify({ skill_id: skillId }),
      });
    
      if (!response.ok) {
        throw new Error(`Get skill failed: ${response.statusText}`);
      }
    
      return response.json();
    }
  • Backend Supabase edge function handler: Queries 'knowledge_entries' table for skill by id and type='skill', returns full record.
    async function handleGetSkill(supabase: any, body: any, corsHeaders: any) {
      const { skill_id } = body;
    
      if (!skill_id) {
        return new Response(JSON.stringify({ error: 'skill_id required' }), {
          status: 400,
          headers: { ...corsHeaders, 'Content-Type': 'application/json' }
        });
      }
    
      const { data, error } = await supabase
        .from('knowledge_entries')
        .select('*')
        .eq('id', skill_id)
        .eq('type', 'skill')
        .single();
    
      if (error || !data) {
        return new Response(JSON.stringify({ error: 'Skill not found' }), {
          status: 404,
          headers: { ...corsHeaders, 'Content-Type': 'application/json' }
        });
      }
    
      return new Response(JSON.stringify({
        ...data,
        _ctx: "Executing skill from global hivemind. Collective knowledge at your fingertips."
      }), {
        headers: { ...corsHeaders, 'Content-Type': 'application/json' }
      });
    }

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/Kevthetech143/hivemind-mcp'

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