01Overview
AgentSea includes built-in MCP tools for popular services, allowing your agents to interact with Figma designs and n8n workflows out of the box. These tools are production-ready with built-in retry logic, error handling, and comprehensive validation.
🎨 Figma tools
Interact with Figma files, nodes, images, and comments programmatically
- Get file information & structure
- Retrieve specific nodes by ID
- Export images (PNG, SVG, PDF)
- Read and post comments
- Version control access
⚡ n8n tools
Execute and manage n8n workflows for powerful automation
- Execute workflows with data
- Monitor execution status
- List available workflows
- Trigger webhooks
- Get workflow details
02Figma tools
The Figma tools allow agents to interact with Figma's design files, components, and collaboration features.
Setup
First, obtain a Figma access token from your Figma account settings: go to "Personal Access Tokens", generate a new token, and set it as an environment variable.
export FIGMA_ACCESS_TOKEN="your_figma_token_here"Available Figma tools
figma_get_filefigma_get_nodesfigma_get_imagesfigma_get_commentsfigma_post_commentFigma usage example
import {
Agent,
AnthropicProvider,
ToolRegistry,
figmaGetFileTool,
figmaGetImagesTool,
figmaPostCommentTool,
} from '@lov3kaizen/agentsea-core';
const figmaTools = [figmaGetFileTool, figmaGetImagesTool, figmaPostCommentTool];
const toolRegistry = new ToolRegistry();
toolRegistry.registerMany(figmaTools);
const agent = new Agent(
{
name: 'figma-agent',
description: 'Agent with Figma integration',
model: 'claude-sonnet-4-6',
provider: 'anthropic',
tools: figmaTools,
},
new AnthropicProvider(),
toolRegistry,
);
// Agent can now interact with Figma
const response = await agent.execute(
'Get the Figma file "abc123" and export all frames as PNG images at 2x scale',
context,
);Figma workflow examples
- Design Review Automation: get latest designs, export screenshots, and post feedback comments automatically.
- Asset Pipeline: export design assets, optimize images, and update documentation.
- Version Tracking: monitor design changes, track versions, and notify team members.
03n8n tools
The n8n tools allow agents to execute and manage automation workflows, making it easy to integrate complex business processes.
Setup
Configure your n8n connection:
export N8N_API_KEY="your_n8n_api_key"
export N8N_BASE_URL="https://your-n8n-instance.com"Available n8n tools
n8n_execute_workflown8n_get_executionn8n_list_workflowsn8n_trigger_webhookn8n_get_workflown8n usage example
import {
Agent,
AnthropicProvider,
ToolRegistry,
n8nExecuteWorkflowTool,
n8nListWorkflowsTool,
n8nTriggerWebhookTool,
} from '@lov3kaizen/agentsea-core';
const tools = [n8nExecuteWorkflowTool, n8nListWorkflowsTool, n8nTriggerWebhookTool];
const toolRegistry = new ToolRegistry();
toolRegistry.registerMany(tools);
const agent = new Agent(
{
name: 'automation-agent',
description: 'Agent with n8n workflow automation',
model: 'claude-sonnet-4-6',
provider: 'anthropic',
tools,
},
new AnthropicProvider(),
toolRegistry,
);
// Agent can now execute workflows
const response = await agent.execute(
'Execute the "Data Processing" workflow with this data: {"name": "John", "email": "john@example.com"}',
context,
);n8n workflow examples
- Data Processing Pipeline: trigger workflows to process, transform, and store data automatically.
- Customer Onboarding: execute multi-step onboarding workflows with dynamic data.
- Notification System: trigger webhooks to send notifications across multiple channels.
04Combined workflow example
Use both Figma and n8n tools together to create powerful automation pipelines:
import {
Agent,
AnthropicProvider,
ToolRegistry,
figmaGetFileTool,
figmaGetImagesTool,
figmaPostCommentTool,
n8nTriggerWebhookTool,
} from '@lov3kaizen/agentsea-core';
const tools = [figmaGetFileTool, figmaGetImagesTool, figmaPostCommentTool, n8nTriggerWebhookTool];
const toolRegistry = new ToolRegistry();
toolRegistry.registerMany(tools);
const agent = new Agent(
{
name: 'design-automation',
description: 'Automated design-to-production pipeline',
model: 'claude-sonnet-4-6',
provider: 'anthropic',
tools,
},
new AnthropicProvider(),
toolRegistry,
);
// Multi-step automation
const response = await agent.execute(
`
1. Get the latest version of Figma file "design123"
2. Export the main frame as a high-res PNG
3. Trigger the n8n webhook at "webhook/process-design" with the image URL
4. Post a comment on the Figma file: "Design exported and sent for processing"
`,
context,
);05Error handling and retries
The MCP tools that set a retry policy make up to three attempts in total, including the first call, with exponential backoff. The Figma tools start at a 1000 ms delay and cap it at 10000 ms.
- Max attempts: 3, including the first call
- Backoff strategy: exponential
- Initial delay: 1000 ms
- Max delay: 10000 ms
// Tools automatically retry on failure
try {
const result = await agent.execute(
'Get Figma file and trigger n8n workflow',
context
);
} catch (error) {
// Error after all retries exhausted
console.error('Automation failed:', error.message);
}06Best practices
- Environment variables: always use environment variables for API keys in production.
- Rate limiting: be mindful of API rate limits for both Figma and n8n.
- Webhook security: secure your n8n webhooks with authentication.
- Data validation: validate workflow input data before execution.
- Error monitoring: log and monitor errors for debugging.
- Caching: cache Figma file data when possible to reduce API calls.
- Testing: test n8n workflows independently before integrating with agents.
Note
figma_post_comment or n8n_trigger_webhook call is safe to run twice before you rely on it.07Common use cases
🎨 Design Review Automation
Automatically export designs, process them, and post feedback
📦 Asset Export Pipeline
Export design assets and trigger processing workflows
🔔 Design Change Notifications
Monitor Figma changes and notify stakeholders via n8n
🚀 Automated Deployment
Trigger deployment workflows based on design approvals
📊 Analytics & Reporting
Collect design metrics and generate reports automatically
🔄 Version Synchronization
Keep designs and documentation in sync across tools
08API documentation
For detailed API references, see: