ayphic-mcp-server 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +38 -3
  2. package/package.json +4 -1
package/index.js CHANGED
@@ -281,7 +281,7 @@ const MCP_TOOLS = [
281
281
  properties: {
282
282
  code: {
283
283
  type: 'string',
284
- description: 'REQUIRED: Full Remotion React component code (export const GeneratedMotion = (props) => { const frame = Remotion.useCurrentFrame(); const { fps = 30 } = Remotion.useVideoConfig(); ... return <div style={{...}}>...</div>; }). Use Remotion hooks and inline CSS styling.'
284
+ description: 'REQUIRED: Full Remotion React component code (export const GeneratedMotion = (props) => { const frame = Remotion.useCurrentFrame(); const { fps = 30 } = Remotion.useVideoConfig(); const { title = "Default", primaryColor = "#007AFF" } = props?.style || props || {}; ... return <div style={{...}}>...</div>; }). Use Remotion hooks, props for customizable values, and inline CSS styling.'
285
285
  },
286
286
  configSchema: {
287
287
  type: 'array',
@@ -608,12 +608,47 @@ async function executeAyphicTool(toolName, params) {
608
608
 
609
609
  const data = await response.json();
610
610
  const isError = data.success === false || data.applied === false || !!data.error;
611
+
612
+ if (isError) {
613
+ const errorMsg = data.error || data.message || 'Tool execution failed';
614
+ return {
615
+ isError: true,
616
+ content: [
617
+ {
618
+ type: 'text',
619
+ text: `Error: ${errorMsg}`
620
+ }
621
+ ]
622
+ };
623
+ }
624
+
625
+ // For get_timeline, return the structured timeline data
626
+ if (resolvedToolName === 'get_timeline' || resolvedToolName === 'getTimeline') {
627
+ return {
628
+ isError: false,
629
+ content: [
630
+ {
631
+ type: 'text',
632
+ text: JSON.stringify(data, null, 2)
633
+ }
634
+ ]
635
+ };
636
+ }
637
+
638
+ // For all action/editing tools, return concise summary
639
+ const summaryMsg = data.message || `Successfully executed ${cleanName}`;
640
+ const resultObj = {
641
+ success: true,
642
+ message: summaryMsg,
643
+ ...(data.element ? { element: data.element } : {})
644
+ };
645
+
611
646
  return {
612
- isError,
647
+ isError: false,
613
648
  content: [
614
649
  {
615
650
  type: 'text',
616
- text: JSON.stringify(data, null, 2)
651
+ text: JSON.stringify(resultObj, null, 2)
617
652
  }
618
653
  ]
619
654
  };
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "ayphic-mcp-server",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Model Context Protocol (MCP) Server for Ayphic AI Video Editor",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "bin": {
8
8
  "ayphic-mcp": "./index.js"
9
9
  },
10
+ "files": [
11
+ "index.js"
12
+ ],
10
13
  "scripts": {
11
14
  "start": "node index.js"
12
15
  },