mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-03-21 09:53:08 +00:00
Compare commits
1 Commits
feat/creat
...
claude/fix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5c20de3c2 |
@@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- **`n8n_create_data_table` MCP tool** (Issue #640): Create data tables in n8n via the REST API
|
- **`n8n_create_datatable` MCP tool** (Issue #640): Create data tables in n8n via the REST API
|
||||||
- `N8nApiClient.createDataTable()` calling `POST /data-tables`
|
- `N8nApiClient.createDataTable()` calling `POST /data-tables`
|
||||||
- Zod-validated handler with `N8nApiError` handling for structured error responses
|
- Zod-validated handler with `N8nApiError` handling for structured error responses
|
||||||
- TypeScript interfaces matching the n8n OpenAPI spec (`DataTableColumn`, `DataTableColumnResponse`, `DataTable`)
|
- TypeScript interfaces matching the n8n OpenAPI spec (`DataTableColumn`, `DataTableColumnResponse`, `DataTable`)
|
||||||
@@ -23,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- **Health check management tool count**: Updated from 13 to 14 to include `n8n_create_data_table`
|
- **Health check management tool count**: Updated from 13 to 14 to include `n8n_create_datatable`
|
||||||
|
|
||||||
Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en
|
Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en
|
||||||
|
|
||||||
|
|||||||
@@ -1975,7 +1975,7 @@ export async function handleDiagnostic(request: any, context?: InstanceContext):
|
|||||||
|
|
||||||
// Check which tools are available
|
// Check which tools are available
|
||||||
const documentationTools = 7; // Base documentation tools (after v2.26.0 consolidation)
|
const documentationTools = 7; // Base documentation tools (after v2.26.0 consolidation)
|
||||||
const managementTools = apiConfigured ? 14 : 0; // Management tools requiring API (includes n8n_create_data_table)
|
const managementTools = apiConfigured ? 14 : 0; // Management tools requiring API (includes n8n_create_datatable)
|
||||||
const totalTools = documentationTools + managementTools;
|
const totalTools = documentationTools + managementTools;
|
||||||
|
|
||||||
// Check npm version
|
// Check npm version
|
||||||
|
|||||||
@@ -1496,7 +1496,7 @@ export class N8NDocumentationMCPServer {
|
|||||||
if (!this.repository) throw new Error('Repository not initialized');
|
if (!this.repository) throw new Error('Repository not initialized');
|
||||||
return n8nHandlers.handleDeployTemplate(args, this.templateService, this.repository, this.instanceContext);
|
return n8nHandlers.handleDeployTemplate(args, this.templateService, this.repository, this.instanceContext);
|
||||||
|
|
||||||
case 'n8n_create_data_table':
|
case 'n8n_create_datatable':
|
||||||
this.validateToolParams(name, args, ['name']);
|
this.validateToolParams(name, args, ['name']);
|
||||||
return n8nHandlers.handleCreateDataTable(args, this.instanceContext);
|
return n8nHandlers.handleCreateDataTable(args, this.instanceContext);
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export const toolsDocumentation: Record<string, ToolDocumentation> = {
|
|||||||
n8n_executions: n8nExecutionsDoc,
|
n8n_executions: n8nExecutionsDoc,
|
||||||
n8n_workflow_versions: n8nWorkflowVersionsDoc,
|
n8n_workflow_versions: n8nWorkflowVersionsDoc,
|
||||||
n8n_deploy_template: n8nDeployTemplateDoc,
|
n8n_deploy_template: n8nDeployTemplateDoc,
|
||||||
n8n_create_data_table: n8nCreateDataTableDoc
|
n8n_create_datatable: n8nCreateDataTableDoc
|
||||||
};
|
};
|
||||||
|
|
||||||
// Re-export types
|
// Re-export types
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { ToolDocumentation } from '../types';
|
import { ToolDocumentation } from '../types';
|
||||||
|
|
||||||
export const n8nCreateDataTableDoc: ToolDocumentation = {
|
export const n8nCreateDataTableDoc: ToolDocumentation = {
|
||||||
name: 'n8n_create_data_table',
|
name: 'n8n_create_datatable',
|
||||||
category: 'workflow_management',
|
category: 'workflow_management',
|
||||||
essentials: {
|
essentials: {
|
||||||
description: 'Create a new data table in n8n. Requires n8n enterprise or cloud with the data tables feature enabled.',
|
description: 'Create a new data table in n8n. Requires n8n enterprise or cloud with the data tables feature enabled.',
|
||||||
keyParameters: ['name', 'columns'],
|
keyParameters: ['name', 'columns'],
|
||||||
example: 'n8n_create_data_table({name: "Contacts", columns: [{name: "email", type: "string"}]})',
|
example: 'n8n_create_datatable({name: "Contacts", columns: [{name: "email", type: "string"}]})',
|
||||||
performance: 'Fast (100-300ms)',
|
performance: 'Fast (100-300ms)',
|
||||||
tips: [
|
tips: [
|
||||||
'Available column types: string, number, boolean, date, json',
|
'Available column types: string, number, boolean, date, json',
|
||||||
@@ -27,9 +27,9 @@ export const n8nCreateDataTableDoc: ToolDocumentation = {
|
|||||||
},
|
},
|
||||||
returns: 'Object with id and name of the created data table on success.',
|
returns: 'Object with id and name of the created data table on success.',
|
||||||
examples: [
|
examples: [
|
||||||
'n8n_create_data_table({name: "Orders"}) - Create table without columns',
|
'n8n_create_datatable({name: "Orders"}) - Create table without columns',
|
||||||
'n8n_create_data_table({name: "Contacts", columns: [{name: "email", type: "string"}, {name: "score", type: "number"}]}) - Create table with typed columns',
|
'n8n_create_datatable({name: "Contacts", columns: [{name: "email", type: "string"}, {name: "score", type: "number"}]}) - Create table with typed columns',
|
||||||
'n8n_create_data_table({name: "Events", columns: [{name: "payload", type: "json"}, {name: "occurred_at", type: "date"}]})'
|
'n8n_create_datatable({name: "Events", columns: [{name: "payload", type: "json"}, {name: "occurred_at", type: "date"}]})'
|
||||||
],
|
],
|
||||||
useCases: [
|
useCases: [
|
||||||
'Persist structured workflow data across executions',
|
'Persist structured workflow data across executions',
|
||||||
|
|||||||
@@ -608,7 +608,7 @@ export const n8nManagementTools: ToolDefinition[] = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'n8n_create_data_table',
|
name: 'n8n_create_datatable',
|
||||||
description: 'Create a new data table in n8n. Requires n8n enterprise or cloud with data tables feature.',
|
description: 'Create a new data table in n8n. Requires n8n enterprise or cloud with data tables feature.',
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
|||||||
@@ -1102,10 +1102,10 @@ describe('handlers-n8n-manager', () => {
|
|||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
managementTools: {
|
managementTools: {
|
||||||
count: 13,
|
count: 14,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
totalAvailable: 20,
|
totalAvailable: 21,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -542,8 +542,8 @@ describe('Parameter Validation', () => {
|
|||||||
await expect(server.testExecuteTool('n8n_test_workflow', {}))
|
await expect(server.testExecuteTool('n8n_test_workflow', {}))
|
||||||
.rejects.toThrow('Missing required parameters for n8n_test_workflow: workflowId');
|
.rejects.toThrow('Missing required parameters for n8n_test_workflow: workflowId');
|
||||||
|
|
||||||
await expect(server.testExecuteTool('n8n_create_data_table', {}))
|
await expect(server.testExecuteTool('n8n_create_datatable', {}))
|
||||||
.rejects.toThrow('Missing required parameters for n8n_create_data_table: name');
|
.rejects.toThrow('Missing required parameters for n8n_create_datatable: name');
|
||||||
|
|
||||||
for (const tool of n8nToolsWithRequiredParams) {
|
for (const tool of n8nToolsWithRequiredParams) {
|
||||||
await expect(server.testExecuteTool(tool.name, tool.args))
|
await expect(server.testExecuteTool(tool.name, tool.args))
|
||||||
|
|||||||
Reference in New Issue
Block a user