Skip to main content
Glama
agentskill-sh

agentskill-mcp

get_skill

Retrieve complete skill details including documentation, security information, and metadata from the agentskill-mcp server for AI agent skill management.

Instructions

Get full details for a specific skill including its SKILL.md content, security info, and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesSkill slug (e.g. 'seo-optimizer', 'react-best-practices')

Implementation Reference

  • src/index.ts:145-214 (registration)
    Complete registration of the get_skill tool using server.tool() with name, description, input schema, and handler function
    // Tool: get_skill
    server.tool(
      "get_skill",
      "Get full details for a specific skill including its SKILL.md content, security info, and metadata.",
      {
        slug: z
          .string()
          .describe("Skill slug (e.g. 'seo-optimizer', 'react-best-practices')"),
      },
      async ({ slug }) => {
        const data = await apiFetch<{
          data: {
            name: string;
            slug: string;
            description: string;
            owner: string;
            repositoryUrl: string;
            platforms: string[];
            installCount: number;
            score: number;
            ratingCount: number;
            skillMd: string;
            readme: string;
            tags: string[];
            skillTypes: string[];
            isVerified: boolean;
          };
        }>(`/skills/${encodeURIComponent(slug)}`);
    
        const s = data.data;
        if (!s) {
          return {
            content: [{ type: "text" as const, text: `Skill "${slug}" not found.` }],
          };
        }
    
        const rating = s.score
          ? `${s.score.toFixed(1)}/5 (${s.ratingCount} ratings)`
          : "No ratings yet";
        const sections = [
          `# ${s.name}`,
          "",
          s.description,
          "",
          "## Metadata",
          `- **Owner**: ${s.owner}`,
          `- **Repository**: ${s.repositoryUrl || "N/A"}`,
          `- **Platforms**: ${s.platforms?.join(", ") || "all"}`,
          `- **Types**: ${s.skillTypes?.join(", ") || "N/A"}`,
          `- **Tags**: ${s.tags?.join(", ") || "N/A"}`,
          `- **Installs**: ${s.installCount.toLocaleString()}`,
          `- **Rating**: ${rating}`,
          `- **Verified**: ${s.isVerified ? "Yes" : "No"}`,
        ];
    
        if (s.skillMd) {
          sections.push("", "## SKILL.md Content", "", s.skillMd);
        }
    
        sections.push(
          "",
          `Install: use the install_skill tool with slug "${s.slug}"`,
          `View on web: https://agentskill.sh/skills/${s.slug}`
        );
    
        return {
          content: [{ type: "text" as const, text: sections.join("\n") }],
        };
      }
    );
  • Handler function that fetches skill data from API using slug parameter, formats the response with metadata, SKILL.md content, and returns formatted text output
    async ({ slug }) => {
      const data = await apiFetch<{
        data: {
          name: string;
          slug: string;
          description: string;
          owner: string;
          repositoryUrl: string;
          platforms: string[];
          installCount: number;
          score: number;
          ratingCount: number;
          skillMd: string;
          readme: string;
          tags: string[];
          skillTypes: string[];
          isVerified: boolean;
        };
      }>(`/skills/${encodeURIComponent(slug)}`);
    
      const s = data.data;
      if (!s) {
        return {
          content: [{ type: "text" as const, text: `Skill "${slug}" not found.` }],
        };
      }
    
      const rating = s.score
        ? `${s.score.toFixed(1)}/5 (${s.ratingCount} ratings)`
        : "No ratings yet";
      const sections = [
        `# ${s.name}`,
        "",
        s.description,
        "",
        "## Metadata",
        `- **Owner**: ${s.owner}`,
        `- **Repository**: ${s.repositoryUrl || "N/A"}`,
        `- **Platforms**: ${s.platforms?.join(", ") || "all"}`,
        `- **Types**: ${s.skillTypes?.join(", ") || "N/A"}`,
        `- **Tags**: ${s.tags?.join(", ") || "N/A"}`,
        `- **Installs**: ${s.installCount.toLocaleString()}`,
        `- **Rating**: ${rating}`,
        `- **Verified**: ${s.isVerified ? "Yes" : "No"}`,
      ];
    
      if (s.skillMd) {
        sections.push("", "## SKILL.md Content", "", s.skillMd);
      }
    
      sections.push(
        "",
        `Install: use the install_skill tool with slug "${s.slug}"`,
        `View on web: https://agentskill.sh/skills/${s.slug}`
      );
    
      return {
        content: [{ type: "text" as const, text: sections.join("\n") }],
      };
    }
  • Input schema definition using zod for the slug parameter with description of expected format (e.g., 'seo-optimizer', 'react-best-practices')
    {
      slug: z
        .string()
        .describe("Skill slug (e.g. 'seo-optimizer', 'react-best-practices')"),
    },
  • apiFetch helper function used by the handler to make authenticated requests to the agentskill.sh API endpoint
    async function apiFetch<T>(path: string, options?: RequestInit): Promise<T> {
      const res = await fetch(`${API_BASE}${path}`, {
        ...options,
        headers: {
          "Content-Type": "application/json",
          "User-Agent": "agentskill-mcp/0.1.0",
          ...options?.headers,
        },
      });
      if (!res.ok) {
        throw new Error(`API error: ${res.status} ${res.statusText}`);
      }
      return res.json() as Promise<T>;
    }

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/agentskill-sh/agentskill-mcp'

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