Skip to main content
Glama

create_draft

Create a new video editing project draft in JianYing (CapCut) with customizable resolution and frame rate settings for professional video production workflows.

Instructions

创建草稿

Args: draft_name: str 草稿名称 width: int,视频宽度,默认1920 height: int,视频高度,默认1080 fps: int,帧率,默认30

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
draft_nameYes
widthNo
heightNo
fpsNo

Implementation Reference

  • The handler function for the 'create_draft' MCP tool. It is decorated with @mcp.tool() and implements the creation of a new draft by generating a UUID, creating a directory, saving draft.json, updating index, and returning draft data.
    @mcp.tool()
    def create_draft(draft_name: str, width: int = 1920, height: int = 1080, fps: int = 30):
        """
        创建草稿
    
        Args:
            draft_name:  str 草稿名称
            width: int,视频宽度,默认1920
            height: int,视频高度,默认1080
            fps: int,帧率,默认30
        """
        # 验证SAVE_PATH是否存在
        if not os.path.exists(SAVE_PATH):
            raise FileNotFoundError(f"草稿存储路径不存在: {SAVE_PATH}")
        # 生成草稿ID
        draft_id = str(uuid.uuid4())
        # 构建完整的草稿路径
        draft_path = os.path.join(SAVE_PATH, draft_id)
        # 创建草稿数据
        draft_data = {
            "draft_id": draft_id,
            "draft_name": draft_name,
            "width": width,
            "height": height,
            "fps": fps
        }
        # 在SAVE_PATH下创建以草稿ID命名的文件夹
        os.makedirs(draft_path, exist_ok=True)
    
        # 保存draft.json文件
        draft_json_path = os.path.join(draft_path, "draft.json")
        with open(draft_json_path, "w", encoding="utf-8") as f:
            json.dump(draft_data, f, ensure_ascii=False, indent=4)
    
        # 添加草稿索引记录
    
        draft_info = {
            "draft_name": draft_name,
            "created_time": datetime.datetime.now().isoformat(),
            "width": width,
            "height": height,
            "fps": fps
        }
        index_manager.add_draft_mapping(draft_id, draft_info)
    
        return draft_data
  • Registers the draft-related tools, including 'create_draft', by invoking draft_tools(mcp) in the MCP server main function.
    draft_tools(mcp)
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states '创建草稿' (create draft) which implies a write/mutation operation, but doesn't disclose behavioral traits like whether this is idempotent, what permissions are needed, what happens on failure, or what the return value contains. The parameter defaults are mentioned, but no other behavioral context is provided.

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 appropriately sized with a clear purpose statement followed by parameter explanations. The structure with 'Args:' section is helpful. While efficient, the Chinese-only text might limit accessibility in multilingual contexts, but the content itself is well-organized.

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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It explains parameters adequately but doesn't address critical behavioral aspects like what happens after creation, error conditions, or how the created draft integrates with other tools. The lack of output information is particularly problematic for a creation tool.

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

Parameters4/5

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

With 0% schema description coverage, the description compensates well by explaining all 4 parameters in Chinese: draft_name (草稿名称), width (视频宽度), height (视频高度), and fps (帧率). It provides default values and clarifies that draft_name is required while others have defaults. This adds significant meaning beyond the bare schema.

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 states '创建草稿' (create draft) which is a clear verb+resource, but it's vague about what type of draft is being created (video draft based on parameters) and doesn't distinguish from sibling tools like 'create_track' or 'export_draft'. The purpose is understandable but lacks specificity about the resource domain.

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?

No guidance is provided about when to use this tool versus alternatives. The description doesn't mention prerequisites, when this should be called in a workflow, or how it relates to sibling tools like 'create_track' or 'export_draft'. Only basic parameter information is given without context.

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/hey-jian-wei/jianying-mcp'

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