From ecd09aa09d234b09f37e187a2e814dfea81babd0 Mon Sep 17 00:00:00 2001 From: Stephen Wright Date: Fri, 24 Jul 2026 11:32:57 +0100 Subject: [PATCH] feat(Microsoft Excel SharePoint Node): Enable use as an AI agent tool (no-changelog) (#34592) --- .../MicrosoftExcelSharePoint.node.ts | 3 +++ .../MicrosoftExcelSharePoint.node.test.ts | 22 +++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/nodes/Microsoft/ExcelSharePoint/MicrosoftExcelSharePoint.node.ts b/packages/nodes-base/nodes/Microsoft/ExcelSharePoint/MicrosoftExcelSharePoint.node.ts index 228baf527fe..ec88bccd1ac 100644 --- a/packages/nodes-base/nodes/Microsoft/ExcelSharePoint/MicrosoftExcelSharePoint.node.ts +++ b/packages/nodes-base/nodes/Microsoft/ExcelSharePoint/MicrosoftExcelSharePoint.node.ts @@ -41,6 +41,9 @@ export class MicrosoftExcelSharePoint implements INodeType { inputs: [NodeConnectionTypes.Main], outputs: [NodeConnectionTypes.Main], hidden: true, + // The generated Tool variant inherits `hidden`, so both stay out of the + // panel until launch; removing `hidden` exposes node and tool together. + usableAsTool: true, // Legacy credentials deliberately excluded: the SharePoint one targets // the old _api host (not Graph); the Excel one has no Sites.* scopes. credentials: [ diff --git a/packages/nodes-base/nodes/Microsoft/ExcelSharePoint/test/MicrosoftExcelSharePoint.node.test.ts b/packages/nodes-base/nodes/Microsoft/ExcelSharePoint/test/MicrosoftExcelSharePoint.node.test.ts index ea50dfffa1b..f3cf92a4ed3 100644 --- a/packages/nodes-base/nodes/Microsoft/ExcelSharePoint/test/MicrosoftExcelSharePoint.node.test.ts +++ b/packages/nodes-base/nodes/Microsoft/ExcelSharePoint/test/MicrosoftExcelSharePoint.node.test.ts @@ -20,8 +20,26 @@ describe('MicrosoftExcelSharePoint (hidden shell)', () => { expect(node.description.displayName).not.toBe(oneDriveNode.description.displayName); }); - it('should not be exposed as an AI tool yet', () => { + it('should be exposed as an AI tool', () => { expect(node.description.version).toBe(1); - expect(node.description.usableAsTool).toBeUndefined(); + expect(node.description.usableAsTool).toBe(true); + }); + + it('describes every operation for a model choosing between tools', () => { + const operationProperties = node.description.properties.filter( + (property) => property.name === 'operation', + ); + + expect(operationProperties.length).toBeGreaterThan(0); + for (const property of operationProperties) { + for (const option of property.options ?? []) { + if (!('value' in option)) continue; + expect(option.description, `operation ${String(option.value)}`).toMatch(/\w+/); + expect( + (option as { action?: string }).action, + `operation ${String(option.value)} action`, + ).toMatch(/\w+/); + } + } }); });