Skip to main content
Glama

get_subscription_shorts

Fetch recent YouTube Shorts from your subscribed channels to discover new content. Specify how many channels to sample and Shorts per channel to customize your feed.

Instructions

Fetch recent Shorts from your subscribed YouTube channels. Pulls your subscriptions, then grabs the latest Shorts from each.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_channelsNoHow many subscribed channels to sample (default 15)
shorts_per_channelNoShorts to fetch per channel (default 3)

Implementation Reference

  • The handler function for 'get_subscription_shorts' which fetches subscriptions and then gathers Shorts for those channels.
    async ({ max_channels, shorts_per_channel }) => {
      const depErr = checkDeps();
      if (depErr) return errorResult(depErr);
    
      try {
        const subsResult = await fetchFeed('https://www.youtube.com/feed/channels', max_channels);
        const channels = (subsResult.entries || []).slice(0, max_channels);
        if (channels.length === 0) return textResult('No subscribed channels found.');
    
        const results = await Promise.allSettled(
          channels.map(async (ch) => {
            const chUrl = (ch.channel_url || ch.url) as string;
            if (!chUrl) return [];
            const result = await fetchFeed(`${stripChannelSuffix(chUrl)}/shorts`, shorts_per_channel);
            return (result.entries || []).map((e) => ({ ...pickVideoFields(e), channel: (ch.channel || ch.title) as string }));
          })
        );
    
        const allShorts: Array<Record<string, unknown>> = [];
        for (const r of results) {
          if (r.status === 'fulfilled') allShorts.push(...r.value);
        }
        allShorts.sort((a, b) => String(b.upload_date || '').localeCompare(String(a.upload_date || '')));
    
        const channelNames = channels.map((ch) => (ch.channel || ch.title) as string);
        return textResult({ channels_sampled: channelNames, count: allShorts.length, shorts: allShorts });
      } catch (err) {
        return errorResult(`Error: ${err instanceof Error ? err.message : String(err)}`);
      }
    }
  • src/index.ts:344-350 (registration)
    Registration of the 'get_subscription_shorts' tool, including its schema definition.
    server.tool(
      'get_subscription_shorts',
      'Fetch recent Shorts from your subscribed YouTube channels. Pulls your subscriptions, then grabs the latest Shorts from each.',
      {
        max_channels: z.number().min(1).max(50).default(15).describe('How many subscribed channels to sample (default 15)'),
        shorts_per_channel: z.number().min(1).max(10).default(3).describe('Shorts to fetch per channel (default 3)'),
      },
Behavior3/5

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

With no annotations provided, the description carries the full burden. It adds valuable context about the two-step implementation ('Pulls your subscriptions, then grabs...'), revealing the tool aggregates data across multiple sources. However, it omits auth requirements, rate limits, error handling for users with no subscriptions, and return format details.

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?

Two sentences with zero waste. The first sentence front-loads the primary action, while the second efficiently describes the implementation workflow without unnecessary verbosity. Every word earns its place.

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

Completeness4/5

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

Given the tool's low complexity (2 optional parameters, simple concept) and 100% schema coverage, the description is reasonably complete. It explains what content is returned (Shorts). However, with no output schema provided, it could improve by briefly indicating the return structure (e.g., 'returns a list of Shorts videos').

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%, providing complete documentation for max_channels and shorts_per_channel. The description reinforces the 'subscribed channels' concept aligning with max_channels, but does not add syntax details, validation rules, or usage examples beyond what the schema already provides. Baseline 3 is appropriate given high schema coverage.

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 provides a specific verb (Fetch) + resource (Shorts) + scope (from subscribed YouTube channels). It clearly distinguishes from sibling get_channel_shorts by specifying 'subscribed' channels, and from get_subscribed_channels by emphasizing it returns Shorts content rather than channel metadata.

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 implies usage through the phrase 'your subscribed YouTube channels,' suggesting this is for bulk-fetching across subscriptions rather than specific channels. However, it lacks explicit when-to-use guidance or named alternatives (e.g., it does not state 'for specific channels, use get_channel_shorts instead').

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/ronantakizawa/social-video-mcp'

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