Skip to main content
Glama
FEAGI MCP Server

FEAGI MCP Server

Official
by feagi

send_motor_command

Commands a robot joint to a fraction or physical value, checking a Cartesian fence to reject unsafe moves before firing OPU stimulation.

Instructions

Command one robot channel to a fraction or value via OPU stimulation (fence-checked).

This is a high-level convenience tool that:

  1. Looks up the channel's OPU area and index from the agent's device registrations.

  2. Binds the registered unit to FEAGI's coder (feagi_rust_py_libs) to get the z bin that decodes to the target.

  3. Fires that voxel ([channel x per-channel width, 0, z]) via stimulate_area_batch.

Pass exactly one of fraction (0..1, always accepted) or value (physical units; the channel must state a physical_range in its registration, otherwise the call is an error naming the missing range; there is no default range). Out-of-range values are clamped and flagged.

Prerequisites:

  • The experiment must be running in Studio (_experiment.state in the result, or get_experiment_status).

  • The controller bridge must be running (check with list_controller_bridges).

  • The agent must be registered (check with get_registered_agents).

  • The burst engine must be running (check with get_burst_engine_status).

Use get_agent_joint_map first to discover available joint names, and convert_io_value to see a channel's physical_range.

Args: agent_id: Agent identifier (from get_registered_agents). joint_name: Channel name as reported by get_agent_joint_map (joint_name, actuator_name, or source_entity; case-insensitive match). fraction: Decoded fraction 0..1 to command. value: Physical value to command, in the registered physical_range unit.

Returns: Stimulation result with resolved cortical area, voxels, the bin, and the fraction (and value) that bin decodes to. When a MuJoCo controller with an enabled Cartesian fence is reachable, the result also has fence (rejection count before and after, and rejected). If the fence refused the move, ok and success are false and error / violation_mm say by how much; the arm did not move. The controller counts a rejection asynchronously, so the call waits a few bursts (fence.waited_s) before reading it. fence.checked is false when the controller cannot be read.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "agent_id": "<agent_id>",
      "joint_name": "<joint_name>"
    },
    "name": "send_motor_command"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueNo
agent_idYes
fractionNo
joint_nameYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.14

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so: it discloses clamping of out-of-range values, the fence rejection path (ok/success false, error and violation_mm, arm did not move), the asynchronous rejection wait measured in bursts, and that fence.checked is false when the controller is unreadable. It also documents the three-step resolution mechanism, which explains why prerequisite lookups matter.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the one-line purpose, then structured headers for the mechanism, prerequisites, Args, and Returns. Slightly over-explained: the numbered walkthrough naming feagi_rust_py_libs, the z bin, and the exact voxel coordinates is implementation detail an agent does not need to select or invoke the tool, and the Returns section largely restates the output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a mutating, fence-gated actuation tool with four params at 0% schema coverage and no annotations, the definition covers preconditions, the two mutually exclusive input modes, clamping, and the full failure shape. Nothing an agent needs in order to call it correctly or interpret a rejection is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and the Args section defines all four parameters: agent_id's provenance, joint_name's accepted aliases and case-insensitive matching, fraction's 0..1 domain, and value's dependency on a registered physical_range with no default. This adds meaning well beyond the bare typed properties in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Command one robot channel ... via OPU stimulation') and distinguishes itself from siblings by naming get_agent_joint_map, convert_io_value, list_controller_bridges, and stimulate_area_batch as separate steps/tools. An agent can tell this apart from the low-level stimulate_area_batch without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to pass exactly one of fraction or value, states that fraction is always accepted while value requires a physical_range in the registration, and names the discovery tools to call first (get_agent_joint_map, convert_io_value). The Prerequisites block enumerates the four runtime conditions with the exact tool to check each one.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools