getSupportedFormats
Lists compatible video formats and codecs for editing operations in the Video Clip MCP server, helping users prepare files for clipping, merging, or splitting.
Instructions
获取支持的视频格式和编码
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp/server.ts:408-422 (handler)The handler function that implements the core logic of the getSupportedFormats tool. It constructs a result object containing arrays of supported video formats, codecs, and audio codecs by using Object.values on the respective enums, then returns it wrapped in the MCP response format as JSON text.private async handleGetSupportedFormats() { const result: MCPToolResults['getSupportedFormats'] = { videoFormats: Object.values(VideoFormat), videoCodecs: Object.values(VideoCodec), audioCodecs: Object.values(AudioCodec) }; return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/mcp/server.ts:303-310 (registration)Registration of the getSupportedFormats tool in the list returned by ListToolsRequestHandler. Defines the tool name, description, and input schema (empty object since no parameters are required).{ name: 'getSupportedFormats', description: '获取支持的视频格式和编码', inputSchema: { type: 'object', properties: {} } },
- src/types/mcp.ts:59-63 (schema)TypeScript interface definition for the output result of the getSupportedFormats tool in MCPToolResults.getSupportedFormats: { videoFormats: string[]; videoCodecs: string[]; audioCodecs: string[]; };
- src/types/mcp.ts:36-36 (schema)TypeScript type definition for the input parameters of the getSupportedFormats tool in MCPToolParams, indicating no parameters are required.getSupportedFormats: Record<string, never>;
- src/mcp/server.ts:81-82 (registration)Dispatch case in the CallToolRequestHandler switch statement that routes calls to the getSupportedFormats handler.case 'getSupportedFormats': return await this.handleGetSupportedFormats();