Skip to main content

Module mcp

Module mcp 

Source
Expand description

The MCP tools an audio world answers: recording the mix it fills.

Each tool routes its work to the world it names through command, exactly as the rendering tools do. The tools register themselves through ToolSource, so a server built from unlit_ecs carries them without depending on this crate.

Re-exportsΒ§

pub use bridge::pump_mcp;
pub use bridge::serve_mcp;
use unlit_ecs::mcp::serde_json; πŸ”’
use unlit_ecs::mcp::serde_json::Value; πŸ”’
use unlit_ecs::mcp::CommandSender; πŸ”’
use unlit_ecs::mcp::EncodedAudio; πŸ”’
use unlit_ecs::mcp::McpServer; πŸ”’
use unlit_ecs::mcp::Output; πŸ”’
use unlit_ecs::mcp::ToolResult; πŸ”’
use unlit_ecs::mcp::ToolRouter; πŸ”’
use unlit_ecs::mcp::ToolSource; πŸ”’
use unlit_ecs::mcp::WorldArg; πŸ”’
use unlit_ecs::mcp::command; πŸ”’
use unlit_ecs::mcp::run; πŸ”’
use unlit_ecs::mcp::tool; πŸ”’
use unlit_ecs::Entity; πŸ”’
use unlit_ecs::World; πŸ”’
use unlit_ecs::bundle; πŸ”’
use unlit3d::winit::builtin::ExitRequest; πŸ”’
use crate::record::RecordingError; πŸ”’
use crate::record::RecordingFormat; πŸ”’
use crate::record::RecordingHandle; πŸ”’
use crate::record::start_recording; πŸ”’

ModulesΒ§

bridge πŸ”’
The MCP stdio transport, wired straight into a world.

StructsΒ§

ActiveRecording πŸ”’
The recording in progress on a world, kept as a component so it lives on that world’s own thread.
InProgress πŸ”’
What a recording in progress has captured.
ReadRecording πŸ”’
Arguments for finishing a recording in memory.
Recorded πŸ”’
A finished recording, written to a file.
StartRecording πŸ”’
Arguments for starting a recording.
Started πŸ”’
A recording that has just started.
StopRecording πŸ”’
Arguments for finishing a recording.

EnumsΒ§

ToolError πŸ”’
Why a recording tool could not answer its request.

ConstantsΒ§

DEFAULT_RECORDING_SECONDS πŸ”’
How long a recording lasts when its caller names no limit.

FunctionsΒ§

audio_recording_status πŸ”’
Report what the recording in progress has captured.
cancel πŸ”’
Stop the recording and throw its samples away.
cancel_audio_recording πŸ”’
Discard the recording in progress.
read πŸ”’
Stop the recording and answer with its sound in memory.
read_audio_recording πŸ”’
Finish a recording and return its sound without touching the filesystem.
register πŸ”’
Register every audio tool on router.
request_exit πŸ”’
Ask the host to exit, unless it carries no request component.
request_host_exit πŸ”’
Ask a windowed or headless host to exit normally.
start πŸ”’
Start a recording, unless one is already running.
start_audio_recording πŸ”’
Start recording the mix of the audio world the arguments name.
status πŸ”’
Report how far the recording in progress has come.
stop πŸ”’
Stop the recording, write its samples and report the file.
stop_audio_recording πŸ”’
Finish a recording and write its file.
take πŸ”’
Take the recording in progress out of the world.