CyberdyneDevelopment.Mc3Po.Tools.Abstractions
0.1.0-preview.6
dotnet add package CyberdyneDevelopment.Mc3Po.Tools.Abstractions --version 0.1.0-preview.6
NuGet\Install-Package CyberdyneDevelopment.Mc3Po.Tools.Abstractions -Version 0.1.0-preview.6
<PackageReference Include="CyberdyneDevelopment.Mc3Po.Tools.Abstractions" Version="0.1.0-preview.6"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="CyberdyneDevelopment.Mc3Po.Tools.Abstractions" Version="0.1.0-preview.6" />
<PackageReference Include="CyberdyneDevelopment.Mc3Po.Tools.Abstractions"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add CyberdyneDevelopment.Mc3Po.Tools.Abstractions --version 0.1.0-preview.6
#r "nuget: CyberdyneDevelopment.Mc3Po.Tools.Abstractions, 0.1.0-preview.6"
#:package CyberdyneDevelopment.Mc3Po.Tools.Abstractions@0.1.0-preview.6
#addin nuget:?package=CyberdyneDevelopment.Mc3Po.Tools.Abstractions&version=0.1.0-preview.6&prerelease
#tool nuget:?package=CyberdyneDevelopment.Mc3Po.Tools.Abstractions&version=0.1.0-preview.6&prerelease
Mc3Po.Tools.Abstractions
Base abstractions for the FractalDataWorks development tools framework.
Overview
This package provides the foundational interfaces and base classes for building development tools that work with Roslyn-based code analysis. Tools are discoverable via the TypeCollection pattern and organized into categories.
Key Types
Core Interfaces
ITool- Base interface for all development tools, extendsITypeOption<Guid, ToolBase>ToolBase- Abstract base class implementing common tool functionalityToolInput- Input parameters container for tool executionToolOutput- Result container with message and data dictionaryToolParameter- Parameter definition with name, description, type, and validation
TypeCollections
ToolTypes- TypeCollection for discovering all registered toolsToolCategories- TypeCollection for tool categories (Analysis, Compilation, etc.)ToolParameterTypes- TypeCollection for parameter types (String, Integer, Boolean, etc.)
Tool Categories
AnalysisToolCategory- Code analysis toolsCompilationToolCategory- Build and compilation toolsFormattingToolCategory- Code formatting toolsGenerationToolCategory- Code generation toolsNavigationToolCategory- Code navigation toolsProjectToolCategory- Project/solution management toolsRefactoringToolCategory- Code refactoring toolsSearchToolCategory- Code search toolsWorkspaceToolCategory- Workspace management toolsConventionsToolCategory- FractalDataWorks-specific tools
Usage
Creating a Custom Tool
using Mc3Po.Tools.Abstractions;
using Mc3Po.Tools.Abstractions.Categories;
using FractalDataWorks.Collections.Attributes;
[TypeOption(typeof(ToolTypes), "MyCustomTool")]
public sealed class MyCustomTool : ToolBase
{
private readonly IRoslynWorkspace _workspace;
public MyCustomTool(IRoslynWorkspace workspace)
: base("MyCustomTool", ToolCategories.Analysis, "Performs custom analysis")
{
_workspace = workspace;
}
public override IReadOnlyList<ToolParameter> Parameters { get; } =
[
new ToolParameter("filePath", "Source file path", ToolParameterTypes.String, isRequired: true),
new ToolParameter("verbose", "Enable verbose output", ToolParameterTypes.Boolean, isRequired: false, defaultValue: false)
];
public override async Task<IGenericResult<ToolOutput>> Execute(
ToolInput input,
CancellationToken cancellationToken = default)
{
var filePathResult = input.GetRequired<string>("filePath");
if (!filePathResult.IsSuccess)
return GenericResult<ToolOutput>.Failure("File path is required");
var verbose = input.GetOptional("verbose", false);
// Perform analysis using _workspace.CurrentSolution...
return GenericResult<ToolOutput>.Success(
new ToolOutput("Analysis complete", new Dictionary<string, object>
{
["results"] = new[] { /* ... */ }
}));
}
}
Executing a Tool
// Get tool by name from TypeCollection
var tool = ToolTypes.ByName("AnalyzeComplexity");
// Create input with parameters
var input = new ToolInput(new Dictionary<string, object>
{
["filePath"] = "/path/to/file.cs",
["threshold"] = 15
});
// Execute
var result = await tool.Execute(input, cancellationToken);
if (result.IsSuccess)
{
Console.WriteLine(result.Value!.Message);
var methods = result.Value.Data["methods"];
}
Listing Available Tools by Category
// Get all tools
var allTools = ToolTypes.All();
// Filter by category
var analysisTools = allTools.Where(t => t.ToolCategory == ToolCategories.Analysis);
foreach (var tool in analysisTools)
{
Console.WriteLine($"{tool.Name}: {tool.ToolDescription}");
foreach (var param in tool.Parameters)
{
var required = param.IsRequired ? "(required)" : "(optional)";
Console.WriteLine($" --{param.Name}: {param.Description} {required}");
}
}
Dependencies
FractalDataWorks.Collections- TypeCollection infrastructureFractalDataWorks.Results- Railway-oriented result typesFractalDataWorks.Messages- Logging infrastructure
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- FractalDataWorks.Collections (>= 0.1.0-preview.1)
- FractalDataWorks.Collections.SourceGenerators (>= 0.1.0-preview.1)
- FractalDataWorks.MessageLogging.Abstractions (>= 0.1.0-preview.1)
- FractalDataWorks.MessageLogging.SourceGenerators (>= 0.1.0-preview.1)
- FractalDataWorks.Results (>= 0.1.0-preview.1)
- FractalDataWorks.ServiceTypes (>= 0.1.0-preview.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.1)
- System.Collections.Immutable (>= 10.0.1)
NuGet packages (14)
Showing the top 5 NuGet packages that depend on CyberdyneDevelopment.Mc3Po.Tools.Abstractions:
| Package | Downloads |
|---|---|
|
CyberdyneDevelopment.Mc3Po.Tools.Adapters
Development tools and utilities for the FractalDataWorks ecosystem. Build: |
|
|
CyberdyneDevelopment.Mc3Po.Tools.Providers.Mcp
MCP (Model Context Protocol) provider for FractalDataWorks tools. Exposes tools via the official MCP SDK. |
|
|
CyberdyneDevelopment.DeveloperTools.SourceControl
Source control tool wrappers for FractalDataWorks. Provides thin command wrappers that delegate to external MCP servers (GitLab). |
|
|
CyberdyneDevelopment.DeveloperTools.Analysis
Development tools and utilities for the FractalDataWorks ecosystem. Build: |
|
|
CyberdyneDevelopment.DeveloperTools.Compilation
Development tools and utilities for the FractalDataWorks ecosystem. Build: |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.6 | 59 | 1/9/2026 |
| 0.1.0-preview.4 | 84 | 1/7/2026 |