architecture.mcp-tools
Skill43 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.
In this repository9 other files it gives its agents.
- agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- datafactory-tipsSkill
- builder.datafactorySkill
- coder.datafactory-styleSkill
- datafactory.architectureSkill
- devops.fabric-mcp-integrationSkill
- tester.testing-patternsSkill
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
- Distinctive: line 12
Every new MCP capability follows the Tool → Service → Model pattern:
- Very specific: line 27
Create request/response DTOs in Models/.
- Very specific: line 31
Add to Abstractions/. The interface defines what operations are available.
- Very specific: line 35
Create in Services/. Follow existing services as examples:
- Very specific: line 42
Use AuthenticationService for token management
- Very specific: line 48
Create in Tools/. Follow existing tools as examples:
- Very specific: line 65
Add xUnit tests in DataFactory.MCP.Tests/:
- Distinctive: line 67
Test service response parsing
- Distinctive: line 68
Test error handling paths
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
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 operationsFabricConnectionService.cs— Connection managementFabricDataflowService.cs— Dataflow operations
Key patterns:
- Inject
HttpClient(configured with auth handler) - Use
AuthenticationServicefor 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 toolsConnectionsTool.cs— Tools with UI resourcesDataflow/— 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 File | Service | Capability |
AuthenticationTool.cs | AuthenticationService | Azure AD auth flows |
GatewayTool.cs | FabricGatewayService | Gateway CRUD |
ConnectionsTool.cs | FabricConnectionService | Connection management |
WorkspacesTool.cs | FabricWorkspaceService | Workspace listing |
CapacityTool.cs | FabricCapacityService | Capacity management |
Dataflow/ | FabricDataflowService | Dataflow operations |
Pipeline/ | FabricPipelineService | Pipeline management |
CopyJob/ | FabricCopyJobService | Copy job management |
CreateConnectionUITool.cs | FabricConnectionService | UI 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.
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.

