Skip to main content
Glama
osulivan

skill4agent MCP Server

search_skills

Find AI skills by keyword with optional category filtering to identify relevant capabilities for AI conversations.

Instructions

Search for Skills by keyword, with optional category filtering. Returns a list of matching skills.

Use cases:

  • When looking for skills in a specific domain

  • When unsure what skill is needed but have a general direction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYesSearch keyword. Can be English, Chinese, or mixed. (e.g., "React", "n8n-workflow", "frontend development", "copywriting", "langchain docs")
categoriesNoOptional category filter. Supports both English and Chinese category names. Can pass multiple categories. (e.g., ["Frontend Development", "AI & Machine Learning"])
limitNoLimit the number of results returned. Default is 10, maximum is 100. Set according to your needs to avoid returning too many results.

Implementation Reference

  • Main handler function for search_skills tool. Validates input using Zod schema, calls the API client to search for skills, and returns formatted JSON response with error handling.
    export async function searchSkillsHandler(
      args: z.infer<typeof searchSkillsSchema>
    ): Promise<{ content: Array<{ type: 'text'; text: string }> }> {
      const api = getAPIClient();
    
      try {
        const result = await api.searchSkills({
          keyword: args.keyword,
          categories: args.categories,
          limit: args.limit || 10,
        });
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error) {
        const message = error instanceof Error ? error.message : 'Search failed';
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                error: message,
                message: 'Search failed. Please check: 1. Parameter format is correct 2. Network connection is normal',
              }, null, 2),
            },
          ],
        };
      }
    }
  • Zod schema definition for search_skills tool input validation. Defines keyword (required), categories (optional array), and limit (optional number 1-100) parameters with descriptions.
    export const searchSkillsSchema = z.object({
      keyword: z.string().describe('Search keyword. Can be English, Chinese, or mixed. (e.g., "React", "n8n-workflow", "frontend development", "copywriting", "langchain docs")'),
      categories: z.array(z.enum(CATEGORIES as [string, ...string[]])).optional().describe('Optional category filter. Supports both English and Chinese category names. Can pass multiple categories. (e.g., ["Frontend Development", "AI & Machine Learning"])'),
      limit: z.number().min(1).max(100).optional().describe('Limit the number of results returned. Default is 10, maximum is 100. Set according to your needs to avoid returning too many results.'),
    });
  • src/server.ts:26-35 (registration)
    Registration of search_skills tool with MCP server. Registers tool name, description, inputSchema, and handler function.
    server.registerTool(
      'search_skills',
      {
        description: 'Search for Skills by keyword, with optional category filtering. Returns a list of matching skills.\n\nUse cases:\n- When looking for skills in a specific domain\n- When unsure what skill is needed but have a general direction',
        inputSchema: searchSkillsSchema,
      },
      async (args) => {
        return searchSkillsHandler(args);
      }
    );
  • APIClient method that makes the HTTP POST request to /search endpoint. Handles API communication and error handling for the search_skills functionality.
    async searchSkills(params: SearchSkillsParams): Promise<SearchSkillsResponse> {
      try {
        const response = await this.client.post<SearchSkillsResponse>(
          '/search',
          {
            keyword: params.keyword,
            categories: params.categories,
            limit: params.limit || 10,
          }
        );
        return response.data;
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw this.handleError(error);
        }
        throw new Error('Failed to search skills: Unknown error');
      }
    }
  • TypeScript interface definitions for SearchSkillsParams, SkillSearchResult, and SearchSkillsResponse. Defines the data structures for the search skills API.
    export interface SearchSkillsParams {
      keyword: string;
      categories?: string[];
      limit?: number;
    }
    
    export interface SkillSearchResult {
      skillId: string;
      skillName: string;
      description: string;
      descriptionTranslated: string;
      categoryName: string;
      tags: string;
      tagsCn: string;
      totalInstalls: number;
      relevance: number;
    }
    
    export interface SearchSkillsResponse {
      skills: SkillSearchResult[];
      total: number;
      query: string;
      categories?: string[];
      suggestions?: string[];
      warnings?: string[];
    }
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It states the tool 'Returns a list of matching skills' which is basic behavioral information. However, it doesn't disclose important traits like whether this is a read-only operation (implied but not stated), pagination behavior, rate limits, authentication requirements, or what happens with no matches. The description adds some value but lacks comprehensive behavioral context for a search tool.

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

Conciseness4/5

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

The description is appropriately sized with two clear sections: a purpose statement and use cases. Both sentences earn their place by providing distinct value. It could be slightly more concise by integrating the use cases into the main statement, but overall it's well-structured and front-loaded with the core functionality.

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?

Given 3 parameters with 100% schema coverage but no annotations and no output schema, the description provides adequate basic context but has gaps. It explains what the tool does and when to use it, but doesn't address behavioral aspects like response format, error conditions, or performance characteristics. For a search tool with no output schema, more detail about return values would be helpful.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already fully documents all 3 parameters (keyword, categories, limit). The description mentions 'keyword' and 'category filtering' but doesn't add meaningful semantic context beyond what's in the schema descriptions. The baseline is 3 when schema does the heavy lifting, and the description doesn't compensate with additional parameter insights.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Search for Skills by keyword, with optional category filtering. Returns a list of matching skills.' This includes a specific verb ('Search'), resource ('Skills'), and scope ('by keyword, with optional category filtering'). It distinguishes from sibling tools get_skill (likely retrieves a single skill) and install_skill (likely installs a skill).

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

Usage Guidelines4/5

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

The description provides clear usage contexts with 'Use cases' section: 'When looking for skills in a specific domain' and 'When unsure what skill is needed but have a general direction.' This gives good guidance on when to use the tool. However, it doesn't explicitly state when NOT to use it or mention alternatives (like using get_skill for known skill IDs).

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

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