BB.MCP.State (bb_mcp v0.3.3)

Copy Markdown View Source

Describe a robot's current safety and operational state.

Shared by the get_state tool and the bb://robots/{robot}/state resource so the two always answer with the same fields.

Summary

Functions

The state of robot_module as a JSON-encodable map.

Functions

describe(robot_module)

@spec describe(module()) :: map()

The state of robot_module as a JSON-encodable map.

BB.Robot.Runtime.executing_commands/1 reports each command's execution id as a reference() and its start as a DateTime, so the whole reply goes through BB.MCP.Json.encodable/1 on the way out. The execution id is encoded by BB.Command.encode_execution_id/1 rather than inspected, since cancel_command hands it straight back to BB.Command.cancel/2.