Available on crate feature
mcp and non-WebAssembly only.Expand description
The ECS tools: reading and writing a worldβs entities and components.
These tools need nothing but the world itself, so they live next to it and register themselves with the MCP server through ToolSource.
Re-exportsΒ§
use rmcp::ErrorData;πuse rmcp::model::CallToolResult;πuse rmcp::model::ContentBlock;πuse serde_json::Value;πuse crate::mcp::host::Despawned;πuse crate::mcp::host::McpCommand;πuse crate::mcp::host::Output;πuse crate::mcp::host::SpawnedEntity;πuse crate::mcp::host::to_value;πuse crate::mcp::server::CommandSender;πuse crate::mcp::server::EntityArg;πuse crate::mcp::server::GetComponent;πuse crate::mcp::server::ListEntities;πuse crate::mcp::server::McpServer;πuse crate::mcp::server::NoArgs;πuse crate::mcp::server::SetComponent;πuse crate::mcp::server::SpawnEntity;πuse crate::mcp::server::ToolResult;πuse crate::mcp::server::ToolRouter;πuse crate::mcp::server::ToolSource;πuse crate::mcp::server::WorldArg;πuse crate::mcp::server::command;πuse crate::mcp::server::entity;πuse crate::mcp::server::tool;πuse crate::reflect;πuse crate::DynamicBundle;πuse crate::Entity;πuse crate::Scope;πuse crate::ScopeMut;πuse crate::World;π
FunctionsΒ§
- component_
names π - The component names the reflection table holds.
- despawn_
entity π - Despawn one entity.
- despawn_
one π - Despawn one entity and its subtree.
- get_
component π - One component of one entity.
- get_
entity π - One entityβs component names and location.
- list_
archetypes π - Every archetype with its component names and length.
- list_
components π - The component names the server can read and write.
- list_
entities π - Every spawned entity with its component names.
- list_
worlds π - Every world the host carries.
- read_
component π - One component of one entity, encoded.
- register π
- Register every ECS tool on
router. - scoped π
- The scope an ECS tool runs in: the scope the arguments name, or the root.
- scoped_
mut π - The mutable scope an ECS tool runs in.
- set_
component π - Overwrite one component of one entity.
- spawn_
entity π - Spawn an entity from a map of component name to value.
- spawn_
from_ πvalue - Spawn an entity from a map of component name to value.
- summarize_
archetypes π - Every archetype with the component names it stores.
- summarize_
entities π - Every spawned entity with its component names.
- summarize_
entity π - One entityβs component names and location.
- summarize_
world π - A high-level description of a scope.
- world_
summary π - A high-level description of the world.
- write_
component π - Overwrite one component of one entity.