Skip to main content
Glama

get-results

Retrieve output data from the most recent script executed in Adobe After Effects using MCP server integration, streamlining post-processing workflows.

Instructions

Get results from the last script executed in After Effects

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:282-309 (registration)
    Registration of the "get-results" MCP tool, including the inline async handler function and empty input schema ({}).
    server.tool( "get-results", "Get results from the last script executed in After Effects", {}, async () => { try { const result = readResultsFromTempFile(); return { content: [ { type: "text", text: result } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting results: ${String(error)}` } ], isError: true }; } } );
  • Inline handler function for the "get-results" tool that calls readResultsFromTempFile() to retrieve results and returns them as text content, with error handling.
    async () => { try { const result = readResultsFromTempFile(); return { content: [ { type: "text", text: result } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting results: ${String(error)}` } ], isError: true }; }
  • Helper function readResultsFromTempFile() that reads the 'ae_mcp_result.json' file from the system temp directory, checks if it's stale (older than 30s), logs debug info, and returns the content as string or error/warning JSON.
    function readResultsFromTempFile(): string { try { const tempFilePath = path.join(process.env.TEMP || process.env.TMP || '', 'ae_mcp_result.json'); // Add debugging info console.error(`Checking for results at: ${tempFilePath}`); if (fs.existsSync(tempFilePath)) { // Get file stats to check modification time const stats = fs.statSync(tempFilePath); console.error(`Result file exists, last modified: ${stats.mtime.toISOString()}`); const content = fs.readFileSync(tempFilePath, 'utf8'); console.error(`Result file content length: ${content.length} bytes`); // If the result file is older than 30 seconds, warn the user const thirtySecondsAgo = new Date(Date.now() - 30 * 1000); if (stats.mtime < thirtySecondsAgo) { console.error(`WARNING: Result file is older than 30 seconds. After Effects may not be updating results.`); return JSON.stringify({ warning: "Result file appears to be stale (not recently updated).", message: "This could indicate After Effects is not properly writing results or the MCP Bridge Auto panel isn't running.", lastModified: stats.mtime.toISOString(), originalContent: content }); } return content; } else { console.error(`Result file not found at: ${tempFilePath}`); return JSON.stringify({ error: "No results file found. Please run a script in After Effects first." }); } } catch (error) { console.error("Error reading results file:", error); return JSON.stringify({ error: `Failed to read results: ${String(error)}` }); } }

Other Tools

Related 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/Dakkshin/after-effects-mcp'

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