Skip to main content
Glama
olamide-olaniyan

SociaVault MCP Server

get_youtube_channel

Retrieve YouTube channel data by handle or @username to access profiles, videos, and engagement metrics for analysis.

Instructions

Get YouTube channel data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
handleYesYouTube channel handle or @username

Implementation Reference

  • The core handler logic for the 'get_youtube_channel' tool. It extracts the 'handle' argument, makes an API request to the Sociavault YouTube channel endpoint, processes the response using the extractYouTubeChannel helper, and returns the structured data as JSON text.
    if (name === "get_youtube_channel") {
      const { handle } = args as { handle: string };
      const response = await axios.get(`${BASE_URL}/youtube/channel`, {
        headers: { "X-API-Key": API_KEY },
        params: { handle },
      });
      const extracted = extractYouTubeChannel(response.data);
      return {
        content: [{ type: "text", text: JSON.stringify(extracted, null, 2) }],
      };
    }
  • Input schema definition for the 'get_youtube_channel' tool, specifying an object with a required 'handle' string parameter.
    inputSchema: {
      type: "object",
      properties: {
        handle: {
          type: "string",
          description: "YouTube channel handle or @username",
        },
      },
      required: ["handle"],
    },
  • src/index.ts:300-313 (registration)
    Registration of the 'get_youtube_channel' tool in the MCP tools array, including name, description, and input schema.
    {
      name: "get_youtube_channel",
      description: "Get YouTube channel data",
      inputSchema: {
        type: "object",
        properties: {
          handle: {
            type: "string",
            description: "YouTube channel handle or @username",
          },
        },
        required: ["handle"],
      },
    },
  • Helper function that extracts and structures YouTube channel information from the raw API response data.
    function extractYouTubeChannel(data: any) {
      const channel = data?.data?.channel || data?.channel || data?.data || {};
      const snippet = channel.snippet || {};
      const statistics = channel.statistics || {};
      return {
        title: snippet.title || channel.title,
        description: snippet.description || channel.description || "",
        subscribers:
          parseInt(statistics.subscriberCount || statistics.subscribers || "0") ||
          0,
        videos: parseInt(statistics.videoCount || "0") || 0,
        views: parseInt(statistics.viewCount || "0") || 0,
        custom_url: channel.customUrl || snippet.customUrl,
        thumbnail:
          snippet.thumbnails?.high?.url || snippet.thumbnails?.default?.url,
        published_at: snippet.publishedAt || channel.publishedAt,
      };
    }
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. 'Get YouTube channel data' implies a read-only operation but doesn't specify if it requires authentication, rate limits, error handling, or what the output format might be. This is a significant gap for a tool with no annotation coverage.

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 a single, efficient sentence with no wasted words. It's front-loaded and to the point, though it could benefit from more detail to improve clarity and completeness.

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 the complexity of retrieving YouTube channel data, the lack of annotations, and no output schema, the description is incomplete. It doesn't explain what data is returned, potential limitations, or behavioral aspects, making it inadequate for effective tool use.

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 the parameter 'handle' documented as 'YouTube channel handle or @username'. The description adds no additional meaning beyond this, as it doesn't elaborate on parameter usage or constraints. With high schema coverage, the baseline score of 3 is appropriate.

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 'Get YouTube channel data' states a clear verb ('Get') and resource ('YouTube channel data'), which is better than a tautology. However, it's vague about what specific data is retrieved (e.g., metadata, videos, statistics) and doesn't distinguish from sibling tools like get_facebook_profile or get_tiktok_profile beyond the platform name. This leaves the purpose somewhat ambiguous.

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. It doesn't mention any prerequisites, context for usage, or comparisons to sibling tools (e.g., for social media data retrieval). This lack of guidance makes it unclear when this tool is appropriate.

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/olamide-olaniyan/sociavault-mcp'

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