Skip to main content

Crate smeltery_bellows

Crate smeltery_bellows 

Source
Expand description

Bellows, the AI-agent support of the Smeltery framework.

The app command bellows:mcp runs a Model Context Protocol server on stdin / stdout (JSON-RPC 2.0, one message per line) inside the app binary, so a coding agent can ask the app itself about its routes, models, database schema, configuration keys, recent errors and documentation, and can run generators, tests and agent controls. Apps register it with BellowsExt::bellows; a generated app does so in bootstrap/app.rs, and .mcp.json points the agent at smeltery bellows:mcp.

use smeltery_bellows::BellowsExt as _;
use smeltery_core::AppBuilder;

fn build(app: AppBuilder) -> AppBuilder {
    app.bellows()
}
ToolAnswers
route_listevery route: methods, path, name, middleware
modelsthe models in app/models/ with their table’s columns
db_schemaevery table: columns (type, nullable, default, primary key) and indexes
config_keysthe names of the settings in .env, .env.example and the framework (never values)
last_errorsthe latest ERROR (and, when asked, WARN) lines of the app’s log file (LOG_FILE, else storage/logs/*.log)
docs_searchsections of the Smeltery guide, CLAUDE.md and .bellows/ matching the words
run_generatorruns one smeltery make:* command (names, fields and the generators’ options as arguments)
run_testsruns cargo test (optionally filtered by a test path) and returns the summary and failures; it compiles and runs the app’s code
agents_listthe Watchfire agents of the running app
agent_controlstart / stop / pause / resume / restart an agent of the running app

Structs§

McpCommand
The bellows:mcp command.
McpServer
The MCP server: reads requests, answers them through the tools.
Options
Where the tools look and how long their subprocesses and HTTP calls may take.

Constants§

PROTOCOL_VERSIONS
The MCP protocol versions Bellows speaks, newest first. 2026-07-28 is the stateless revision (server/discover, no initialize); the others start with initialize.

Traits§

BellowsExt
AppBuilder::bellows: add the bellows:mcp command.