Skip to main content
Glama

get_shorts

Retrieve AI-generated short video clips from a completed request, including video URLs, titles, descriptions, viral scores, and durations sorted by popularity.

Instructions

Retrieve all generated short clips for a completed request. Returns video URLs, AI-generated titles, descriptions, viral scores, and durations sorted by viral score.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYesThe request ID from create_short (24-char hex)

Implementation Reference

  • The handler function for the get_shorts tool, which calls the client's getShorts method and formats the result.
    async ({ requestId }) => {
      try {
        const result = await client.getShorts(requestId);
        return { content: [{ type: 'text', text: formatShortsResponse(result) }] };
      } catch (error) {
        return { content: [{ type: 'text', text: formatError(error) }], isError: true };
      }
    }
  • Registration function for the get_shorts tool.
    export function registerGetShorts(server, client) {
      server.tool(
        'get_shorts',
        'Retrieve all generated short clips for a completed request. Returns video URLs, AI-generated titles, descriptions, viral scores, and durations sorted by viral score.',
        schema,
        async ({ requestId }) => {
          try {
            const result = await client.getShorts(requestId);
            return { content: [{ type: 'text', text: formatShortsResponse(result) }] };
          } catch (error) {
            return { content: [{ type: 'text', text: formatError(error) }], isError: true };
          }
        }
      );
    }
  • Input validation schema for the get_shorts tool using Zod.
    const schema = {
      requestId: z.string().regex(/^[0-9a-fA-F]{24}$/).describe('The request ID from create_short (24-char hex)'),
    };
  • The client-side method that performs the API call to retrieve shorts.
    async getShorts(requestId) {
      return this._request('GET', `/shorts/${requestId}`);
    }
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses specific return fields (video URLs, AI-generated titles, viral scores, durations) and critical behavioral trait: results are 'sorted by viral score'. Missing error behavior for incomplete requests or invalid IDs.

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 efficient sentences with zero waste. Front-loaded with action ('Retrieve'), followed by scope ('for a completed request'), then return value specification. 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?

No output schema exists, but description compensates by detailing the complete response structure (URLs, titles, scores, durations) and sorting behavior. Lacks only error-state documentation for a fully complete picture.

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 has 100% description coverage (requestId documented as 24-char hex), establishing baseline 3. Description references 'completed request' implying the parameter context but does not add syntax, format, or usage details beyond what the schema provides.

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?

Specific verb 'Retrieve' + resource 'short clips' + scope 'for a completed request'. Clearly distinguishes from sibling create_short (creates vs retrieves) and get_status (gets content vs status).

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?

Implies usage timing with 'completed request', suggesting it should not be used on pending requests. However, lacks explicit guidance to use sibling get_status first to check completion, or explicit when-not-to-use warnings.

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/ssembleinc/ssemble-mcp-server'

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