CyberdyneDevelopment.Mc3Po.Tools.Abstractions 0.1.0-preview.6

This is a prerelease version of CyberdyneDevelopment.Mc3Po.Tools.Abstractions.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CyberdyneDevelopment.Mc3Po.Tools.Abstractions" Version="0.1.0-preview.6">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CyberdyneDevelopment.Mc3Po.Tools.Abstractions" Version="0.1.0-preview.6" />
                    
Directory.Packages.props
<PackageReference Include="CyberdyneDevelopment.Mc3Po.Tools.Abstractions">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CyberdyneDevelopment.Mc3Po.Tools.Abstractions --version 0.1.0-preview.6
                    
#r "nuget: CyberdyneDevelopment.Mc3Po.Tools.Abstractions, 0.1.0-preview.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CyberdyneDevelopment.Mc3Po.Tools.Abstractions@0.1.0-preview.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CyberdyneDevelopment.Mc3Po.Tools.Abstractions&version=0.1.0-preview.6&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CyberdyneDevelopment.Mc3Po.Tools.Abstractions&version=0.1.0-preview.6&prerelease
                    
Install as a Cake Tool

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, extends ITypeOption<Guid, ToolBase>
  • ToolBase - Abstract base class implementing common tool functionality
  • ToolInput - Input parameters container for tool execution
  • ToolOutput - Result container with message and data dictionary
  • ToolParameter - Parameter definition with name, description, type, and validation

TypeCollections

  • ToolTypes - TypeCollection for discovering all registered tools
  • ToolCategories - TypeCollection for tool categories (Analysis, Compilation, etc.)
  • ToolParameterTypes - TypeCollection for parameter types (String, Integer, Boolean, etc.)

Tool Categories

  • AnalysisToolCategory - Code analysis tools
  • CompilationToolCategory - Build and compilation tools
  • FormattingToolCategory - Code formatting tools
  • GenerationToolCategory - Code generation tools
  • NavigationToolCategory - Code navigation tools
  • ProjectToolCategory - Project/solution management tools
  • RefactoringToolCategory - Code refactoring tools
  • SearchToolCategory - Code search tools
  • WorkspaceToolCategory - Workspace management tools
  • ConventionsToolCategory - 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 infrastructure
  • FractalDataWorks.Results - Railway-oriented result types
  • FractalDataWorks.Messages - Logging infrastructure
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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