feat(Microsoft Excel SharePoint Node): Enable use as an AI agent tool (no-changelog) (#34592)

This commit is contained in:
Stephen Wright
2026-07-24 10:32:57 +00:00
committed by GitHub
parent da0de05058
commit ecd09aa09d
2 changed files with 23 additions and 2 deletions
@@ -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: [
@@ -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+/);
}
}
});
});