ftl-core

Crates.ioftl-core
lib.rsftl-core
version0.0.2
created_at2025-06-28 07:45:14.40903+00
updated_at2025-06-28 07:59:11.590528+00
descriptionCore library for FTL tools - lightweight MCP server for WebAssembly
homepagehttps://github.com/ftl-tooling/ftl-cli
repositoryhttps://github.com/ftl-tooling/ftl-cli
max_upload_size
id1729613
size51,682
Ian McDonald (bowlofarugula)

documentation

https://docs.rs/ftl

README

FTL Core

This crate provides the core building blocks for creating FTL tools. It is the open-source foundation of the FTL platform, designed for performance, safety, and efficiency.

Purpose

ftl-core is the library that developers will use to implement the logic of their tools. It provides the necessary abstractions to integrate with the FTL runtime and the Model Context Protocol (MCP) without needing to know the low-level details.

Key Components

  • Tool Trait: The central abstraction for all FTL tools. It defines the interface that the FTL runtime uses to execute a tool.
  • ftl_mcp_server! Macro: A macro that generates the necessary boilerplate to expose a Tool implementation as a WebAssembly component that can be served over MCP.
  • ToolResult and ToolError: Standardized types for returning success and error states from a tool.
  • Prelude: The ftl_core::prelude module re-exports the most commonly used items for convenience.

Usage

To create a new tool, you will typically add ftl-core as a dependency in your Cargo.toml and implement the Tool trait.

use ftl_core::prelude::*;

#[derive(Clone)]
struct MyTool;

impl Tool for MyTool {
    // ... implementation ...
}

ftl_core::ftl_mcp_server!(MyTool);

For more detailed information on developing tools, please see the main project documentation.

Commit count: 0

cargo fmt