Thulp

Thulp

Execution context engineering for AI agents. One interface for tool discovery, validation, execution, and multi-step workflows. Pure Rust. 11 crates.

crates.io CI 11 crates 331 tests MIT/Apache-2.0
$ cargo install thulp-cli

Unified Tool Abstraction

One interface for local functions, MCP servers, and OpenAPI endpoints. Type-safe parameters with JSON Schema validation. Builder pattern APIs.

MCP + UTCP Protocol

Full Model Context Protocol support via rs-utcp. STDIO and HTTP transports. Tools, resources, and prompts. Drop-in for any MCP-compatible agent.

Skill Workflows

Compose multi-step tool chains with variable interpolation, timeout/retry policies, execution hooks, and pluggable executors. Load from SKILL.md files.

Query DSL

Filter and search tools with a powerful query language. Wildcards, boolean operators, parameter constraints. name:search and min:2

Workspace

CrateDescriptionTests
thulp-coreCore types, traits, parameter validation70
thulp-mcpMCP transport (STDIO/HTTP), tools, resources39
thulp-skillsMulti-step workflows, executor, hooks, retry54
thulp-skill-filesSKILL.md parsing, YAML frontmatter, scope priority23
thulp-queryQuery DSL with nom parser19
thulp-workspaceSessions, persistence, turn counting6
thulp-adapterOpenAPI v2/v3 to tool conversion10
thulp-registryAsync thread-safe tool registry with tagging8
thulp-browserWeb fetching, HTML parsing, optional CDP7
thulp-guidanceTemplate rendering, LLM guidance primitives6
thulp-cliCLI with JSON output and shell completions32

Quick Start

Define a Tool

use thulp_core::{ToolDefinition, Parameter, ParameterType};

let tool = ToolDefinition::builder("search")
    .description("Search for information")
    .parameter(
        Parameter::builder("query")
            .param_type(ParameterType::String)
            .required(true)
            .build()
    )
    .build();

Connect to MCP Server

use thulp_mcp::McpClient;

let client = McpClient::connect_stdio("server", "mcp-server", None).await?;
let tools = client.list_tools().await?;
let result = client.call(&ToolCall::builder("search")
    .arg_str("query", "rust async")
    .build()).await?;

CLI

thulp tools list --output json
thulp tools validate search --args '{"query": "rust"}'
thulp convert openapi spec.yaml --output tools.yaml
thulp completions bash > ~/.local/share/bash-completion/completions/thulp

Ecosystem

ProjectWhat
pawanCLI coding agent — uses thulp for tool abstraction
aresAgentic retrieval-enhanced server
erukaContext intelligence engine
daedraSelf-contained web search MCP server