Skip to content

UDF Attributes#3049

Merged
lesaltzm merged 9 commits into
mainfrom
lesaltzm/attributes
May 28, 2026
Merged

UDF Attributes#3049
lesaltzm merged 9 commits into
mainfrom
lesaltzm/attributes

Conversation

@lesaltzm
Copy link
Copy Markdown
Contributor

@lesaltzm lesaltzm commented Apr 8, 2026

Add initial attribute system for user defined functions
is to expose UDFs as tools invocable from bizchat, i.e this kind of thing:

// CopilotCitation is a platform-defined annotation to handle "MS.PA.CopilotChat.OpenRecord" for the specified entityname (or sharepoint table name?)
// This also lets us populate metadata at publish time to say an app supports OpenRecord for Tables A and C, even if it has references to all of tables A-D.
[CopilotCitation(Suppliers)]
NavigateToSupplier(
recordId: Guid
): Void =
{
Set(selectedSupplier, Lookup(Suppliers, id = recordId));
Navigate(SuppliersScreen);
};
// CopilotTool defines arbitrary "MCP-like" tool udfs
[CopilotTool("Call this tool to show a happy face in the app or get some data",
"arg1 description",
"arg2 description")]
DoAThing(arg1: Number, arg2: Text): Text =
{
If(arg1 > 20,
Navigate(HappyFaceScreen),
ServiceFunction.CallThatReturnsText(arg1, args)
);
};

Comment thread src/tests/Microsoft.PowerFx.Core.Tests.Shared/PublicSurfaceTests.cs Outdated
@jas-valgotar
Copy link
Copy Markdown
Contributor

✅ No public API change.

@jas-valgotar
Copy link
Copy Markdown
Contributor

✅ No public API change.

@lesaltzm lesaltzm changed the title [DRAFT] UDF Attributes UDF Attributes May 20, 2026
@lesaltzm lesaltzm marked this pull request as ready for review May 20, 2026 21:34
@lesaltzm lesaltzm requested a review from a team as a code owner May 20, 2026 21:34
@jas-valgotar
Copy link
Copy Markdown
Contributor

✅ No public API change.

@lesaltzm lesaltzm force-pushed the lesaltzm/attributes branch from f24dd61 to 949cf5b Compare May 20, 2026 22:15
@jas-valgotar
Copy link
Copy Markdown
Contributor

✅ No public API change.

@jas-valgotar
Copy link
Copy Markdown
Contributor

✅ No public API change.

@lesaltzm lesaltzm enabled auto-merge (squash) May 28, 2026 15:53
@lesaltzm lesaltzm merged commit 9766f1f into main May 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants