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)}` });
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states what the tool does but doesn't describe important behavioral traits like whether it returns structured data or raw output, if it's idempotent, what happens if no script was executed, or any error conditions. The description is functional but lacks operational context.

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 a single, efficient sentence that directly states the tool's purpose without any wasted words. It's appropriately sized for a zero-parameter tool and front-loads the essential information about what the tool does.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has zero parameters and no output schema, the description provides the basic purpose but lacks important context about what 'results' means (structured data? error messages? execution logs?) and how this interacts with sibling tools like 'run-script'. For a tool that presumably retrieves output from script execution, more detail about the nature of the results would be helpful.

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?

The tool has zero parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't discuss parameters since none exist, maintaining focus on the tool's purpose rather than unnecessary parameter explanations.

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 action ('Get results') and the resource ('from the last script executed in After Effects'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'run-script' or 'test-animation' which might also relate to script execution.

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 minimal guidance by implying this tool should be used after a script execution, but it doesn't specify when to use it versus alternatives like checking script status or retrieving intermediate results. No explicit when/when-not instructions or alternative tool references are included.

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

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