agentleFS
MicrosoftKnown publishermicrosoft/DataFactory.MCP/.github/skills/architecture.mcp-tools/SKILL.md

architecture.mcp-tools

Skill47 starsChanged 7 months agoMITView on GitHub

Patterns for adding new MCP tools, services, and models to DataFactory.MCP. Use when adding new Fabric API integrations or MCP capabilities.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every new MCP capability follows the Tool → Service → Model pattern:

    line 12
  2. Very specific:

    Create request/response DTOs in Models/.

    line 27
  3. Very specific:

    Add to Abstractions/. The interface defines what operations are available.

    line 31
  4. Very specific:

    Create in Services/. Follow existing services as examples:

    line 35
  5. Very specific:

    Use AuthenticationService for token management

    line 42
  6. Very specific:

    Create in Tools/. Follow existing tools as examples:

    line 48
  7. Very specific:

    Add xUnit tests in DataFactory.MCP.Tests/:

    line 65
  8. Distinctive:

    Test service response parsing

    line 67
  9. Distinctive:

    Test error handling paths

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Adding MCP Tools — Patterns

For the full architecture, see docs/ARCHITECTURE.md.

Overview

Every new MCP capability follows the Tool → Service → Model pattern:

1. Define Models       (DataFactory.MCP.Core/Models/)
2. Define Interface    (DataFactory.MCP.Core/Abstractions/)
3. Implement Service   (DataFactory.MCP.Core/Services/)
4. Implement Tool      (DataFactory.MCP.Core/Tools/)
5. Register in DI      (DataFactory.MCP.Core/Extensions/)
6. Add Tests           (DataFactory.MCP.Tests/)

Step-by-Step

1. Models — Define data shapes

Create request/response DTOs in Models/. Keep them as pure data containers — no business logic.

2. Interface — Define the service contract

Add to Abstractions/. The interface defines what operations are available.

3. Service — Implement Fabric API calls

Create in Services/. Follow existing services as examples:

  • FabricGatewayService.cs — Gateway CRUD operations
  • FabricConnectionService.cs — Connection management
  • FabricDataflowService.cs — Dataflow operations

Key patterns:

  • Inject HttpClient (configured with auth handler)
  • Use AuthenticationService for token management
  • Return strongly-typed models
  • Handle HTTP errors gracefully

4. Tool — Implement MCP interface

Create in Tools/. Follow existing tools as examples:

  • GatewayTool.cs — Simple CRUD tools
  • ConnectionsTool.cs — Tools with UI resources
  • Dataflow/ — Complex multi-tool directory

Key patterns:

  • Define tool name, description, and JSON schema for parameters
  • Validate inputs before calling service
  • Format responses for MCP protocol
  • Handle auth-not-ready state

5. DI Registration

Register new services and tools in Extensions/ so they're available at runtime.

6. Tests

Add xUnit tests in DataFactory.MCP.Tests/:

  • Test parameter validation
  • Test service response parsing
  • Test error handling paths

Existing Tools Reference

Tool FileServiceCapability
AuthenticationTool.csAuthenticationServiceAzure AD auth flows
GatewayTool.csFabricGatewayServiceGateway CRUD
ConnectionsTool.csFabricConnectionServiceConnection management
WorkspacesTool.csFabricWorkspaceServiceWorkspace listing
CapacityTool.csFabricCapacityServiceCapacity management
Dataflow/FabricDataflowServiceDataflow operations
Pipeline/FabricPipelineServicePipeline management
CopyJob/FabricCopyJobServiceCopy job management
CreateConnectionUITool.csFabricConnectionServiceUI wizard for connections

Feature Flags

Some tools are gated behind feature flags (e.g., Pipeline, CopyJob, DataflowQuery). Check Configuration/ for how feature flags control tool registration.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.