Skip to main content
Glama
osulivan

skill4agent MCP Server

install_skill

Install AI skills by providing the skill ID to add new capabilities to AI conversations through the skill4agent MCP Server.

Instructions

Get installation methods for a skill.

Use cases:

  • When you need to install a skill

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skillIdYesThe skill ID to install. Can be obtained from the results returned by the search_skills or get_skill tool.

Implementation Reference

  • The installSkillHandler function is the main handler for the install_skill tool. It takes a skillId parameter, calls the API client's installSkill method, and returns the installation methods (npx and download) as JSON content.
    export async function installSkillHandler(
      args: z.infer<typeof installSkillSchema>
    ): Promise<{ content: Array<{ type: 'text'; text: string }> }> {
      const api = getAPIClient();
    
      try {
        const result = await api.installSkill({
          skillId: args.skillId,
        });
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error) {
        const message = error instanceof Error ? error.message : 'Failed to get installation info';
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                error: message,
                message: 'Failed to get installation info. Please check: 1. Parameter format is correct 2. Network connection is normal',
              }, null, 2),
            },
          ],
        };
      }
    }
  • The installSkillSchema is a Zod schema that validates the input for the install_skill tool. It requires a skillId string parameter with a description explaining it can be obtained from search_skills or get_skill results.
    export const installSkillSchema = z.object({
      skillId: z.string().describe('The skill ID to install. Can be obtained from the results returned by the search_skills or get_skill tool.'),
    });
  • src/server.ts:48-57 (registration)
    Registration of the install_skill tool with the MCP server. The tool is registered with its name, description, input schema, and handler function that delegates to installSkillHandler.
    server.registerTool(
      'install_skill',
      {
        description: 'Get installation methods for a skill.\n\nUse cases:\n- When you need to install a skill',
        inputSchema: installSkillSchema,
      },
      async (args) => {
        return installSkillHandler(args);
      }
    );
  • TypeScript interfaces for InstallSkillParams (skillId string) and InstallSkillResponse (containing skillId, skillName, and installMethods with npx and download options).
    export interface InstallSkillParams {
      skillId: string;
    }
    
    export interface InstallSkillResponse {
      skillId: string;
      skillName: string;
      installMethods: {
        npx: {
          description: string;
          command: Array<{english_version?: string; chinese_version?: string}>;
          result: string;
        };
        download: {
          description: string;
          url: Array<{english_version?: string; chinese_version?: string}>;
          result: string;
        };
      };
    }
  • The installSkill method in APIClient makes a GET request to /install?skillId={skillId} endpoint and returns the InstallSkillResponse containing installation methods.
    async installSkill(params: InstallSkillParams): Promise<InstallSkillResponse> {
      try {
        const response = await this.client.get<InstallSkillResponse>(
          `/install?skillId=${encodeURIComponent(params.skillId)}`
        );
        return response.data;
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw this.handleError(error);
        }
        throw new Error('Failed to install skill: Unknown error');
      }
    }
Behavior2/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 of behavioral disclosure. The description mentions 'Get installation methods' but does not specify what these methods entail (e.g., download links, instructions, permissions required), whether it's a read-only operation, or any rate limits. It adds minimal context beyond the basic purpose, leaving behavioral traits unclear.

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 brief and front-loaded with the main purpose, followed by a use case. It avoids unnecessary details, but the use case is somewhat redundant with the purpose statement ('Get installation methods' vs. 'When you need to install a skill'). Overall, it is efficient with minor room for improvement.

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

Completeness2/5

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

Given no annotations, no output schema, and a single parameter with full schema coverage, the description is incomplete. It lacks details on what 'installation methods' include (e.g., formats, steps), behavioral aspects like safety or permissions, and how results are structured. For a tool that presumably provides actionable information, this is inadequate.

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?

The input schema has 100% description coverage, with 'skillId' documented as 'The skill ID to install. Can be obtained from the results returned by the search_skills or get_skill tool.' The description does not add any additional meaning beyond this schema, so it meets the baseline of 3 for high schema coverage without compensating value.

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

Purpose3/5

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

The description states the tool 'Get installation methods for a skill', which clarifies the verb ('Get') and resource ('installation methods for a skill'). However, it does not distinguish from sibling tools like 'get_skill' or 'search_skills', which might also relate to skills but serve different purposes (e.g., retrieving skill details or searching for skills). The purpose is clear but lacks sibling differentiation.

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

Usage Guidelines3/5

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

The description includes 'Use cases: - When you need to install a skill', which implies usage context. However, it does not explicitly state when to use this tool versus alternatives like 'get_skill' or 'search_skills', nor does it provide exclusions or prerequisites. The guidance is implied but incomplete.

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