World Model MCP

v0.6.1
io.github.putervision/world-model-mcp Checked 4 days ago Published 2 months ago

Persistent 3D/2D spatial world model for AI agents with dynamic velocity and entity tracking.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

update_entity

Create or upsert one spatial entity (position, orientation, AABB, tags, properties, confidence). Manual authoring only. Omit id to create (ULID assigned). Provide id to update. Omitted fields are preserved; this is a partial merge, not a full replace. status defaults to active. confidence is 0.0–1.0 object-permanence. Does not ingest vision detections or apply action results. Returns {ok, entity_id, created:boolean, entity}. Use update_entity instead of ingest_observation when authoring entities directly rather than merging perception detections.

ParameterTypeDescription
name *stringHuman-readable name or label of the entity
type *stringCategorical entity type
affordance_masknumberBitmask of physical interaction affordances (1=traversable, 2=occluder, 4=container, 8=interactable, 16=threat)
bounding_boxobjectAABB bounding volume size
confidencenumberObject permanence confidence score from 0.0 to 1.0 (default: 1.0)
idstringOptional entity ID (auto-generated ULID if omitted for creation)
orientationobject3D Euler orientation angles in degrees
parent_idstringOptional parent entity ID for hierarchical containment or attachments
positionobject3D world position coordinates
projectstringOptional project identifier
propertiesobjectArbitrary JSON key-value properties (physics, materials, interactive state)
region_idstringOptional named region ID where this entity resides
statusstringEntity lifecycle status (default: active)
tagsarrayArray of searchable string tags
velocityobject3D velocity vector (vx, vy, vz) for physical motion and predictive permanence

query_entities

Find entities by keyword query (FTS5 search), type, region, spatial proximity, tags, or status. Alternatively, provide entity_id for single-entity location and historical trajectory lookup. Read-only. Returns {ok, count, entities[]}. Use query_entities instead of get_spatial_map when searching for specific subsets rather than exporting the full topology.

ParameterTypeDescription
entity_idstringSpecific entity ID to look up directly (returns location and state)
history_limitnumberMaximum number of history events to return when include_history is true (default: 20)
include_historybooleanIf true and entity_id is specified, returns recent movement/event history
limitnumberMaximum number of entities to return (default: 50)
max_distancenumberMaximum distance radius from near_position
min_confidencenumberMinimum confidence score (e.g. 0.5 to filter out decayed entities)
near_positionobjectCenter position for proximity distance search
projectstringOptional project identifier
querystringFull-text search query across entity names, tags, and properties
region_idstringFilter by region ID
statusstringFilter by status
tagsarrayFilter by matching tags
typestringFilter by entity type

set_relation

Record or remove a spatial relationship between two entities. Actions: add, remove. Relations: on, inside, next_to, above, below, near, contains, occluded_by, connected_to, facing, holding, part_of, custom. This mutates the relation graph only, not entity poses. Returns {ok, relation}. Use set_relation instead of update_entity when establishing topological links (on, inside, contains) rather than setting entity coordinates.

ParameterTypeDescription
relation *stringType of spatial relation
source_id *stringSource entity ID
target_id *stringTarget entity ID
actionstringAction to perform (default: add)
bidirectionalbooleanIf true, automatically sets inverse relationship on target
distancenumberOptional measured distance between entities
metadataobjectAdditional relation metadata
offsetobjectRelative offset vector from source to target
projectstringOptional project identifier

get_spatial_map

Export the known world as json, geojson, topological_graph, gltf, obj, joint, spatial_vlm, summary, or compact_slice. Optional region_id and min_confidence filters. Read-only snapshot of current SQLite state (not a live renderer). Returns the payload in requested format. Use get_spatial_map instead of query_entities when exporting full environment snapshots or 3D meshes rather than filtering entities.

ParameterTypeDescription
formatstringExport or view format (default: json, use "summary" for high-level environment overview, "compact_slice" for fast System One decision slice)
knumberMax nearest entities to include in compact_slice (default: 16)
min_confidencenumberFilter out entities below confidence threshold
observer_headingnumberOptional heading angle in degrees for compact_slice bearing calculation
observer_positionarrayOptional [x, y, z] observer position for compact_slice
projectstringOptional project identifier
region_idstringOptional region ID to filter

simulate_movement

Predict entity trajectory, test for AABB obstacle collisions, or compute navigation waypoints (modes: simulate, navigate, waypoints). Read-only simulation. Returns {ok, is_valid, destination, collisions[], waypoints[]}. Use simulate_movement instead of record_outcome when testing hypothetical motion and collisions before executing an action.

ParameterTypeDescription
check_collisionsbooleanWhether to test for AABB obstacle collisions (default: true)
delta_positionobjectRelative movement displacement
duration_secondsnumberMovement duration in seconds
entity_idstringEntity ID to simulate or move
modestringOperation mode: "simulate" (default) for physics/collision, "navigate" or "waypoints" for path planning
projectstringOptional project identifier
start_entity_idstringStarting entity ID for navigation mode
start_positionobjectStarting 3D coordinates for navigation mode
target_entity_idstringTarget destination entity ID for navigation mode
target_positionobjectTarget position destination
velocityobjectVelocity vector in units per second

ingest_observation

Merge vision detections into the world model: re-identify by Euclidean proximity, boost confidence, and optionally reconcile against the expected frustum. This is the perception writer. It may create or update entities when reconcile=true. Returns {ok, matched[], created[], lost[], reconcile}. Use ingest_observation instead of update_entity when merging camera or sensor perception detections rather than manual authoring.

ParameterTypeDescription
detections *arrayList of detected objects in the frame
field_of_viewobject
observer_poseobjectPosition and orientation of the camera/agent when observing
projectstringOptional project identifier
reconcilebooleanIf true, also performs/returns frustum reconciliation analysis (confirmed, new, displaced, missing)
visual_state_idstringAssociated visual state ID from vision-memory-mcp

get_expected_view

Compute which entities should be visible from an observer pose and FOV cone, with ray-AABB occlusion. Read-only. Does not write entities. Returns {visible[], occluded[], observer}. Use get_expected_view instead of get_spatial_map when computing observer FOV visibility and occlusion cones rather than unfiltered world states.

ParameterTypeDescription
observer_position *objectObserver 3D coordinates
fov_degreesnumberHorizontal field of view in degrees (default: 90)
max_distancenumberMaximum view distance in units (default: 100)
observer_orientationobjectObserver orientation (yaw determines heading direction)
projectstringOptional project identifier

record_outcome

Record action execution results, movement deltas, property changes, entity destruction, or spool outcome ingestion from 60Hz loop. Not for vision ingest or manual pose edits. Mark entity destroyed via status: "destroyed". Returns {ok, action, success:boolean, ...}. Use record_outcome instead of update_entity when applying executed action results and status deltas rather than hand-authoring entities.

ParameterTypeDescription
actionstringAction type: "record" (default) for single outcome or "from_tick" for 60Hz batch spool ingestion
action_namestringName of the executed action (e.g. move_to, pickup, place, destroy)
affordance_masknumberUpdated affordance bitmask after action
destroyedbooleanIf true, marks entity as destroyed
entity_idstringPrimary entity affected
itemsarrayAlias for spooled_outcomes batch array
projectstringOptional project identifier
property_changesobjectUpdated properties to merge
resulting_positionobjectNew position of entity after action
resulting_velocityobjectNew velocity vector of entity after action
spooled_outcomesarrayBatch of spooled outcomes to ingest from 60Hz loop off-tick execution
successbooleanWhether the action succeeded
task_idstringLinked task ID

manage_spatial_spec

Manage Spatial Spec-Driven Development (Spatial SDD) physical baseline contracts. Actions: set (registers a baseline spec), verify (evaluates live entities against constraints without mutating), list (returns all registered specs). verify is read-only. set persists constraints. Returns {ok, action, spec_id, passed:boolean, violations[]}. Use manage_spatial_spec instead of update_entity when validating physical contract baselines rather than mutating live entity state.

ParameterTypeDescription
actionstringAction to perform (default: list)
boundsobjectSpatial bounding box limits
constraintsarrayList of spatial constraints
descriptionstringSpecification description
namestringName of the spatial specification
projectstringOptional project identifier
sdd_requirement_idstringLinked state-memory SDD requirement node ID
tolerancenumberVerification tolerance percentage (default: 0.05)

create_evidence_pack

Package entity positions, observation reconciliations, and snapshot states into an immutable, SHA-256 hashed cryptographic evidence pack for compliance and state-memory task verification. Does not change entities; hashes current proof. Returns {ok, pack_id, hash, payload}. Use create_evidence_pack instead of manage_snapshot when creating immutable cryptographic verification packages rather than database checkpoints.

ParameterTypeDescription
after_snapshot_idstringSnapshot ID after action execution
before_snapshot_idstringSnapshot ID before action execution
entity_idsarrayEntity IDs included in evidence pack
linked_state_memory_nodesobjectLinked state-memory node IDs
observation_idsarrayObservation IDs included in evidence pack
projectstringOptional project identifier
task_idstringPrimary state-memory task ID linked to this proof

use_spatial_blackboard

Publish or read multi-agent spatial coordination topics, collision alerts, and mutex region leases. Actions: get, set, delete, lease, list, post, read, claim, release. set writes payload (coordinates allowed for collision alerts) with optional ttl_seconds. lease acquire fails if the resource is held. delete is destructive. Returns {ok, action, items[]|entry|lease}. Use use_spatial_blackboard instead of set_relation when coordinating transient multi-agent collision alerts and mutex region leases.

ParameterTypeDescription
actionstringAction to perform (default: get)
agent_idstringAgent identifier (alias for sender)
duration_secondsnumberLease duration in seconds (default: 60)
idstringBlackboard entry identifier for get or delete
include_expiredbooleanWhether to include expired entries
intention_idstringCross-server intention identifier from agent-reasoning-mcp to bind execution directives
limitnumberMaximum number of items or topics to return
modestringLease action mode: acquire or release (default: acquire)
payloadobjectPayload object (supports coordinates for collision alerts)
projectstringOptional project identifier
resource_idstringResource or entity ID to lease or release
senderstringAgent identifier posting or claiming
topicstringBlackboard topic name
topic_prefixstringPrefix filter for listing topics
ttl_secondsnumberPost TTL expiration in seconds

manage_snapshot

Checkpoint, diff, undo, or time-travel the spatial world database. Actions: save, restore, diff, list, undo, history, time_travel. restore (overwrites live state) and undo (reverts last matching mutation) are destructive and not always reversible except by saving first. diff, list, history, and time_travel are read-only. Returns {ok, action, snapshots[]|diff|state}. Use manage_snapshot instead of update_entity when rolling back, diffing, or time-traveling database state rather than editing single entities.

ParameterTypeDescription
actionstringAction to perform (default: list)
descriptionstringOptional snapshot description
entity_idstringTarget entity ID for undo or history lookup
namestringSnapshot name for save/restore
projectstringOptional project identifier
snapshot_astringFirst snapshot name for diff
snapshot_bstringSecond snapshot name for diff
timestampstringISO timestamp for time-travel reconstruction
typestringMutation type to undo (default: any)

generate_game_inputs

Translate 3D navigation paths into Playwright commands (WASD/click-to-move) or project/unproject 3D coordinates and screen pixels. Actions: generate_inputs, project_screen, unproject_ray. Read-only: generates Playwright inputs, does not press keys. Returns {ok, action, inputs[]|screen_coords|ray}. Use generate_game_inputs instead of simulate_movement when translating 3D trajectories into Playwright browser automation commands.

ParameterTypeDescription
actionstringAction to perform (default: generate_inputs)
cameraobjectCamera state for projection / click-to-move
control_profileobjectGame control key bindings and physical parameters
current_orientationobjectStarting orientation angles
current_positionobjectStarting 3D coordinates (auto-resolved from entity_id if omitted)
directionstringProjection direction for projection mode
entity_idstringPlayer or target entity ID
ground_elevationnumberGround plane elevation Y for raycast intercept (default: 0)
output_formatstringOutput format (default: playwright_mcp)
projectstringOptional project identifier
screen_xnumberScreen pixel X coordinate for screen_to_world unprojection
screen_ynumberScreen pixel Y coordinate for screen_to_world unprojection
target_entity_idstringTarget destination entity ID
target_positionobjectDestination 3D coordinates
viewportobjectBrowser viewport dimensions
waypointsarrayOptional intermediate navigation waypoints
world_positionobject3D world position for projection or starting point

wait_for_spatial_state

Poll and wait until an entity reaches a specific spatial condition (exists, active, confidence threshold, or enters region). Read-only polling tool. Default timeout: 10000ms, poll_interval: 500ms. On timeout returns {ok: false, timeout: true}. Returns {ok, condition_met:boolean, entity}. Use wait_for_spatial_state instead of query_entities when polling asynchronously for an entity state transition or region entry.

ParameterTypeDescription
condition *stringCondition to wait for
entity_id *stringEntity ID to monitor
poll_interval_msnumberPolling interval in milliseconds (default: 250)
projectstringOptional project identifier
region_idstringTarget region ID for in_region condition
thresholdnumberConfidence threshold (default: 0.8)
timeout_msnumberTimeout in milliseconds (default: 10000)