Skip to main content
Glama

count_skills

Counts the total number of reusable skills available in the Hivemind MCP knowledge base to assess available debugging resources.

Instructions

Get total count of skills in the database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the count_skills tool logic by fetching the total count of skills (entries where type='skill') from the Supabase backend API.
    export async function countSkills(): Promise<{ total: number }> {
      const response = await fetch(`${API_BASE}/count-skills`, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        body: JSON.stringify({}),
      });
    
      if (!response.ok) {
        throw new Error(`Count skills failed: ${response.statusText}`);
      }
    
      return response.json();
    }
  • Input/output schema definition for the count_skills tool. No input parameters required.
    {
      name: "count_skills",
      description:
        "Get total count of skills in the database.",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • src/index.ts:401-406 (registration)
    Registration of the count_skills handler in the MCP CallToolRequestSchema switch statement.
    case "count_skills": {
      const result = await countSkills();
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • Backend API handler for /count-skills endpoint, which performs the actual database query to count skills (knowledge_entries where type='skill'). Called by the MCP client's countSkills function.
    async function handleCountSkills(supabase: any, corsHeaders: any) {
      const { count, error } = await supabase
        .from('knowledge_entries')
        .select('*', { count: 'exact', head: true })
        .eq('type', 'skill');
    
      if (error) {
        console.error('Count skills error:', error);
        return new Response(JSON.stringify({ error: 'Count failed' }), {
          status: 500,
          headers: { ...corsHeaders, 'Content-Type': 'application/json' }
        });
      }
    
      return new Response(JSON.stringify({
        total: count || 0
      }), {
        headers: { ...corsHeaders, 'Content-Type': 'application/json' }
      });
    }
  • Registration of the count-skills route handler in the Supabase public gateway switch statement.
    case 'count-skills':
      return await handleCountSkills(supabase, corsHeaders);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states this is a read operation ('Get'), but doesn't disclose behavioral traits like performance characteristics, error conditions, or whether it requires authentication. For a database query tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states exactly what the tool does with zero wasted words. It's appropriately sized for a simple counting tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple counting tool with no parameters and no output schema, the description is minimally adequate. However, without annotations or output schema, it should ideally provide more context about what 'skills' means in this domain or what format the count returns (e.g., integer, JSON object).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description doesn't need to add parameter information, and it correctly doesn't mention any parameters. Baseline for 0 parameters is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'total count of skills in the database', making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'search_skills' or 'get_skill', which might also return skill-related information.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'search_skills' (which likely returns detailed skill data) and 'get_skill' (which retrieves a specific skill), there's no indication of when a simple count is preferred over more detailed queries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

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