Skip to main content
Glama
DumplingAI

Dumpling AI MCP Server

Official
by DumplingAI

trim-video

Cut video clips to specific start and end timestamps using a URL. Specify exact time ranges in HH:MM:SS format to extract segments.

Instructions

Trim videos to a specific duration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
videoUrlYesURL of the video
startTimestampYesStart time in HH:MM:SS
endTimestampYesEnd time in HH:MM:SS

Implementation Reference

  • Handler function that proxies the trim-video request to the external Dumpling AI API endpoint, authenticates with API key, and returns the response as MCP content.
    async ({ videoUrl, startTimestamp, endTimestamp }) => {
      const apiKey = process.env.DUMPLING_API_KEY;
      if (!apiKey) throw new Error("DUMPLING_API_KEY not set");
      const response = await fetch(`${NWS_API_BASE}/api/v1/trim-video`, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          Authorization: `Bearer ${apiKey}`,
        },
        body: JSON.stringify({
          videoUrl,
          startTimestamp,
          endTimestamp,
          requestSource: "mcp",
        }),
      });
      if (!response.ok)
        throw new Error(`Failed: ${response.status} ${await response.text()}`);
      const data = await response.json();
      return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
    }
  • Zod schema defining the input parameters for the trim-video tool: video URL and start/end timestamps.
    {
      videoUrl: z.string().url().describe("URL of the video"),
      startTimestamp: z.string().describe("Start time in HH:MM:SS"),
      endTimestamp: z.string().describe("End time in HH:MM:SS"),
    },
  • src/index.ts:622-651 (registration)
    Registration of the 'trim-video' tool using server.tool(), including name, description, input schema, and handler function.
    server.tool(
      "trim-video",
      "Trim videos to a specific duration.",
      {
        videoUrl: z.string().url().describe("URL of the video"),
        startTimestamp: z.string().describe("Start time in HH:MM:SS"),
        endTimestamp: z.string().describe("End time in HH:MM:SS"),
      },
      async ({ videoUrl, startTimestamp, endTimestamp }) => {
        const apiKey = process.env.DUMPLING_API_KEY;
        if (!apiKey) throw new Error("DUMPLING_API_KEY not set");
        const response = await fetch(`${NWS_API_BASE}/api/v1/trim-video`, {
          method: "POST",
          headers: {
            "Content-Type": "application/json",
            Authorization: `Bearer ${apiKey}`,
          },
          body: JSON.stringify({
            videoUrl,
            startTimestamp,
            endTimestamp,
            requestSource: "mcp",
          }),
        });
        if (!response.ok)
          throw new Error(`Failed: ${response.status} ${await response.text()}`);
        const data = await response.json();
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'trims videos' but doesn't reveal critical behaviors: whether this is a destructive operation (overwrites original), requires specific permissions, has rate limits, or what the output looks like (e.g., returns a new video URL). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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?

The description is extremely concise (5 words) and front-loaded, stating the core purpose immediately with zero wasted words. Every element earns its place, making it easy for an agent to parse quickly while scanning tool lists.

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 tool's complexity (video processing mutation), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like side effects, output format, error conditions, or usage context. For a tool that modifies media, this leaves the agent with insufficient information to use it correctly and safely.

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%, with all three parameters clearly documented in the schema. The description adds no additional parameter semantics beyond implying duration trimming via start/end timestamps. This meets the baseline score of 3 since the schema does the heavy lifting, but the description doesn't enhance understanding of parameter usage or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('trim') and resource ('videos'), and specifies the action ('to a specific duration'). It distinguishes itself from sibling tools like 'extract-video' or 'extract-audio' by focusing on duration modification rather than extraction. However, it doesn't explicitly differentiate from all siblings, leaving some ambiguity about when to choose this over other video-related tools.

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 prerequisites (e.g., video format compatibility), when not to use it, or how it compares to sibling tools like 'extract-video'. The agent must infer usage from the purpose alone, which is insufficient for optimal tool selection.

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/DumplingAI/mcp-server-dumplingai'

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