Skip to main content
Glama
FEAGI MCP Server

FEAGI MCP Server

Official
by feagi

build_stance_relative_mapping

Compile stance-relative motor targets into reflex voxel rows by converting per-channel joint offsets to destination z bins; preview mappings and warnings before applying.

Instructions

Compile stance-relative motor targets (joint units) into reflex voxel rows.

Motor targets on a PositionalServo absolute OPU are absolute and held. This builds a reflex as a small offset around a per-channel stance: source bin i (along src_axis of src_fixed) commands reference + gain * (i - src_center) joint units, bins within deadband of the center map to nothing, and the offset is clamped to max_offset. Joint units become dst z bins using the joint range, dst_depth and the destination OPU's registered coding: FEAGI's own coder (feagi_rust_py_libs) bound to the unit the agent's device registration states, so a connected controller is needed. dst_depth is optional and must equal the area's z depth. Check any bin with convert_io_value.

channels: [{"channel": int, "reference": float, "range": [min, max]?, "src_fixed": [x, y, z]?, "gain": float?, "max_offset": float?, "deadband": float?}]. A channel's gain, max_offset and deadband override the top-level values for that channel; unknown channel keys are rejected. A warning is returned when a channel's abs(gain) is below one dst z bin in joint units ((max - min) / (dst_depth - 1)), since the offsets then quantize. reference is in joint units; read it from the model (keyframe) yourself. n_stance_voxels: stance voxels active on the same channel at once; the decoder averages all active z, so the reflex z is mean-compensated. coactive_z: z of another source's rest voxel active on the same channel while this source fires (one integer for every channel, or {"<channel>": z} as an object or JSON string); the reflex z becomes 2*z_target - coactive_z. Mutually exclusive with n_stance_voxels.

Default dry_run=True returns voxel_mappings, a table_text (src bin -> target value), stance (the stance voxel to drive continuously) and warnings without writing. dry_run=False then calls build_reflex_mapping. Verify the sign with a probe afterward.

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": {
      "src_area_id": "<src_area_id>",
      "dst_area_id": "<dst_area_id>",
      "morphology_name": "<morphology_name>",
      "src_axis": "<src_axis>",
      "src_bins": "<src_bins>",
      "channels": "<channels>",
      "gain": "<gain>"
    },
    "name": "build_stance_relative_mapping"
  }
}

Input Schema

NameRequiredDescriptionDefault
gainYes
dry_runNo
channelsYes
deadbandNo
src_axisYes
src_binsYes
dst_depthNo
src_fixedNo
coactive_zNo
max_offsetNo
src_centerNo
dst_area_idYes
joint_rangeNo
src_area_idYes
morphology_nameYes
n_stance_voxelsNo
replace_existingNo
synaptic_delay_burstsNo
postsynaptic_current_multiplierNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.14

TDQS

A3.9/5.0
Behavior4/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 disclose meaningful behavior: the reference + gain*(i - src_center) formula, deadband silencing, max_offset clamping, per-channel overrides, rejection of unknown channel keys, the quantization warning below one dst z bin, the mean-compensation for n_stance_voxels, and the 2*z_target - coactive_z transform. The write path is gated behind an explicit dry_run=False and a replace_existing flag exists, but the description never states whether a write overwrites existing mappings or what failure modes to expect when no controller is connected.

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?

The purpose is front-loaded in the first sentence, and most subsequent sentences carry non-redundant mechanism detail (clamping, deadband, override precedence, dry_run returns). The middle paragraph is a dense wall of parenthetical and backtick-laden clauses that would benefit from breaking into a numbered behavior list, and 'Verify the sign with a probe afterward' is a useful but tacked-on closing note.

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

Completeness3/5

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

For a 19-parameter, 7-required tool with zero annotation coverage, the description explains the core stance-to-reflex pipeline thoroughly and even describes the dry-run return payloads despite an output schema existing. However, roughly a third of the parameters — including the synaptic tuning knobs and replace_existing — get no mention anywhere, leaving the agent guessing on write-side configuration.

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

Parameters4/5

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

Schema coverage is 0%, so the description must supply meaning, and it does so strongly for the semantically hard parameters: the channels object shape with override precedence, src_center, deadband, max_offset, joint_range, n_stance_voxels, and the accepted integer/object/JSON-string forms of coactive_z. It leaves several parameters entirely unexplained — synaptic_delay_bursts, postsynaptic_current_multiplier, morphology_name, replace_existing, and dst_area_id's role beyond implicit use — which keeps it from a 5.

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

Purpose4/5

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

The opening sentence names a specific verb and resource — compile stance-relative motor targets (joint units) into reflex voxel rows — and the body makes clear it is a stance-offset wrapper that ultimately delegates to build_reflex_mapping. It is distinguishable from the sibling builder by the stance/offset framing, though the heavily domain-specific jargon ('OPU', 'reflex voxel rows') slows recognition.

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

Usage Guidelines4/5

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

It gives concrete operating conditions: a connected controller is needed because the destination coder is bound to the device registration, dst_depth must equal the area's z depth, and bins should be checked with convert_io_value. It also explains the dry_run=True default versus dry_run=False delegating to build_reflex_mapping, and flags coactive_z as mutually exclusive with n_stance_voxels. What it does not do is say when to reach for this tool instead of calling build_reflex_mapping directly.

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