Skip to main content
Glama

openart_generate_video

Create a video of an OpenArt character speaking a provided script. Specify character, script, and aspect ratio to generate spoken animation.

Instructions

Generate a video using an existing OpenArt character speaking a script.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
character_idYes
scriptYesWhat the character says
aspect_ratioNo

Implementation Reference

  • The `generateVideo` function implements the core logic for the openart_generate_video tool. It navigates to the character's page, fills in the script, optionally selects aspect ratio, clicks Generate, waits for a video-id, and returns the job ID with status 'queued'.
    export async function generateVideo(params: {
      character_id: string;
      script: string;
      aspect_ratio?: "9:16" | "16:9" | "1:1";
    }): Promise<Video> {
      const page = await newPage();
      try {
        await page.goto(`${BASE_URL}/character/${params.character_id}`);
        await page.waitForLoadState("networkidle");
    
        // TODO: real selectors.
        await page.locator('button:has-text("Add a script")').click();
        await page.locator('textarea[name="script"]').fill(params.script);
        if (params.aspect_ratio) {
          await page.locator(`[data-aspect-ratio="${params.aspect_ratio}"]`).click();
        }
        await page.locator('button:has-text("Generate")').click();
    
        // Wait for job ID to appear in URL or DOM
        await page.waitForSelector('[data-video-id]', { timeout: 60_000 });
        const videoId = await page.locator('[data-video-id]').first().getAttribute("data-video-id") || "";
    
        return {
          id: videoId,
          status: "queued",
        };
      } finally {
        await page.close();
      }
    }
  • Registration of the openart_generate_video tool with its inputSchema defining required parameters (character_id, script) and optional aspect_ratio enum (9:16, 16:9, 1:1).
    name: "openart_generate_video",
    description: "Generate a video using an existing OpenArt character speaking a script.",
    inputSchema: {
      type: "object",
      properties: {
        character_id: { type: "string" },
        script: { type: "string", description: "What the character says" },
        aspect_ratio: { type: "string", enum: ["9:16", "16:9", "1:1"] },
      },
      required: ["character_id", "script"],
    },
    annotations: { destructiveHint: false, openWorldHint: true },
  • src/index.ts:106-113 (registration)
    The switch-case in the CallToolRequestSchema handler that routes 'openart_generate_video' to the generateVideo function, with Zod parsing for validation.
    case "openart_generate_video":
      result = await generateVideo(
        z.object({
          character_id: z.string(),
          script: z.string(),
          aspect_ratio: z.enum(["9:16", "16:9", "1:1"]).optional(),
        }).parse(args)
      );
Behavior3/5

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

Annotations indicate no destructiveness but potential side effects; description accurately states generation but does not disclose async behavior or result information. Adequate but not enhanced.

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?

A single, concise sentence effectively communicates the tool's core function with no unnecessary words.

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

Completeness3/5

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

Given the presence of sibling 'openart_get_video_status', the description should mention async generation. It also omits return format or success conditions, leaving gaps for 3-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 33% (description only on 'script'). The tool description does not add meaning to 'character_id' or 'aspect_ratio' beyond the schema, failing to compensate for the low 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 clearly states the action 'generate a video' using an existing OpenArt character and script, which distinguishes it from siblings like 'openart_create_character' and 'openart_get_character'.

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?

No explicit when-to-use or when-not-to-use guidance is provided. The purpose implies usage for video generation from a character and script, but lacks alternatives or prerequisites.

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/jbertus/openart-mcp'

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