fabric-data-agent
Skill646 starsChanged 38 days agoMITView on GitHub
Call a published Fabric data agent from a Universal App through a Rayfin function using application auth and MCP streamable HTTP. Use when the request names a Fabric data agent, data-agent MCP endpoint, or asks to chat with governed Fabric data through an app.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- kimtth/ms-fabric-skills-dev-startertheir own version, first seen May 18, 2026
- PatrickGallucci/fabric-skillstheir own version, first seen Feb 10, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- PatrickGallucci/fabric-skills★ 17same name
- kimtth/ms-fabric-skills-dev-starter★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository76 other files it gives its agents.
- common/config/typedoc/AGENTS.mdAGENTS.md
- docs/site/AGENTS.mdAGENTS.md
- .github/skills/react-best-practices/AGENTS.mdAGENTS.md
- packages/docgen/AGENTS.mdAGENTS.md
- packages/guide/AGENTS.mdAGENTS.md
- packages/host-docs/AGENTS.mdAGENTS.md
- packages/tools/AGENTS.mdAGENTS.md
- packages/tools/cli/AGENTS.mdAGENTS.md
- packages/tools/cli/assets/agent-files/AGENTS.mdAGENTS.md
- packages/tools/common/AGENTS.mdAGENTS.md
- packages/tools/docs-lib/AGENTS.mdAGENTS.md
- packages/tools/mcp/AGENTS.mdAGENTS.md
- packages/tools/vscode/AGENTS.mdAGENTS.md
- packages/typescript-sdk/AGENTS.mdAGENTS.md
- packages/typescript-sdk/auth/AGENTS.mdAGENTS.md
- packages/typescript-sdk/core/AGENTS.mdAGENTS.md
- packages/typescript-sdk/data/AGENTS.mdAGENTS.md
- packages/typescript-sdk/storage/AGENTS.mdAGENTS.md
- packages/udf/udf-worker-extension/AGENTS.mdAGENTS.md
- samples/data-app/AGENTS.mdAGENTS.md
- samples/getting-started-auth/AGENTS.mdAGENTS.md
- samples/notes-app/AGENTS.mdAGENTS.md
- samples/todo-app/AGENTS.mdAGENTS.md
- samples/universal-app/template/AGENTS.mdAGENTS.md
- samples/welcome-app-react-auth/AGENTS.mdAGENTS.md
- samples/welcome-app-react-no-auth/AGENTS.mdAGENTS.md
- samples/welcome-app-typescript/AGENTS.mdAGENTS.md
- hotfix-releaseSkill
- launch-vscode-extensionSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-bulk-archive-changeSkill
- openspec-continue-changeSkill
- openspec-exploreSkill
- openspec-ff-changeSkill
- openspec-new-changeSkill
- openspec-onboardSkill
- openspec-sync-specsSkill
- openspec-verify-changeSkill
- privacy-dfdSkill
- rayfin-cli-uxSkill
- vercel-react-best-practicesSkill
- react-clean-architectureSkill
- run-cli-e2e-locallySkill
- vscode-react-webview-architectureSkill
- vscode-webview-trpc-messagingSkill
- rayfin-connectorsSkill
- rayfin-functionsSkill
- rayfinSkill
- rayfin-storageSkill
- rayfin-getting-startedSkill
- app-designSkill
- app-validationSkill
- dax-authoringSkill
- fabric-cliSkill
- fabric-sdkSkill
- playwright-cliSkill
- query-designSkill
- schema-discoverySkill
- visualsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Use a Rayfin function so the Fabric access token remains server-side.
- Very specific: line 13
Read functions-capability and apply its pack before implementing this workflow.
- Distinctive: line 19
Do not substitute the legacy OpenAI-style endpoint.
- Very specific: line 26
Use ctx.Tokens.Fabric, not an API key or service-principal secret.
- Distinctive: line 30
Import the Fabric audience and context from the functions runtime:
- Distinctive: line 62
Never return it to the browser or write it to application logs.
- Very specific: line 75
Treat Mcp-Session-Id as optional.
- Distinctive: line 91
Do not log questions, answers, bearer tokens, provider bodies, or sensitive exceptions.
- Distinctive: line 104
Do not make an extended timeout the default for every app operation.
- Distinctive: line 105
If needed, isolate the workaround to a dedicated data-agent client and document that the full platform execution duration remains to be …
- Very specific: line 108
Do not return from the UDF and expect work to continue in the background.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fabric data agent
Use a Rayfin function so the Fabric access token remains server-side.
Read functions-capability and apply its pack before implementing this
workflow.
Required input
Obtain the published data-agent MCP endpoint. Do not substitute the legacy OpenAI-style endpoint. The published endpoint has this shape:
https://api.fabric.microsoft.com/v1/mcp/workspaces/{workspaceId}/dataagents/{dataAgentId}/agentUse ctx.Tokens.Fabric, not an API key or service-principal secret.
Fabric access token
Import the Fabric audience and context from the functions runtime:
import {
AudienceType,
UserDataFunctions,
type RayfinContext,
} from '@microsoft/fabric-user-data-functions';
const udf = new UserDataFunctions();
udf.func(
'askFabricDataAgent',
async (
ctx: RayfinContext<AppSchema, AudienceType.Fabric>,
question: string
): Promise<DataAgentResult> => {
const token: string = ctx.Tokens.Fabric;
// Perform the MCP exchange and return only the bounded result.
},
[] // the audience in the annotation is the declaration
);The audience union on the context annotation is what registers the connection —
declare it there, written literally as AudienceType.Fabric, and read the token
as ctx.Tokens.Fabric.
Requesting an audience the annotation does not declare is a compile error.
ctx.getToken(...) is deprecated and flagged by
@typescript-eslint/no-deprecated.
Send the token only in the server-side Authorization: Bearer <token> header.
Never return it to the browser or write it to application logs.
The deployed function accesses the data agent using the app identity's permissions.
MCP exchange
The function performs this sequence:
- Send
initialize. - Send
notifications/initialized. - Call
tools/list. - Discover the advertised tool and its question argument.
- Call
tools/call.
Treat Mcp-Session-Id as optional.
Forward it when supplied, but do not fail initialization when it is absent.
Parse successful bodies according to their content type.
Support JSON and server-sent events for JSON-RPC responses.
Accept a non-JSON acknowledgement such as plain-text Accepted without trying
to parse it as JSON.
Use
references/mcp-streamable-http.md
as the reusable transport reference.
Copy and adapt the helper into the functions source only for a data-agent
scenario.
The general functions pack deliberately does not seed MCP code into every app.
Bound the question and the answer returned to the browser. Do not log questions, answers, bearer tokens, provider bodies, or sensitive exceptions.
Long-running behavior
The function's outbound MCP deadline and the browser's wait for the function invocation are independent. Both must accommodate the operation.
Show a visible progress state explaining that a data-agent response may take up to 10 minutes. The current frontend SDK has a client-wide timeout rather than a per-invocation timeout. Do not make an extended timeout the default for every app operation. If needed, isolate the workaround to a dedicated data-agent client and document that the full platform execution duration remains to be verified.
Do not return from the UDF and expect work to continue in the background.
The current MCP tools/call is one awaited request.
A start-and-poll design requires a durable operation ID from the downstream
service or an app-owned queue, worker, and result store.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

